fix(projects): fix login success notification. fixed #688

This commit is contained in:
Soybean 2024-12-26 11:07:19 +08:00
parent 56760245d4
commit 60dd22624b
2 changed files with 7 additions and 9 deletions

View File

@ -102,9 +102,9 @@ export function useRouterPush(inSetup = true) {
const redirect = route.value.query?.redirect as string;
if (needRedirect && redirect) {
routerPush(redirect);
await routerPush(redirect);
} else {
toHome();
await toHome();
}
}

View File

@ -71,13 +71,11 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
if (pass) {
await redirectFromLogin(redirect);
if (routeStore.isInitAuthRoute) {
window.$notification?.success({
title: $t('page.login.common.loginSuccess'),
content: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
duration: 4500
});
}
window.$notification?.success({
title: $t('page.login.common.loginSuccess'),
content: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
duration: 4500
});
}
} else {
resetStore();