feat: bugfix

This commit is contained in:
zdl
2025-11-03 19:45:32 +08:00
parent 0e66bb471f
commit ce495ed6fa
4 changed files with 217 additions and 44 deletions

View File

@@ -508,19 +508,20 @@ export default function WechatRegister() {
title="微信扫码登录"
width="300"
height="350"
scrolling="no" // ✅ 新增:禁止滚动
scrolling="no" // ✅ 新增:禁止滚动
sandbox="allow-scripts allow-same-origin allow-forms" // ✅ 阻止iframe跳转父页面
style={{
border: 'none',
transform: 'scale(0.77) translateY(-35px)', // ✅ 裁剪顶部logo
transformOrigin: 'top left',
marginLeft: '-5px',
pointerEvents: 'auto', // 允许点击 │ │
overflow: 'hidden', // 尝试隐藏滚动条(可能不起作用)
overflow: 'hidden', // 尝试隐藏滚动条(可能不起作用)
}}
// 使用 onWheel 事件阻止滚动 │ │
onWheel={(e) => e.preventDefault()} // ✅ 在父容器上阻止滚动
onTouchMove={(e) => e.preventDefault()} // ✅ 移动端也阻止
/>
) : (
/* 未获取:显示占位符 */