mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-11-26 20:43:37 +08:00
feat: 新增token过期 跳出提示框 并跳转登录页的逻辑
This commit is contained in:
@@ -122,7 +122,8 @@ router.beforeEach((to: ToRouteType, _from, next) => {
|
||||
}
|
||||
/** 如果已经登录并存在登录信息后不能跳转到路由白名单,而是继续保持在当前页面 */
|
||||
function toCorrectRoute() {
|
||||
whiteList.includes(to.fullPath) ? next(_from.fullPath) : next();
|
||||
/** 新增判断是否存在登录信息 */
|
||||
whiteList.includes(to.fullPath) && userInfo ? next(_from.fullPath) : next();
|
||||
}
|
||||
if (userInfo) {
|
||||
// 无权限跳转403页面
|
||||
|
||||
Reference in New Issue
Block a user