Browse Source

no message

feature/v1.4
xpz2018 4 years ago
parent
commit
bbfa4e8fef
4 changed files with 4 additions and 14 deletions
  1. 4
      app.js
  2. 4
      pages/client/home/index.js
  3. 1
      pages/login/index.js
  4. 9
      pages/message/notification/index.js

4
app.js

@ -10,8 +10,6 @@ App({
token: null, token: null,
agenting: 1, agenting: 1,
keyboardHeight: 0, keyboardHeight: 0,
isIos: false,
msgIdList: [],
msgNumber: 0
isIos: false
} }
}) })

4
pages/client/home/index.js

@ -37,7 +37,9 @@ Component({
onRestart: function () { onRestart: function () {
this.setUserInfo() this.setUserInfo()
getBalanceInfo().then(result => { 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 => { }).catch(err => {
console.log(err) console.log(err)
}) })

1
pages/login/index.js

@ -171,7 +171,6 @@ Page({
wx.getUserProfile({ wx.getUserProfile({
desc: '业务需要', desc: '业务需要',
success: res => { success: res => {
console.log(res)
this.onGotUserInfo({detail: res }) this.onGotUserInfo({detail: res })
} }
}) })

9
pages/message/notification/index.js

@ -29,15 +29,6 @@ Component({
if(this.data.notice){ if(this.data.notice){
return 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 }) this.setData({ notice: true, message })
}, },
submit: function(e){ submit: function(e){

Loading…
Cancel
Save