Commit 7e0ea6d2 by 高淑倩

个人中心_plus

parent 9152106f
...@@ -55,7 +55,8 @@ Component({ ...@@ -55,7 +55,8 @@ Component({
currentMobile: '', currentMobile: '',
baseImgUrl: '', baseImgUrl: '',
storgeUserInfo: wx.getStorageSync('_baseUserInfo'), storgeUserInfo: wx.getStorageSync('_baseUserInfo'),
isPlusVip: false isPlusVip: false,
currentPlusStyle: null
}, },
observers: { observers: {
'**': function(e) { '**': function(e) {
...@@ -63,10 +64,16 @@ Component({ ...@@ -63,10 +64,16 @@ Component({
}, },
}, },
attached() { attached() {
const { isPlusVip, imageUrl } = app.globalData
const { personData } = this.data
this.setData({ this.setData({
personCenter: this.data.personData, personCenter: personData,
baseImgUrl: app.globalData.imageUrl, baseImgUrl: imageUrl,
isPlusVip: app.globalData.isPlusVip 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: { methods: {
......
...@@ -58,6 +58,6 @@ ...@@ -58,6 +58,6 @@
</view> </view>
<!--plus--> <!--plus-->
<view class='df tc person-num' wx:if='{{currentMobile}}'> <view class='df tc person-num' wx:if='{{currentMobile}}'>
<!--plus--> <image class="" src='{{currentPlusStyle.imageUrl}}' mode="widthFix" />
</view> </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