[代码完善](v2.5): v2.5 修改Token过期的提示

由原来的弹窗提示改为登录界面消息提示
This commit is contained in:
ZhengJie
2020-06-04 16:06:35 +08:00
parent acfb22bbab
commit ecf4ef987e
2 changed files with 22 additions and 13 deletions

View File

@@ -79,8 +79,12 @@ export default {
}
},
created() {
// 获取验证码
this.getCode()
// 获取用户名密码等Cookie
this.getCookie()
// token 过期提示
this.point()
},
methods: {
getCode() {
@@ -138,6 +142,18 @@ export default {
return false
}
})
},
point() {
const point = Cookies.get('point') !== undefined
if (point) {
this.$notify({
title: '提示',
message: '当前登录状态已过期,请重新登录!',
type: 'warning',
duration: 8000
})
Cookies.remove('point')
}
}
}
}