Skip to content

Commit b955f6f

Browse files
committed
fix(projects): fix login success notification
1 parent 00ab5df commit b955f6f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/hooks/common/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ export function useRouterPush(inSetup = true) {
102102
const redirect = route.value.query?.redirect as string;
103103

104104
if (needRedirect && redirect) {
105-
routerPush(redirect);
105+
await routerPush(redirect);
106106
} else {
107-
toHome();
107+
await toHome();
108108
}
109109
}
110110

src/store/modules/auth/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,10 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
7171
if (pass) {
7272
await redirectFromLogin(redirect);
7373

74-
if (routeStore.isInitAuthRoute) {
75-
window.$notification?.success({
76-
message: $t('page.login.common.loginSuccess'),
77-
description: $t('page.login.common.welcomeBack', { userName: userInfo.userName })
78-
});
79-
}
74+
window.$notification?.success({
75+
message: $t('page.login.common.loginSuccess'),
76+
description: $t('page.login.common.welcomeBack', { userName: userInfo.userName })
77+
});
8078
}
8179
} else {
8280
resetStore();

0 commit comments

Comments
 (0)