访客模式
This commit is contained in:
parent
29ace46c69
commit
2c1070d4e2
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-01 17:23:11
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-10-11 13:59:18
|
||||
* @LastEditors: Light
|
||||
* @LastEditTime: 2022-10-17 09:25:32
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
/**
|
||||
|
@ -26,7 +26,6 @@ router.beforeEach(async (to, from, next) => {
|
|||
// if (SSOTOKEN) {
|
||||
// setAccessToken(SSOTOKEN)
|
||||
// }
|
||||
console.log('验证白名单', routesWhiteList)
|
||||
const token = getAccessToken()
|
||||
console.log('token', token)
|
||||
let hasToken = token
|
||||
|
@ -44,6 +43,7 @@ router.beforeEach(async (to, from, next) => {
|
|||
accessRoutes.forEach((item) => {
|
||||
router.addRoute(item)
|
||||
})
|
||||
console.log('验证白名单', routesWhiteList)
|
||||
if (routesWhiteList.indexOf(to.path) !== -1) {
|
||||
debugger
|
||||
next()
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
password: Encrypt(this.form.password),
|
||||
username: this.form.username,
|
||||
})
|
||||
window.localStorage.setItem('tokenStartTime', new Date().getTime())
|
||||
// window.localStorage.setItem('tokenStartTime', new Date().getTime())
|
||||
window.sessionStorage.setItem('visits', JSON.stringify([]))
|
||||
console.log(
|
||||
'添加visits========================================>',
|
||||
|
|
Loading…
Reference in New Issue