diff --git a/app.js b/app.js index 64fd4cf..b60a441 100644 --- a/app.js +++ b/app.js @@ -10,8 +10,6 @@ App({ token: null, agenting: 1, keyboardHeight: 0, - isIos: false, - msgIdList: [], - msgNumber: 0 + isIos: false } }) \ No newline at end of file diff --git a/pages/client/home/index.js b/pages/client/home/index.js index 444fec6..07871c3 100644 --- a/pages/client/home/index.js +++ b/pages/client/home/index.js @@ -37,7 +37,9 @@ Component({ onRestart: function () { this.setUserInfo() getBalanceInfo().then(result => { - this.setData({ xsaccountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney) }) + if(result.data){ + this.setData({ xsaccountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney) }) + } }).catch(err => { console.log(err) }) diff --git a/pages/login/index.js b/pages/login/index.js index e91efb5..dd0d901 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -171,7 +171,6 @@ Page({ wx.getUserProfile({ desc: '业务需要', success: res => { - console.log(res) this.onGotUserInfo({detail: res }) } }) diff --git a/pages/message/notification/index.js b/pages/message/notification/index.js index ae4d4e9..1859f69 100644 --- a/pages/message/notification/index.js +++ b/pages/message/notification/index.js @@ -29,15 +29,6 @@ Component({ if(this.data.notice){ return } - var index = app.globalData.msgIdList.indexOf(message.id) - if(index >= 0){ - app.globalData.msgNumber += 1 - if(app.globalData.msgNumber >= 60){ - app.globalData.msgIdList.splice(index, 1); - } - return - } - app.globalData.msgNumber = 0 this.setData({ notice: true, message }) }, submit: function(e){