|
@@ -54,36 +54,36 @@ router.beforeEach((to, from, next) => {
|
|
|
console.log('无openId')
|
|
|
getWxOpenId().then(() => {
|
|
|
|
|
|
- // if(to.path == '/' && from.path == '/') {
|
|
|
- // if(sessionstorage.getItem("isReload") === 'isReloadVlaue'){
|
|
|
- // next()
|
|
|
- // window.location.reload()
|
|
|
- // console.log('有isReloadVlaue')
|
|
|
- // }else{
|
|
|
- // sessionStorage.setItem("isReload",'isReloadVlaue')
|
|
|
- // next()
|
|
|
- // console.log('无isReloadVlaue')
|
|
|
- // }
|
|
|
- // }else {
|
|
|
+ if(to.path == '/' && from.path == '/') {
|
|
|
+ if(localStorage.getItem("isReload") === 'isReloadVlaue'){
|
|
|
+ next()
|
|
|
+ window.location.reload()
|
|
|
+ console.log('有isReloadVlaue')
|
|
|
+ }else{
|
|
|
+ localStorage.setItem("isReload",'isReloadVlaue')
|
|
|
+ next()
|
|
|
+ console.log('无isReloadVlaue')
|
|
|
+ }
|
|
|
+ }else {
|
|
|
next()
|
|
|
- // }
|
|
|
+ }
|
|
|
})
|
|
|
console.log('overallExample.getOpenid()走完了')
|
|
|
} else {
|
|
|
console.log('什么都有')
|
|
|
- // if(to.path == '/' && from.path == '/') {
|
|
|
- // if(sessionstorage.getItem("isReload") === 'isReloadVlaue'){
|
|
|
- // next()
|
|
|
- // window.location.reload()
|
|
|
- // console.log('有isReloadVlaue')
|
|
|
- // }else{
|
|
|
- // sessionStorage.setItem("isReload",'isReloadVlaue')
|
|
|
- // next()
|
|
|
- // console.log('无isReloadVlaue')
|
|
|
- // }
|
|
|
- // }else {
|
|
|
+ if(to.path == '/' && from.path == '/') {
|
|
|
+ if(localStorage.getItem("isReload") === 'isReloadVlaue'){
|
|
|
+ next()
|
|
|
+ window.location.reload()
|
|
|
+ console.log('有isReloadVlaue')
|
|
|
+ }else{
|
|
|
+ localStorage.setItem("isReload",'isReloadVlaue')
|
|
|
+ next()
|
|
|
+ console.log('无isReloadVlaue')
|
|
|
+ }
|
|
|
+ }else {
|
|
|
next()
|
|
|
- // }
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
console.log('无登录权限')
|