Commit 7e0ea6d2 by 高淑倩

个人中心_plus

parent 9152106f
......@@ -55,7 +55,8 @@ Component({
currentMobile: '',
baseImgUrl: '',
storgeUserInfo: wx.getStorageSync('_baseUserInfo'),
isPlusVip: false
isPlusVip: false,
currentPlusStyle: null
},
observers: {
'**': function(e) {
......@@ -63,10 +64,16 @@ Component({
},
},
attached() {
const { isPlusVip, imageUrl } = app.globalData
const { personData } = this.data
this.setData({
personCenter: this.data.personData,
baseImgUrl: app.globalData.imageUrl,
isPlusVip: app.globalData.isPlusVip
personCenter: personData,
baseImgUrl: imageUrl,
isPlusVip,
currentPlusStyle: isPlusVip ? personData.plus.filter(item=> item.purchased == 1)[0] : personData.plus.filter(item=> item.purchased == 0)[1]
},()=> {
console.log('aaaaaaaaaa', this.data.currentPlusStyle)
})
},
methods: {
......
......@@ -58,6 +58,6 @@
</view>
<!--plus-->
<view class='df tc person-num' wx:if='{{currentMobile}}'>
<!--plus-->
<image class="" src='{{currentPlusStyle.imageUrl}}' mode="widthFix" />
</view>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment