调整为app版本

This commit is contained in:
唐明明
2021-10-09 17:51:21 +08:00
parent 91a1ad3748
commit 452a397a77
7 changed files with 15 additions and 64 deletions

View File

@@ -23,16 +23,12 @@ 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(to.auth && token === ''){
next({
name: 'Login',
NAVTYPE: 'push',
params: {
toName: to.name
}