This commit is contained in:
唐明明
2021-09-30 16:15:25 +08:00
parent 0ea0621005
commit 60f17db750

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({