diff --git a/.workbuddy/expert-history.json b/.workbuddy/expert-history.json
index ada1496..f1765f6 100644
--- a/.workbuddy/expert-history.json
+++ b/.workbuddy/expert-history.json
@@ -13,5 +13,5 @@
}
]
},
- "lastUpdated": 1775585206027
+ "lastUpdated": 1775586324678
}
\ No newline at end of file
diff --git a/src/passport/qr-confirm/index.tsx b/src/passport/qr-confirm/index.tsx
index bc159ba..a5fcc5a 100644
--- a/src/passport/qr-confirm/index.tsx
+++ b/src/passport/qr-confirm/index.tsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
-import { View, Text, Button as TaroButton } from '@tarojs/components';
-import { Loading, Card } from '@nutui/nutui-react-taro';
+import { View, Text } from '@tarojs/components';
+import { Loading, Card, Button } from '@nutui/nutui-react-taro';
import { Success, Failure, Tips, User, Checklist } from '@nutui/icons-react-taro';
import Taro, { useRouter } from '@tarojs/taro';
import { confirmQRLogin } from '@/api/passport/qr-login';
@@ -95,20 +95,10 @@ const QRConfirmPage: React.FC = () => {
setLoginMethod('url');
}
- if (loginToken) {
- setToken(loginToken);
- console.log('[QRConfirm] 获取到 token:', loginToken);
-
- // 扫码场景:自动确认登录
- if (params.scene || params.token || params.qrCodeKey || params.q) {
- console.log('[QRConfirm] 检测到扫码参数,自动确认登录');
- setTimeout(() => {
- handleAutoConfirm(loginToken);
- }, 500);
- }
- } else {
- setError('无效的登录链接');
- }
+ // 扫码场景:直接显示授权登录界面
+ console.log('[QRConfirm] 显示授权登录界面');
+ setToken(loginToken);
+ setNeedAuth(true);
}, [router.params]);
/**
@@ -136,32 +126,11 @@ const QRConfirmPage: React.FC = () => {
console.log('[QRConfirm] loginByOpenId 结果:', wxLoginResult);
- // 3. 判断用户是否存在
- if (wxLoginResult.success && wxLoginResult.data && wxLoginResult.data.user) {
- // 用户已注册,检查是否绑定手机号
- const user = wxLoginResult.data.user;
- console.log('[QRConfirm] 用户已注册:', user);
-
- // 如果用户没有手机号,需要授权绑定
- if (!user.phone || user.phone === '') {
- console.log('[QRConfirm] 用户未绑定手机号,显示授权界面');
- setNeedAuth(true);
- setLoading(false);
- return;
- }
-
- // 用户已绑定手机号,保存用户信息并继续确认登录
- console.log('[QRConfirm] 用户已绑定手机号,开始确认登录...');
- setUserInfo(user);
-
- // 调用确认登录
- await handleConfirmLogin(loginToken, user);
- } else {
- // 用户未注册,显示手机号授权界面
- console.log('[QRConfirm] 用户未注册,显示手机号授权界面');
- setNeedAuth(true);
- setLoading(false);
- }
+ // 3. 统一显示授权登录界面,让用户一键授权完成登录
+ // 无论用户是否注册、是否绑定手机号,都走授权登录流程
+ console.log('[QRConfirm] 显示手机号授权登录界面');
+ setNeedAuth(true);
+ setLoading(false);
} catch (err: any) {
console.error('[QRConfirm] 自动确认登录失败:', err);
setError(err.message || '自动确认登录失败');
@@ -468,12 +437,12 @@ const QRConfirmPage: React.FC = () => {
5. 协议修改
我们有权在必要时修改本协议,修改后的协议将在公布时立即生效。
-
我知道了
-
+
);
}
@@ -497,12 +466,12 @@ const QRConfirmPage: React.FC = () => {
5. 联系我们
如有任何隐私相关问题,请联系我们。
-
我知道了
-
+
);
}
@@ -513,50 +482,38 @@ const QRConfirmPage: React.FC = () => {
// 授权登录页面(参考权大师风格)
const renderAuthPage = () => {
return (
-
- {/* 顶部导航 */}
-
-
- 请登录
-
-
+
{/* Logo 区域 */}
{/* Logo */}
-
+
{/* 品牌名 */}
- 权大师
+ websopy
{/* 标语 */}
- 让知识产权更简单
+ 构建下一代 AI 应用
{/* 底部操作区域 */}
{/* 主按钮 - 手机号授权登录 */}
-
- {authLoading ? '授权中...' : '手机号授权登录'}
-
+
+
+
+ {/**/}
{/* 取消按钮 */}