From 78715f6712e85ab65ae4d31ac485f6dca14ec4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=BA=9A=E7=94=B7?= Date: Mon, 18 Oct 2021 09:57:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E7=BB=91=E6=8F=90=E7=A4=BA=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E7=A1=AE=E5=AE=9A=E9=80=80=E5=87=BA=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/mine.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pages/mine/mine.js b/pages/mine/mine.js index eab44b0..90abb37 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -26,12 +26,26 @@ Page({ }, // 解除绑定 unBind(){ - UserApi.wxUnbind().then(res=>{ - if(res.success){ - wx.showToast({ - title: res.result, - icon: "none" - }) + wx.showModal({ + cancelColor: '取消', + content: '确定解绑并退出登录?', + confirmColor: '#069F99', + success (res) { + if (res.confirm) { + UserApi.wxUnbind().then(res=>{ + if(res.success){ + wx.clearStorage() + wx.redirectTo({ + url: '../login/login', + }) + }else{ + wx.clearStorage() + wx.redirectTo({ + url: '../login/login', + }) + } + }) + } else if (res.cancel) {} } }) },