用户端不要强制用户输入手机号

This commit is contained in:
2026-07-15 19:57:06 +08:00
parent f15d2057f2
commit 0f5f0f4c2b
14 changed files with 167 additions and 71 deletions
+23 -7
View File
@@ -121,17 +121,18 @@ export default function LoginPage() {
}
function handleWechatLoginResult(result: WechatLoginResult, wxInfo?: MiniWechatProfile | null) {
// 微信授权成功即登录;手机号改为下单页可选绑定
if (result.accessToken) {
applySessionAndLeave(result, undefined, wxInfo);
return;
}
if (result.needBindPhone && result.wxSessionKey) {
setBindMode(true);
setWxSessionKey(result.wxSessionKey);
setMsg('微信授权成功,绑定手机号完成登录');
setMsg('微信授权成功,绑定手机号(也可跳过,稍后在下单时再绑定)');
setSentHint('');
return;
}
if (result.accessToken) {
applySessionAndLeave(result, undefined, wxInfo);
return;
}
setMsg('微信登录未完成,请重试或使用手机号登录');
}
@@ -286,13 +287,17 @@ export default function LoginPage() {
<View className="login-welcome">
<Text className="login-welcome-title">
{completeMode === 'phone'
? '完成手机验证'
? '建议绑定手机号'
: completeMode === 'wechat'
? '完成微信授权'
: '欢迎来到杜康好客'}
</Text>
<Text className="login-welcome-sub">
{completeMode ? '完成后将返回继续支付' : '买美酒,享好礼'}
{completeMode === 'phone'
? '便于订单通知与售后,也可稍后绑定'
: completeMode === 'wechat'
? '完成后将返回继续支付'
: '买美酒,享好礼'}
</Text>
</View>
</View>
@@ -365,6 +370,17 @@ export default function LoginPage() {
: '登录'}
</Text>
</View>
{completeMode === 'phone' ? (
<View
className="login-skip-bind"
onClick={() => finishLoginNavigate(returnTo)}
style={{ marginTop: 12, textAlign: 'center' }}
>
<Text className="u-muted" style={{ fontSize: 14 }}>
</Text>
</View>
) : null}
</View>
)}