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