This commit is contained in:
曹辉 2023-05-10 10:26:57 +08:00
parent bfd0ec4f94
commit 6f83cdda89
3 changed files with 4 additions and 14 deletions

View File

@ -15,10 +15,7 @@ var request = function(config) {
}, },
success(res) { success(res) {
if (res.data.code == 9999) { if (res.data.code == 9999) {
uni.removeStorageSync('token'); uni.clearStorageSync();
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
let pages = getCurrentPages(); let pages = getCurrentPages();
let path = pages[pages.length - 1].$page.fullPath let path = pages[pages.length - 1].$page.fullPath
let paths = path.split('?') let paths = path.split('?')

View File

@ -186,10 +186,7 @@
content: '确认要退出此账号吗', content: '确认要退出此账号吗',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
uni.removeStorageSync('patientId'); uni.clearStorageSync();
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.removeStorageSync('token');
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '退出账号成功', title: '退出账号成功',
type: 'success', type: 'success',

View File

@ -26,11 +26,7 @@
timer: null, timer: null,
}; };
}, },
onShow() { onShow() {},
uni.removeStorageSync('openid');
uni.removeStorageSync('patientId');
uni.removeStorageSync('phone');
},
//1. //1.
onShareAppMessage(res) { onShareAppMessage(res) {
let pages = getCurrentPages(); let pages = getCurrentPages();
@ -93,8 +89,8 @@
}) })
}, },
pwdlogin() { pwdlogin() {
uni.removeStorageSync('token');
var that = this var that = this
uni.clearStorageSync();
createMobileToken().then(res => { createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token) uni.setStorageSync("token", res.data.token)
that.login() that.login()