[...]
This commit is contained in:
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user