修复登录失效,再次登录丢失参数

This commit is contained in:
deary
2024-05-17 11:44:33 +08:00
parent 9b00aaff93
commit 0c620ef5b4
2 changed files with 4 additions and 2 deletions

View File

@ -130,7 +130,8 @@ const handleLogin = () => {
// 调用action的登录方法
const [err] = await to(userStore.login(loginForm.value));
if (!err) {
await router.push({ path: redirect.value || '/' });
const redirectUrl = redirect.value || '/';
await router.push(redirectUrl);
loading.value = false;
} else {
loading.value = false;