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()