Commit aba529046577d3301d0ddf93bb1a0b3945a9547c
1 parent
0dc48a94
是否关闭储值款
Showing
2 changed files
with
26 additions
and
11 deletions
pages/user/index/index.js
@@ -50,8 +50,10 @@ Page({ | @@ -50,8 +50,10 @@ Page({ | ||
50 | 50 | ||
51 | is_show_recommend:false, | 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 | goto_nav: function (e) { | 59 | goto_nav: function (e) { |
@@ -78,13 +80,12 @@ Page({ | @@ -78,13 +80,12 @@ Page({ | ||
78 | }, | 80 | }, |
79 | success: function (res) { | 81 | success: function (res) { |
80 | if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | 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,6 +116,9 @@ Page({ | ||
115 | * 生命周期函数--监听页面显示 | 116 | * 生命周期函数--监听页面显示 |
116 | */ | 117 | */ |
117 | onShow: function () { | 118 | onShow: function () { |
119 | + | ||
120 | + var _that=this; | ||
121 | + | ||
118 | getApp().check_can_share(); | 122 | getApp().check_can_share(); |
119 | //看一下小程序是不是过期了 | 123 | //看一下小程序是不是过期了 |
120 | getApp().getConfig2(function (config2) { | 124 | getApp().getConfig2(function (config2) { |
@@ -141,6 +145,14 @@ Page({ | @@ -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 | //调用接口判断商家plus有没有过期 | 158 | //调用接口判断商家plus有没有过期 |
@@ -160,8 +172,6 @@ Page({ | @@ -160,8 +172,6 @@ Page({ | ||
160 | }) | 172 | }) |
161 | var th = this; | 173 | var th = this; |
162 | 174 | ||
163 | - | ||
164 | - | ||
165 | if (typeof this.getTabBar === 'function' && this.getTabBar()) { | 175 | if (typeof this.getTabBar === 'function' && this.getTabBar()) { |
166 | var index = getApp().getPageIndex(this); | 176 | var index = getApp().getPageIndex(this); |
167 | this.getTabBar().setData({ | 177 | this.getTabBar().setData({ |
pages/user/index/index.wxml
@@ -58,12 +58,17 @@ | @@ -58,12 +58,17 @@ | ||
58 | <view class="t-c typefont" bindtap='balance'>{{yuer?yuer:0}} | 58 | <view class="t-c typefont" bindtap='balance'>{{yuer?yuer:0}} |
59 | <view class='numfont'>余额</view> | 59 | <view class='numfont'>余额</view> |
60 | </view> | 60 | </view> |
61 | + <!-- 是否关闭 --> | ||
62 | + <block wx:if="{{!is_close_chuzhi}}"> | ||
61 | <view class="t-c typefont" bindtap='deposit'>{{udata.Balance?udata.Balance:0}} | 63 | <view class="t-c typefont" bindtap='deposit'>{{udata.Balance?udata.Balance:0}} |
62 | <view class='numfont'>储值款</view> | 64 | <view class='numfont'>储值款</view> |
63 | </view> | 65 | </view> |
66 | + </block> | ||
67 | + | ||
64 | <view class="t-c typefont" bindtap='integral'>{{udata.Integral?udata.Integral:0}} | 68 | <view class="t-c typefont" bindtap='integral'>{{udata.Integral?udata.Integral:0}} |
65 | <view class='numfont'>积分</view> | 69 | <view class='numfont'>积分</view> |
66 | </view> | 70 | </view> |
71 | + | ||
67 | <view class="t-c typefont" bindtap='coupon'>{{udata.CashCount+byquan?udata.CashCount+byquan:0}} | 72 | <view class="t-c typefont" bindtap='coupon'>{{udata.CashCount+byquan?udata.CashCount+byquan:0}} |
68 | <view class='numfont'>优惠券</view> | 73 | <view class='numfont'>优惠券</view> |
69 | </view> | 74 | </view> |