Skip to content

Commit 0c27e70

Browse files
committed
🎨
1 parent f07ba83 commit 0c27e70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

middleware/auth.js

Lines changed: 2 additions & 1 deletion
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-
app.$api.isAuth().then(res => {
6+
return app.$api.isAuth().then(res => {
77
if (res.s === 1) {
88
if (res.d.isExpired) { // 过期 移除登陆验证信息
99
app.$utils.removeAuthInfo(context)
@@ -19,4 +19,5 @@ export default function (context) {
1919
}
2020
})
2121
}
22+
return Promise.resolve()
2223
}

0 commit comments

Comments
 (0)