mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): fix router when the dynamic routes api was failed [修复当动态路由接口失败后路由异常问题]
This commit is contained in:
@ -52,6 +52,7 @@ export const useAuthStore = defineStore('auth-store', {
|
||||
* @param backendToken - 返回的token
|
||||
*/
|
||||
async handleActionAfterLogin(backendToken: ApiAuth.Token) {
|
||||
const route = useRouteStore();
|
||||
const { toLoginRedirect } = useRouterPush(false);
|
||||
|
||||
const loginSuccess = await this.loginByToken(backendToken);
|
||||
@ -61,11 +62,13 @@ export const useAuthStore = defineStore('auth-store', {
|
||||
toLoginRedirect();
|
||||
|
||||
// 登录成功弹出欢迎提示
|
||||
window.$notification?.success({
|
||||
title: '登录成功!',
|
||||
content: `欢迎回来,${this.userInfo.userName}!`,
|
||||
duration: 3000
|
||||
});
|
||||
if (route.isInitAuthRoute) {
|
||||
window.$notification?.success({
|
||||
title: '登录成功!',
|
||||
content: `欢迎回来,${this.userInfo.userName}!`,
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user