diff --git a/.workbuddy/memory/MEMORY.md b/.workbuddy/memory/MEMORY.md new file mode 100644 index 0000000..e69de29 diff --git a/src/passport/qr-confirm/index.tsx b/src/passport/qr-confirm/index.tsx index 139294d..cf55689 100644 --- a/src/passport/qr-confirm/index.tsx +++ b/src/passport/qr-confirm/index.tsx @@ -166,10 +166,21 @@ const QRConfirmPage: React.FC = () => { }); if (res.data.success || res.data.status === 'confirmed') { - Taro.showToast({ title: '登录确认成功', icon: 'success', duration: 1500 }); + Taro.showToast({ title: '登录确认成功', icon: 'success', duration: 2000 }); setTimeout(() => { - Taro.switchTab({ url: '/pages/user/user' }); - }, 1500); + // 先隐藏 toast,避免影响页面跳转 + Taro.hideToast(); + Taro.switchTab({ + url: '/pages/user/user', + success: () => { + console.log('switchTab to /pages/user/user success'); + }, + fail: (err) => { + console.error('switchTab fail:', err); + Taro.showToast({ title: '页面跳转失败,请手动返回', icon: 'none' }); + } + }); + }, 1800); } else { Taro.showToast({ title: res.data.message || '登录确认失败', icon: 'none' }); }