From 02065bea56b68c16df5ac6435143e111b2f1882b Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 3 Apr 2024 09:24:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2--=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=88=90=E5=8A=9F=EF=BC=8C=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=8A=A0=E8=BD=BD=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/components/LoginForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index f442aaef1..89e1559a6 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -100,7 +100,7 @@ const iconLock = useIcon({ icon: 'ep:lock' }) const formLogin = ref() const { validForm } = useFormValid(formLogin) const { setLoginState, getLoginState } = useLoginState() -const { currentRoute, push } = useRouter() +const { currentRoute, push , replace} = useRouter() const permissionStore = usePermissionStore() const redirect = ref('') const loginLoading = ref(false) @@ -215,7 +215,7 @@ const handleLogin = async (params) => { window.location.href = window.location.href.replace('/login?redirect=', '') } else { console.log(redirect.value) - push({ path: redirect.value || permissionStore.addRouters[0].path }) + replace({ path: redirect.value || permissionStore.addRouters[0].path }) } // 存储 部门信息 const { wsCache } = useCache()