diff --git a/src/router/guard/permission-guard.js b/src/router/guard/permission-guard.js index 5a83f2e..76919ec 100644 --- a/src/router/guard/permission-guard.js +++ b/src/router/guard/permission-guard.js @@ -22,7 +22,7 @@ export function createPermissionGuard(router) { await userStore.getUserInfo().catch((error) => { removeToken() toLogin() - $message.error(`【${error.code}】 ${error.message}`) + $message.error(error.message || '获取用户信息失败!') return }) const accessRoutes = permissionStore.generateRoutes(userStore.role)