页面跳转验证拦截器 在小程序里无效
duan1v opened this issue · comments
duan1v commented
h5可以拦截到登录页,但是在微信小程序中不行,getToken()为空也能到list页;pemission.ts 中的invoke方法好像都没有调用
duan1v commented
App.vue 中 修改
onShow(() => {
// #ifdef MP-WEIXIN
//微信小程序tabpages登陆拦截,app无需
if (uni.$u.test.isEmpty(getToken())) {
//跳转登陆页
uni.reLaunch({ url: '/pages/common/login/index' });
}
// #endif
});