feat(passport): 优化已登录用户加入时协议勾选逻辑

- 已登录用户点击「确认加入」时不再强制勾选协议
- 移除 handleConfirmJoin 中对协议勾选的检查
- 未注册用户仍需勾选协议后才能授权手机号
- 确保登录状态异常时有提示信息显示
This commit is contained in:
2026-04-12 11:44:37 +08:00
parent 60836da3c2
commit 6084cd5a5b
3 changed files with 13 additions and 5 deletions

View File

@@ -35,5 +35,5 @@
}
]
},
"lastUpdated": 1775965240928
"lastUpdated": 1775965435808
}

View File

@@ -82,3 +82,14 @@ doJoinApp(wxCode: string, accessToken: string)
### 文件修改
- `src/passport/invite/index.tsx` - 按钮区分两种类型,已登录用普通 onClick
---
## 优化:已登录用户不强制勾选协议
### 改动
- 已登录用户点击「确认加入」时,不再检查 `agreementChecked`
- 未注册用户仍需勾选协议后才能授权手机号
### 文件修改
- `src/passport/invite/index.tsx` - `handleConfirmJoin` 移除协议检查

View File

@@ -130,12 +130,9 @@ const InvitePage: React.FC = () => {
/**
* 已登录用户:点击「确认加入」
* 不弹手机号授权,直接用 wx.login() 获取 code 调加入接口
* 不强制要求勾选协议
*/
const handleConfirmJoin = async () => {
if (!agreementChecked) {
Taro.showToast({ title: '请先同意服务协议和隐私政策', icon: 'none' });
return;
}
const accessToken = Taro.getStorageSync('access_token');
if (!accessToken) {
Taro.showToast({ title: '登录状态异常,请刷新重试', icon: 'none' });