| @@ -27,7 +27,10 @@ Page({ | |||||
| detailPicture: [], | detailPicture: [], | ||||
| coverPicture: [], | coverPicture: [], | ||||
| swiperCurrent: 0, | swiperCurrent: 0, | ||||
| showTime: true | |||||
| showTime: true, | |||||
| limitCondition: "", | |||||
| minLimit: 0, | |||||
| maxLimit: 0 | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -223,6 +226,21 @@ Page({ | |||||
| coverPicture: JSON.parse(res.data.coverPicture) | coverPicture: JSON.parse(res.data.coverPicture) | ||||
| }) | }) | ||||
| } | } | ||||
| if (res && res.data && res.data.conditions) { | |||||
| that.setData({ | |||||
| limitCondition: JSON.parse(res.data.conditions).type | |||||
| }) | |||||
| if (JSON.parse(res.data.conditions).type == 2 && (JSON.parse(res.data.conditions).min || JSON.parse(res.data.conditions).min == 0)) { | |||||
| that.setData({ | |||||
| minLimit: JSON.parse(res.data.conditions).min | |||||
| }) | |||||
| } | |||||
| if (JSON.parse(res.data.conditions).type == 2 && (JSON.parse(res.data.conditions).max) || JSON.parse(res.data.conditions).max == 0) { | |||||
| that.setData({ | |||||
| maxLimit: JSON.parse(res.data.conditions).max | |||||
| }) | |||||
| } | |||||
| } | |||||
| wx.setNavigationBarTitle({ | wx.setNavigationBarTitle({ | ||||
| title: res.data.title | title: res.data.title | ||||
| }) | }) | ||||
| @@ -31,6 +31,12 @@ | |||||
| <text class='txt01'>限购条件:</text> | <text class='txt01'>限购条件:</text> | ||||
| <text class='time'>每人{{data.useLimitQuantity}}张</text> | <text class='time'>每人{{data.useLimitQuantity}}张</text> | ||||
| </view> | </view> | ||||
| <view class='rest' wx:if="{{limitCondition}}"> | |||||
| <text class='txt01'>限领条件:</text> | |||||
| <text class='time' wx:if='{{limitCondition==1}}'>仅限新用户活动</text> | |||||
| <text class='time' wx:if='{{limitCondition==2&&(minLimit||minLimit==0)&&maxLimit}}'>{{minLimit}}成长值到{{maxLimit}}成长值可以领取</text> | |||||
| <text class='time' wx:if='{{limitCondition==2&&minLimit&&!maxLimit}}'>大于{{minLimit}}成长值可以领取</text> | |||||
| </view> | |||||
| <view class='status' wx:if="{{spellData!=null}}"> | <view class='status' wx:if="{{spellData!=null}}"> | ||||
| <view class='status01 st'> | <view class='status01 st'> | ||||
| <image src='{{spellData.avatarUrl}}'></image> | <image src='{{spellData.avatarUrl}}'></image> | ||||