This commit is contained in:
2024-04-26 19:06:14 +08:00
parent a2f08641b9
commit 57e9cc8201
13 changed files with 81 additions and 47 deletions

View File

@@ -65,8 +65,11 @@ function createService() {
err("登录状态已过期,需要重新登录")
// 清楚本地localStorage
tool.local.clear()
// 移动到网站的根目录
window.location.href = "/"
// 移动到网站的根目录-这里不需要因为导航守卫可以返回login页面
if (error.response.data.data.code === 40001) {
} else {
window.location.href = "/"
}
break
case 403:
err("没有权限访问该资源")