This commit is contained in:
2021-10-11 09:30:02 +08:00
parent f77b3a1d72
commit c5605c568d

View File

@@ -24,11 +24,11 @@ const router = createRouter({
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
const token = store.getters.getToken || uni.getStorageSync('token') const token = store.getters.getToken || uni.getStorageSync('token')
// 检查是否需要微信授权 // 检查是否需要微信授权
if(store.getters.getCode === '' && to.name != 'wxAuth'){ // if(store.getters.getCode === '' && to.name != 'wxAuth'){
next({ // next({
name: 'wxAuth' // name: 'wxAuth'
}) // })
} // }
// 检查是否需要登录 // 检查是否需要登录
if(to.auth && token === ''){ if(to.auth && token === ''){
next({ next({