Merge branch 'hi-ucs-dev' of http://124.222.94.39:3000/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
05c93f9dd9
|
@ -575,13 +575,13 @@ router.beforeEach((to, from, next) => {
|
|||
// 定义失效时间
|
||||
const timeOver = 2 * 60 * 60 * 1000
|
||||
let date = new Date().getTime()
|
||||
if (date - tokenStartTime > timeOver) {
|
||||
if (date - tokenStartTime > timeOver && token) {
|
||||
message.warning('登录失效,请重新登录!')
|
||||
token = null
|
||||
}
|
||||
console.log('判断token失效', token, date - tokenStartTime > timeOver)
|
||||
if (!token) {
|
||||
if (to.path == '/login') return next()
|
||||
message.warning('登录失效,请重新登录!')
|
||||
return next('/login')
|
||||
} else if (to.path == '/login') {
|
||||
return next('/home')
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue