@@ -109,21 +109,65 @@
title: '系统提示',
content: '是否确认退出登录?',
success (res) {
+ uni.showLoading({
+ title:'正在退出登录中',
+ icon:'none',
+ mask:true
+ })
if (res.confirm) {
- logout().then(res=>{
- if(res.data.code===200&&res.data.msg==="退出成功"){
- uni.reLaunch({
- url:'/pages/home/home'
- })
- }
+ try{
+ logout().then(res=>{
+ if(res.data.code===200&&res.data.msg==="退出成功"){
+ uni.hideLoading()
+ uni.reLaunch({
+ url:'/pages/home/home'
+ }
+ }catch(err){
+
} else if (res.cancel) {
console.log('用户点击取消')
}
+ //#endif
+ //#ifndef MP-WEIXIN
+ uni.showModal({
+ title: '系统提示',
+ content: '是否确认退出登录?',
+ success (res) {
+ if (res.confirm) {
+ } else if (res.cancel) {
+ console.log('用户点击取消')
})
//#endif
-
},
onLoad() {