Skip to content

Commit 9621f7d

Browse files
committed
🎨 权限验证中间件
1 parent 534e03b commit 9621f7d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

middleware/auth.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default function (context) {
33
const cookiesToken = app.$cookies.get('token')
44
if (cookiesToken) {
55
// 每次跳转路由 验证登录状态是否过期
6-
return app.$api.isAuth().then(res => {
6+
app.$api.isAuth().then(res => {
77
if (res.s === 1) {
88
if (res.d.isExpired) { // 过期 移除登陆验证信息
99
app.$utils.removeAuthInfo(context)
@@ -19,5 +19,4 @@ export default function (context) {
1919
}
2020
})
2121
}
22-
return Promise.resolve()
2322
}

0 commit comments

Comments
 (0)