Merge branch 'hi-ucs-dev' of http://124.222.94.39:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-10-10 15:45:50 +08:00
commit 05c93f9dd9
2 changed files with 896 additions and 785 deletions

View File

@ -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