router.beforeEach((to, from, next) 里的next 加上路由就跳转不了了,页面白屏
![1***@qq.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/412bd6d28b24566c18c0ba13f59dbc07.png)
1***@qq.com
- 发布:2020-07-23 11:53
- 更新:2020-07-23 14:11
- 阅读:2797
1***@qq.com (作者)
页面白屏也没有报错
2020-07-23 14:12
1***@qq.com (作者)
router.beforeEach((to, from, next) => {
// router.push({name:'loging'})
if(to.meta.isLogin==true){
// if(uni.getStorageSync('userId')){
// next()
// }else{
// next({path:'/pages/loging/loging'})
// uni.navigateTo({
// url:'/pages/loging/loging'
// })
// this.$router.push({path:'/pages/loging/loging'})
// }
}else{
next()
})
就这个就白屏了
2020-07-23 14:34