Commit aba529046577d3301d0ddf93bb1a0b3945a9547c

Authored by yvan.ni
1 parent 0dc48a94

是否关闭储值款

pages/user/index/index.js
... ... @@ -50,8 +50,10 @@ Page({
50 50  
51 51 is_show_recommend:false,
52 52  
53   - has_rj:0,
54   - rfmName:'成长值'
  53 + has_rj:0,
  54 + rfmName:'成长值',
  55 + is_close_chuzhi:0
  56 +
55 57  
56 58 },
57 59 goto_nav: function (e) {
... ... @@ -78,13 +80,12 @@ Page({
78 80 },
79 81 success: function (res) {
80 82 if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) {
81   - var item = res.data.data.pageData[0];
82   - if (item)
83   - {
84   - th.setData({ usertop_ad:item });
85   - if (item.ad_code) th.setData({ ad_img: item.ad_code })
86   - }
87   -
  83 + var item = res.data.data.pageData[0];
  84 + if (item)
  85 + {
  86 + th.setData({ usertop_ad:item });
  87 + if (item.ad_code) th.setData({ ad_img: item.ad_code })
  88 + }
88 89 }
89 90 }
90 91 })
... ... @@ -115,6 +116,9 @@ Page({
115 116 * 生命周期函数--监听页面显示
116 117 */
117 118 onShow: function () {
  119 +
  120 + var _that=this;
  121 +
118 122 getApp().check_can_share();
119 123 //看一下小程序是不是过期了
120 124 getApp().getConfig2(function (config2) {
... ... @@ -141,6 +145,14 @@ Page({
141 145 }
142 146 })
143 147 }
  148 +
  149 + if(config2 && config2.switch_list){
  150 + var conf=JSON.parse(config2.switch_list)
  151 + var is_close_chuzhi=conf.is_close_chuzhi;
  152 + _that.setData({is_close_chuzhi})
  153 +
  154 + }
  155 +
144 156 })
145 157  
146 158 //调用接口判断商家plus有没有过期
... ... @@ -160,8 +172,6 @@ Page({
160 172 })
161 173 var th = this;
162 174  
163   -
164   -
165 175 if (typeof this.getTabBar === 'function' && this.getTabBar()) {
166 176 var index = getApp().getPageIndex(this);
167 177 this.getTabBar().setData({
... ...
pages/user/index/index.wxml
... ... @@ -58,12 +58,17 @@
58 58 <view class="t-c typefont" bindtap='balance'>{{yuer?yuer:0}}
59 59 <view class='numfont'>余额</view>
60 60 </view>
  61 + <!-- 是否关闭 -->
  62 + <block wx:if="{{!is_close_chuzhi}}">
61 63 <view class="t-c typefont" bindtap='deposit'>{{udata.Balance?udata.Balance:0}}
62 64 <view class='numfont'>储值款</view>
63 65 </view>
  66 + </block>
  67 +
64 68 <view class="t-c typefont" bindtap='integral'>{{udata.Integral?udata.Integral:0}}
65 69 <view class='numfont'>积分</view>
66 70 </view>
  71 +
67 72 <view class="t-c typefont" bindtap='coupon'>{{udata.CashCount+byquan?udata.CashCount+byquan:0}}
68 73 <view class='numfont'>优惠券</view>
69 74 </view>
... ...