|
@@ -26,23 +26,39 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
tuichu() {
|
|
|
- wx.request({
|
|
|
- url: app.globalData.publicUrl + '/applet/unbind',
|
|
|
- method: "GET",
|
|
|
- data: {
|
|
|
- appletsId: wx.getStorageSync('openId')
|
|
|
- },
|
|
|
- success: (res) => {
|
|
|
- if (res.data.code == 0) {
|
|
|
- wx.clearStorageSync();
|
|
|
- wx.switchTab({
|
|
|
- url: '/pages/index/index',
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: true,
|
|
|
+ content: "您确认要退出吗?",
|
|
|
+ success(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ wx.showLoading({
|
|
|
+ mask: true,
|
|
|
+ title: '退出中',
|
|
|
+ })
|
|
|
+ wx.request({
|
|
|
+ url: app.globalData.publicUrl + '/applet/unbind',
|
|
|
+ method: "GET",
|
|
|
+ data: {
|
|
|
+ appletsId: wx.getStorageSync('openId')
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ wx.hideLoading()
|
|
|
+ wx.clearStorageSync();
|
|
|
+ wx.switchTab({
|
|
|
+ url: '/pages/index/index',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail:()=>{
|
|
|
+ wx.hideLoading()
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
onShow() {
|
|
|
console.log(wx.getStorageSync('user'), "打印");
|
|
|
if (wx.getStorageSync('user') == '') {
|
|
@@ -67,5 +83,4 @@ Page({
|
|
|
onLoad() {
|
|
|
|
|
|
}
|
|
|
-
|
|
|
})
|