jiazhipeng 3 months ago
parent
commit
3881a23aab
  1. 2
      app.js
  2. 28
      pages/user/logout/index.js
  3. 2
      pages/user/user.js

2
app.js

@ -39,7 +39,7 @@ App({
// 获取前端配置文件 // 获取前端配置文件
commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest159? true : false; data.isTest = data.isTest160? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

28
pages/user/logout/index.js

@ -43,17 +43,23 @@ Page({
if (res.confirm) { if (res.confirm) {
common.user_post('uservice/user/user_logout', { protocol: that.data.protocol ? 1 : 0 }).then(res => { common.user_post('uservice/user/user_logout', { protocol: that.data.protocol ? 1 : 0 }).then(res => {
if (res) { if (res) {
wx.showToast({ if (res.code === 1) {
title: res.msg, wx.showModal({
icon: 'none' title: '提示',
}) content: res.msg,
if (res.code === 1) { showCancel: false,
setTimeout(() => { complete: () => {
wx.switchTab({ wx.switchTab({
url: '/pages/user/user', url: '/pages/user/user',
}) })
}, 400) }
} })
} else {
wx.showModal({
title: res.msg,
icon: 'none'
})
}
} }
}) })

2
pages/user/user.js

@ -83,6 +83,8 @@ Page({
this.setData({ this.setData({
info: res.data info: res.data
}) })
} else{
this.setData({info: null})
} }
}) })
util.pagePoint({ util.pagePoint({

Loading…
Cancel
Save