From 3fafc002e3a4305412def266b427de2d9634fe10 Mon Sep 17 00:00:00 2001 From: lijun Date: Fri, 17 Oct 2025 20:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=86=E7=A0=81=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Login.vue | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/views/Login.vue b/src/views/Login.vue index d7cd83e..4fa1cf5 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -69,16 +69,16 @@ const param = reactive({ password: defParam ? defParam.password : "", }); -// onMounted(async () => { -// // 保存登录参数到本地存储 -// let res = await getMyUserInfo(localStorage.getItem("userId")); -// if(res.code === 0){ -// // 如果已经登录,跳转到用户页面 -// router.push("/user"); -// }else{ -// window.location.href = "https://sv.ljsea.top/#/login?site=gs-vp"; //https://sv.ljsea.top/ -// } -// }); +onMounted(async () => { + // 保存登录参数到本地存储 + let res = await getMyUserInfo(localStorage.getItem("userId")); + if(res.code === 0){ + // 如果已经登录,跳转到用户页面 + router.push("/user"); + }else{ + window.location.href = "https://sv.ljsea.top/#/login?site=gs-vp"; //https://sv.ljsea.top/ + } + }); // 表单验证规则 const rules = {