From 3d1330758959cb96a3edbb14f5a340bfb9f306dc Mon Sep 17 00:00:00 2001 From: xiaowang Date: Wed, 25 Feb 2026 19:30:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=B8=AA=E7=99=BB=E5=BD=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=9A=84=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/src/views/AuthView.vue | 39 +++++++++++++++++++++ Frontend/src/views/admin/AdminLoginView.vue | 13 ++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/Frontend/src/views/AuthView.vue b/Frontend/src/views/AuthView.vue index fc089703..07f44230 100644 --- a/Frontend/src/views/AuthView.vue +++ b/Frontend/src/views/AuthView.vue @@ -134,6 +134,10 @@ + +
+ +
@@ -263,6 +267,22 @@ const handleQQLogin = () => { message.info('QQ登录功能开发中') } +const handleAdminLogin = () => { + console.log('跳转到管理后台登录') + localStorage.removeItem('accessToken') + localStorage.removeItem('refreshToken') + localStorage.removeItem('userInfo') + localStorage.removeItem('adminAccessToken') + localStorage.removeItem('adminRefreshToken') + localStorage.removeItem('adminUserInfo') + sessionStorage.removeItem('accessToken') + sessionStorage.removeItem('adminAccessToken') + + setTimeout(() => { + window.location.href = '/admin/login' + }, 100) +} + onMounted(() => { fetchShops() }) @@ -393,4 +413,23 @@ onMounted(() => { border-color: #667eea; color: #667eea; } + +.admin-login { + text-align: center; + margin-top: 20px; + padding-top: 20px; + border-top: 1px solid #f0f0f0; +} + +.admin-login-link { + color: #667eea; + font-size: 14px; + cursor: pointer; + transition: all 0.3s; +} + +.admin-login-link:hover { + color: #764ba2; + text-decoration: underline; +} \ No newline at end of file diff --git a/Frontend/src/views/admin/AdminLoginView.vue b/Frontend/src/views/admin/AdminLoginView.vue index 76938d21..3cc65fa1 100644 --- a/Frontend/src/views/admin/AdminLoginView.vue +++ b/Frontend/src/views/admin/AdminLoginView.vue @@ -104,7 +104,18 @@ const handleLogin = async () => { } const goToFrontend = () => { - router.push('/') + localStorage.removeItem('adminAccessToken') + localStorage.removeItem('adminRefreshToken') + localStorage.removeItem('adminUserInfo') + localStorage.removeItem('accessToken') + localStorage.removeItem('refreshToken') + localStorage.removeItem('userInfo') + sessionStorage.removeItem('adminAccessToken') + sessionStorage.removeItem('accessToken') + + setTimeout(() => { + window.location.href = '/auth' + }, 100) }