Commit 174fe04ddc4dda78a72159109cf3bde564eee286
1 parent
8a5a4b6e
我是小店佣金分享
Showing
2 changed files
with
19 additions
and
16 deletions
packageA/pages/distribution/shop/shop.js
| @@ -33,6 +33,7 @@ Page({ | @@ -33,6 +33,7 @@ Page({ | ||
| 33 | isAll: true, | 33 | isAll: true, |
| 34 | is_no_plus:1, | 34 | is_no_plus:1, |
| 35 | default_img: '/miniapp/images/default_g_img.gif', | 35 | default_img: '/miniapp/images/default_g_img.gif', |
| 36 | + is_distribut:0, //是否是分销 | ||
| 36 | }, | 37 | }, |
| 37 | 38 | ||
| 38 | /** | 39 | /** |
| @@ -190,8 +191,8 @@ Page({ | @@ -190,8 +191,8 @@ Page({ | ||
| 190 | var th = this; | 191 | var th = this; |
| 191 | //更新一下会员的信息 | 192 | //更新一下会员的信息 |
| 192 | if (getApp().globalData.user_id) { | 193 | if (getApp().globalData.user_id) { |
| 193 | - if (!getApp().globalData.userInfo['is_distribut']) { | ||
| 194 | - th.setData({ ishidden_comise: 1 }) | 194 | + if (getApp().globalData.userInfo['is_distribut']) { |
| 195 | + th.setData({ is_distribut: 1 }) | ||
| 195 | } | 196 | } |
| 196 | getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { | 197 | getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { |
| 197 | isShowLoading: false, | 198 | isShowLoading: false, |
packageA/pages/distribution/shop/shop.wxml
| @@ -207,9 +207,9 @@ | @@ -207,9 +207,9 @@ | ||
| 207 | <!-- 分层金额 --> | 207 | <!-- 分层金额 --> |
| 208 | <!-- <view hidden="{{ishidden_comise}}" class="fs24 c-a"> | 208 | <!-- <view hidden="{{ishidden_comise}}" class="fs24 c-a"> |
| 209 | 分成金额: | 209 | 分成金额: |
| 210 | - <text class="money c-red">{{filter.toFix(item.commission,2)}}</text> | 210 | + <text class="money c-red">{{filter.toFix(item.commission,2)}}</text> |
| 211 | </view> --> | 211 | </view> --> |
| 212 | - <view hidden="{{ishidden_comise}}"> | 212 | + <view wx:if="{{is_distribut || (!is_distribut && storeDistribut && storeDistribut.is_commission_displayed==1)}}"> |
| 213 | <view class="fs24 c-a" wx:if="{{item.distribut_level >= 1 && item.new_fir_rate !=0}}"> | 213 | <view class="fs24 c-a" wx:if="{{item.distribut_level >= 1 && item.new_fir_rate !=0}}"> |
| 214 | 一级分成: | 214 | 一级分成: |
| 215 | <text class="money c-red">{{filter.toFix(item.new_fir_rate,2)}}</text> | 215 | <text class="money c-red">{{filter.toFix(item.new_fir_rate,2)}}</text> |
| @@ -369,18 +369,20 @@ | @@ -369,18 +369,20 @@ | ||
| 369 | 分成金额: | 369 | 分成金额: |
| 370 | <text class="money c-red">{{filter.toFix(item.commission,2)}}</text> | 370 | <text class="money c-red">{{filter.toFix(item.commission,2)}}</text> |
| 371 | </view> --> | 371 | </view> --> |
| 372 | - <view class="fs24 c-a" wx:if="{{item.distribut_level >= 1 && item.new_fir_rate !=0}}"> | ||
| 373 | - 一级分成: | ||
| 374 | - <text class="money c-red">{{filter.toFix(item.new_fir_rate,2)}}</text> | ||
| 375 | - </view> | ||
| 376 | - <view class="fs24 c-a" wx:if="{{item.distribut_level >= 2 && item.new_sec_rate !=0}}"> | ||
| 377 | - 二级分成: | ||
| 378 | - <text class="money c-red">{{filter.toFix(item.new_sec_rate,2)}}</text> | ||
| 379 | - </view> | ||
| 380 | - <view class="fs24 c-a" wx:if="{{item.distribut_level >= 3 && item.new_thi_rate !=0}}"> | ||
| 381 | - 三级分成: | ||
| 382 | - <text class="money c-red">{{filter.toFix(item.new_thi_rate,2)}}</text> | ||
| 383 | - </view> | 372 | + <block wx:if="{{is_distribut || (!is_distribut && storeDistribut && storeDistribut.is_commission_displayed==1)}}"> |
| 373 | + <view class="fs24 c-a" wx:if="{{item.distribut_level >= 1 && item.new_fir_rate !=0}}"> | ||
| 374 | + 一级分成: | ||
| 375 | + <text class="money c-red">{{filter.toFix(item.new_fir_rate,2)}}</text> | ||
| 376 | + </view> | ||
| 377 | + <view class="fs24 c-a" wx:if="{{item.distribut_level >= 2 && item.new_sec_rate !=0}}"> | ||
| 378 | + 二级分成: | ||
| 379 | + <text class="money c-red">{{filter.toFix(item.new_sec_rate,2)}}</text> | ||
| 380 | + </view> | ||
| 381 | + <view class="fs24 c-a" wx:if="{{item.distribut_level >= 3 && item.new_thi_rate !=0}}"> | ||
| 382 | + 三级分成: | ||
| 383 | + <text class="money c-red">{{filter.toFix(item.new_thi_rate,2)}}</text> | ||
| 384 | + </view> | ||
| 385 | + </block> | ||
| 384 | </view> | 386 | </view> |
| 385 | </view> | 387 | </view> |
| 386 | </view> | 388 | </view> |