|
@@ -73,7 +73,7 @@ |
|
|
var userInfos = uni.getStorageSync('weapp_session_userInfo_data'); |
|
|
var userInfos = uni.getStorageSync('weapp_session_userInfo_data'); |
|
|
this.name = userInfos.name, |
|
|
this.name = userInfos.name, |
|
|
this.photo = userInfos.avatar, |
|
|
this.photo = userInfos.avatar, |
|
|
this.mobile = userInfos.loginName |
|
|
|
|
|
|
|
|
this.mobile = userInfos.username |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
//拨打电话 |
|
|
//拨打电话 |
|
@@ -97,15 +97,33 @@ |
|
|
showCancel: true, |
|
|
showCancel: true, |
|
|
success(res) { |
|
|
success(res) { |
|
|
if (res.confirm) { |
|
|
if (res.confirm) { |
|
|
app.Closewebsocke() |
|
|
|
|
|
uni.clearStorageSync(); //清除缓存 |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
icon: "none", |
|
|
|
|
|
title: "退出成功" |
|
|
|
|
|
}) |
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
url: '/pages/login/index' |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
uni.request({ |
|
|
|
|
|
url: config.service.logout, |
|
|
|
|
|
header: { |
|
|
|
|
|
'Authorization': 'Basic dGVzdDp0ZXN0', |
|
|
|
|
|
'content-type': 'application/x-www-form-urlencoded' |
|
|
|
|
|
}, |
|
|
|
|
|
method: "DELETE", |
|
|
|
|
|
success: function(result) { |
|
|
|
|
|
var data = result.data; //console.log("登陆信息", data); |
|
|
|
|
|
if(data.data==true){ |
|
|
|
|
|
app.Closewebsocke() |
|
|
|
|
|
uni.clearStorageSync(); //清除缓存 |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
icon: "none", |
|
|
|
|
|
title: "退出成功" |
|
|
|
|
|
}) |
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
url: '/pages/login/index' |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 响应错误 |
|
|
|
|
|
fail: function(loginResponseError) { |
|
|
|
|
|
util.showNone("网络异常,请重试"); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|