调整拦截器

This commit is contained in:
唐明明
2021-09-30 15:46:10 +08:00
parent 965dc755e4
commit 7dc1e0384b
173 changed files with 5 additions and 84 deletions

View File

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