fix(projects): fix login success notification. fixed #688
This commit is contained in:
parent
56760245d4
commit
60dd22624b
@ -102,9 +102,9 @@ export function useRouterPush(inSetup = true) {
|
|||||||
const redirect = route.value.query?.redirect as string;
|
const redirect = route.value.query?.redirect as string;
|
||||||
|
|
||||||
if (needRedirect && redirect) {
|
if (needRedirect && redirect) {
|
||||||
routerPush(redirect);
|
await routerPush(redirect);
|
||||||
} else {
|
} else {
|
||||||
toHome();
|
await toHome();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,13 +71,11 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
|||||||
if (pass) {
|
if (pass) {
|
||||||
await redirectFromLogin(redirect);
|
await redirectFromLogin(redirect);
|
||||||
|
|
||||||
if (routeStore.isInitAuthRoute) {
|
window.$notification?.success({
|
||||||
window.$notification?.success({
|
title: $t('page.login.common.loginSuccess'),
|
||||||
title: $t('page.login.common.loginSuccess'),
|
content: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
|
||||||
content: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
|
duration: 4500
|
||||||
duration: 4500
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resetStore();
|
resetStore();
|
||||||
|
Loading…
Reference in New Issue
Block a user