Browse Source

修复userInfoData空属性问题,修复buyState空属性问题

guessPrice
=chenming 5 years ago
parent
commit
ac7c8d1d89
2 changed files with 12 additions and 6 deletions
  1. +6
    -4
      496_dongfengqichen/pages/component/service/index.js
  2. +6
    -2
      496_dongfengqichen/pages/userMsg/userMsg.js

+ 6
- 4
496_dongfengqichen/pages/component/service/index.js View File

@@ -54,10 +54,12 @@ Component({
})
},
placingControl: function () {
if (app.globalData.getBuyState.success != this.data.buyState) {
this.setData({
buyState: app.globalData.getBuyState.success
})
if (app.globalData.getBuyState){
if (app.globalData.getBuyState.success != this.data.buyState) {
this.setData({
buyState: app.globalData.getBuyState.success
})
}
}
this.setData({
placing: !this.data.placing

+ 6
- 2
496_dongfengqichen/pages/userMsg/userMsg.js View File

@@ -199,11 +199,15 @@ Component({
if(this.data.userData.avatarUrl){
console.log("userData")
app.globalData.userInfoData.avatarUrl = this.data.userData.avatarUrl;
userInfoData.avatarUrl = this.data.userData.avatarUrl;
if(userInfoData){
userInfoData.avatarUrl = this.data.userData.avatarUrl;
}
}
if(this.data.userData.nickName){
app.globalData.userInfoData.nickName = this.data.userData.nickName;
userInfoData.nickName = this.data.userData.nickName;
if(userInfoData){
userInfoData.nickName = this.data.userData.nickName;
}
}
wx.setStorageSync('userInfoData', userInfoData)
}

Loading…
Cancel
Save