feat(auth): 完善扫码登录状态逻辑,支持绑定手机号和跳转

- 新增响应字段 nextAction、redirectUrl 和 successMessage,用于表示下一步操作
- 扫码登录状态为绑定手机号时,设置 nextAction 为 bind_phone,清空跳转地址
- 扫码已确认且有访问令牌时,设置跳转控制台页面,带成功提示信息
- 其他状态默认保持等待状态,确保扫码流程向前推进
- 更新扫码登录响应模型,优化前端流程控制体验
This commit is contained in:
2026-04-07 01:43:51 +08:00
parent 3c89cbce40
commit e73e0fb6b5
4 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
{
"version": 2,
"sessions": {
"da2fb4dc76a94426a7dfef478f674489": [
{
"expertId": "SeniorDeveloper",
"name": "Will",
"profession": "高级开发工程师",
"avatarUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/avatars/02-Engineering/SeniorDeveloper/SeniorDeveloper.png",
"promptUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/experts/02-Engineering/SeniorDeveloper/SeniorDeveloper_zh.md",
"usedAt": 1775495439006,
"industryId": "all"
}
]
},
"lastUpdated": 1775497010453
}

View File

@@ -0,0 +1,12 @@
## 2026-04-07 工作记录
### 微信扫码登录问题修复
1. 修复了UserSyncService中tenant_id字段名问题从tenantId改为tenant_id
2. 同时发送两种格式的tenant_id字段确保兼容性
3. 修改了WxOfficialController在同步前从数据库重新加载用户对象
4. 添加了详细的调试日志便于问题排查
### 待解决问题
1. websopy侧app_user_cache同步失败tenant_id为null
2. 扫码成功后需跳转到强制绑定手机号页面
3. 注册成功后应跳转到控制台/console