|
@@ -27,5 +27,26 @@ Page({
|
|
|
confirmColor: '#333',
|
|
|
showCancel: false
|
|
|
})
|
|
|
+ },
|
|
|
+
|
|
|
+ handleLogout () {
|
|
|
+ wx.showModal({
|
|
|
+ content: '确认退出吗?',
|
|
|
+ confirmColor: '#333',
|
|
|
+ cancelColor: '#666',
|
|
|
+ success (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ wx.exitMiniProgram({
|
|
|
+ success () {
|
|
|
+ app.globalData.accessToken = ''
|
|
|
+ app.globalData.userInfo.login = false
|
|
|
+ app.globalData.userInfo.userName = ''
|
|
|
+ app.globalData.userInfo.phoneNumber = ''
|
|
|
+ app.globalData.userInfo.headImg = ''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|