fix(projects): 🐛 fix login success notification. (#45)

This commit is contained in:
一寸灰
2025-01-03 21:55:38 +08:00
committed by GitHub
parent 312c0e217f
commit c94c8454b2
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'),
message: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
duration: 4500
});
}
window.$notification?.success({
title: $t('page.login.common.loginSuccess'),
message: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
duration: 4500
});
}
} else {
resetStore();