退出
This commit is contained in:
parent
12125dfaf9
commit
93d3baec6c
@ -295,43 +295,6 @@
|
|||||||
})
|
})
|
||||||
this.showhome = false
|
this.showhome = false
|
||||||
},
|
},
|
||||||
remove() {
|
|
||||||
let that = this
|
|
||||||
const value = uni.getStorageSync('patientId');
|
|
||||||
if (value) {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '确认要退出此账号吗',
|
|
||||||
success: function(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
uni.clearStorageSync();
|
|
||||||
that.$refs.uToast.show({
|
|
||||||
title: '退出账号成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: '1000'
|
|
||||||
})
|
|
||||||
createMobileToken().then(res => {
|
|
||||||
uni.setStorageSync("token", res.data.token)
|
|
||||||
})
|
|
||||||
if (that.timer) {
|
|
||||||
clearTimeout(that.timer)
|
|
||||||
}
|
|
||||||
that.timer = setTimeout(e => {
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/homepage/homepage'
|
|
||||||
})
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
that.$refs.uToast.show({
|
|
||||||
title: '您未登录,请先登录',
|
|
||||||
type: 'error',
|
|
||||||
duration: '1000'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
removes() {
|
removes() {
|
||||||
this.appPersonallist = null
|
this.appPersonallist = null
|
||||||
// uni.removeStorageSync('patientId');
|
// uni.removeStorageSync('patientId');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user