From e70aa7e3e68a428ab730fc87d020bcdc8bd1213a Mon Sep 17 00:00:00 2001 From: ozh Date: Thu, 17 Sep 2026 10:53:49 +0800 Subject: [PATCH] =?UTF-8?q?feat(mine):=20=E6=9C=AA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E7=82=B9=E5=A4=B4=E5=83=8F=E5=8C=BA=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=EF=BC=8C=E5=89=AF=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E3=80=8C=E7=82=B9=E5=87=BB=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mine/index.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pages/mine/index.tsx b/src/pages/mine/index.tsx index 47ee92c..d8dd49b 100644 --- a/src/pages/mine/index.tsx +++ b/src/pages/mine/index.tsx @@ -13,6 +13,12 @@ export default function Mine() { const dispatch = useDispatch() const toast = useToast() const user = useAppSelector((s) => s.auth.userInfo) + const loggedOut = !user + + const goLogin = () => { + if (!loggedOut) return + reLaunch(ROUTES.LOGIN) + } const logout = () => { dispatch(clearAuth()) @@ -23,7 +29,8 @@ export default function Mine() { return ( - + {/* 未登录点头像区跳登录页;已登录无交互 */} + {user?.avatar ? ( ) : ( @@ -33,7 +40,7 @@ export default function Mine() { )} {user?.nickName ?? '未登录'} - 微信登录 + {loggedOut ? '点击登录' : '微信登录'}