Files
xinlong-shop-taro/.workbuddy/memory/2025-07-15.md
赵忠林 747a2a1d3a feat(auth): 优化隐藏登录弹窗点击逻辑和样式
- 将点击步数提示从第4次调整到第6次触发,增强用户体验
- 弹窗宽度由320px调整为340px,更加合理显示内容
- 弹窗布局对齐sms-login.tsx,验证码输入和按钮布局调整,修复小程序Button显示问题
- 登录按钮样式改用className设置宽度和圆角,取消block和shape属性
- 点击版权信息累计11次弹出登录弹窗,未达次数显示剩余步数提示
- 登录成功后同步React登录态,保持状态一致
2026-07-15 01:45:45 +08:00

12 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2025-07-15 工作日志
## 关于页面隐藏开发者登录
-`src/pages/user/about/index.tsx` 底部版权信息上添加了点击 11 次弹出隐藏登录弹窗的功能
- 登录方式:手机号 + 短信验证码,复用 `loginBySms` / `sendSmsCaptcha` APIfrom `@/api/passport/login`
- 点击计数使用 `useRef` 保证快速点击时的同步性,超过 3 秒未点击自动重置
- 步数提示从**第 6 次**点击开始显示Android 开发者模式风格)
- **(已更新)** 弹窗布局完全对齐 `sms-login.tsx` 写法:验证码行取消 `gap-2`/`flex-1` 包裹,改用 `flex items-center` 直接放 Input + Button登录按钮取消 `block`/`shape`/`style`,改用 `className='w-full rounded-lg p-2'` + 外层 `flex justify-center`,解决小程序中 Button 不显示的问题
- 弹窗宽度从 300px 加宽到 **340px**
- 登录成功后调用 `useUserContext().syncFromStorage()` 同步 React 登录态(`loginBySms` 内部已写入 storage 但不返回数据)
- 弹窗 UI 使用 NutUI `Input` + `Button`,带 60 秒倒计时