退出登录跳到扫码页
This commit is contained in:
@@ -500,6 +500,7 @@ export default {
|
|||||||
uni.clearStorageSync();
|
uni.clearStorageSync();
|
||||||
uni.showToast({ title: '已退出登录', icon: 'success' });
|
uni.showToast({ title: '已退出登录', icon: 'success' });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
uni.setStorageSync('__logout_flag', true);
|
||||||
uni.reLaunch({ url: '/pages/index/scan' });
|
uni.reLaunch({ url: '/pages/index/scan' });
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
// 退出登录后跳转过来,清除标记,停留在扫码页
|
||||||
|
if (uni.getStorageSync('__logout_flag')) {
|
||||||
|
uni.removeStorageSync('__logout_flag');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 1. 检查 JWT(App.vue 已处理首次跳转,这里兜底)
|
// 1. 检查 JWT(App.vue 已处理首次跳转,这里兜底)
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
if (!token) {
|
if (!token) {
|
||||||
|
|||||||
Reference in New Issue
Block a user