Commit a28f1ba8c2378ac32482b110639dee77b0530cdb
1 parent
d855bea0
商品分享:判断是否是分销商,如果是才显示分成金额
Showing
2 changed files
with
8 additions
and
1 deletions
packageA/pages/goods_share/goods_share.js
@@ -95,6 +95,13 @@ Page({ | @@ -95,6 +95,13 @@ Page({ | ||
95 | /*** 生命周期函数--监听页面显示***/ | 95 | /*** 生命周期函数--监听页面显示***/ |
96 | onShow: function () { | 96 | onShow: function () { |
97 | var th=this; | 97 | var th=this; |
98 | + | ||
99 | + | ||
100 | + this.setData({ | ||
101 | + //用来判断是否是分销商,是分销商才显示分成佣金 | ||
102 | + is_distribut: app.globalData.userInfo.is_distribut | ||
103 | + }); | ||
104 | + | ||
98 | getApp().getConfig2(function(rs){ | 105 | getApp().getConfig2(function(rs){ |
99 | //计算等级价相关 | 106 | //计算等级价相关 |
100 | var swithc_list=rs.switch_list; | 107 | var swithc_list=rs.switch_list; |
packageA/pages/goods_share/goods_share.wxml
@@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
77 | 77 | ||
78 | <view class="flex jc_sb fs24 pdt14"> | 78 | <view class="flex jc_sb fs24 pdt14"> |
79 | <view class="gray">已售:<text class="red">{{item.sales_sum}}</text></view> | 79 | <view class="gray">已售:<text class="red">{{item.sales_sum}}</text></view> |
80 | - <view class="gray">分成金额: | 80 | + <view class="gray" wx:if="{{is_distribut}}">分成金额: |
81 | <text wx:if="{{!pattern}}" class="red">¥{{item.commission}}</text> | 81 | <text wx:if="{{!pattern}}" class="red">¥{{item.commission}}</text> |
82 | <text wx:else class="red">¥{{item.fir_rate+item.sec_rate+item.thi_rate}}</text> | 82 | <text wx:else class="red">¥{{item.fir_rate+item.sec_rate+item.thi_rate}}</text> |
83 | </view> | 83 | </view> |