diff --git a/router.js b/router.js index dc5fd9f..59a4d4b 100644 --- a/router.js +++ b/router.js @@ -74,13 +74,23 @@ router.beforeEach((to, from, next) => { // #endif - console.log(to,from, 'beforeEach---开始跳转') let index = whiteList.findIndex((item) => from.path.includes(item)) if (index == -1 && !store.getters.token) { Cache.set(BACK_URL, from.fullPath) } if (to.meta.auth && !store.getters.token) { + // #ifdef APP-PLUS + next(false) + uni.navigateTo({ + url: '/pages/login/login' + }) + // #endif + // #ifdef H5 next('/pages/login/login'); + // #endif + // #ifdef MP + next('/pages/login/login'); + // #endif return } else { next()