Commit 40aa3f2c77a38581131f8b88fccc41a6d403174c
1 parent
ce9392ed
收藏价的零售价显示
Showing
2 changed files
with
21 additions
and
5 deletions
packageB/pages/user/collect_list/collect_list.js
| @@ -26,12 +26,28 @@ Page({ | @@ -26,12 +26,28 @@ Page({ | ||
| 26 | total_collects: 0, | 26 | total_collects: 0, |
| 27 | is_goods: 0, | 27 | is_goods: 0, |
| 28 | pageSize: 8, //分页数量 | 28 | pageSize: 8, //分页数量 |
| 29 | - isdelete: 0 | 29 | + isdelete: 0, |
| 30 | + | ||
| 31 | + is_retail_price:0 | ||
| 30 | }, | 32 | }, |
| 31 | onLoad: function() { | 33 | onLoad: function() { |
| 32 | 34 | ||
| 35 | + var th=this; | ||
| 36 | + | ||
| 33 | o.init(this, "", "collects"), | 37 | o.init(this, "", "collects"), |
| 34 | this.requestCollectList(); | 38 | this.requestCollectList(); |
| 39 | + | ||
| 40 | + | ||
| 41 | + getApp().getConfig2(function(rs){ | ||
| 42 | + //计算等级价相关 | ||
| 43 | + var swithc_list=rs.switch_list; | ||
| 44 | + var sw_arr=JSON.parse(swithc_list); | ||
| 45 | + if(sw_arr.is_retail_price){ | ||
| 46 | + th.setData({is_retail_price:1}); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + }); | ||
| 50 | + | ||
| 35 | }, | 51 | }, |
| 36 | requestCollectList: function() { | 52 | requestCollectList: function() { |
| 37 | var th = this; | 53 | var th = this; |
packageB/pages/user/collect_list/collect_list.wxml
| @@ -49,10 +49,10 @@ | @@ -49,10 +49,10 @@ | ||
| 49 | <view class="fs40">{{item.prom_price?item.prom_price:item.final_price}}</view> | 49 | <view class="fs40">{{item.prom_price?item.prom_price:item.final_price}}</view> |
| 50 | </view> | 50 | </view> |
| 51 | <!-- 原价 --> | 51 | <!-- 原价 --> |
| 52 | -<!-- <view class="flex fs24 line through xc-ash">--> | ||
| 53 | -<!-- <view>零售价:</view>--> | ||
| 54 | -<!-- <view>¥{{item.market_price}}</view>--> | ||
| 55 | -<!-- </view>--> | 52 | + <view wx:if="{{is_retail_price}}" class="flex fs24 line through xc-ash"> |
| 53 | + <view>零售价:</view> | ||
| 54 | + <view>¥{{item.market_price}}</view> | ||
| 55 | + </view> | ||
| 56 | </view> | 56 | </view> |
| 57 | 57 | ||
| 58 | <view class="money_right flex line" wx:if="{{!editEd}}"> | 58 | <view class="money_right flex line" wx:if="{{!editEd}}"> |