Commit 39b4c032e1b778568ffe08b2fe315380b61c42bf
1 parent
46fe703f
商品列表的bug,活动未进行的优化
Showing
2 changed files
with
10 additions
and
9 deletions
pages/goods/goodsList/goodsList.js
... | ... | @@ -118,23 +118,19 @@ Page({ |
118 | 118 | var arr= res.data.data; |
119 | 119 | |
120 | 120 | if(arr.is_end==1){ |
121 | - th.setData({show_all:0}); | |
122 | - th.setData({err_txt:'活动已结束'}); | |
121 | + th.setData({show_all:0,err_txt:'活动已结束'}); | |
123 | 122 | return false; |
124 | 123 | } |
125 | 124 | if(arr.start_time>ut.gettimestamp()){ |
126 | - th.setData({show_all:0}); | |
127 | - th.setData({err_txt:'活动还未开始'}); | |
125 | + th.setData({show_all:0,err_txt:'活动还未开始'}); | |
128 | 126 | return false; |
129 | 127 | } |
130 | 128 | if(arr.end_time<ut.gettimestamp()){ |
131 | 129 | th.setData({show_all:0}); |
132 | - th.setData({err_txt:'活动还未开始'}); | |
130 | + th.setData({show_all:0,err_txt:'活动已结束'}); | |
133 | 131 | return false; |
134 | 132 | } |
135 | 133 | |
136 | - | |
137 | - | |
138 | 134 | var url1="/api/weshop/prom/ladderList/list?store_id="+oo.stoid+"&form_id="+arr.id; |
139 | 135 | getApp().request.promiseGet(url1, {}).then(rs=>{ |
140 | 136 | if(rs.data.code==0 && rs.data.data && rs.data.data.length) { |
... | ... | @@ -151,9 +147,14 @@ Page({ |
151 | 147 | } |
152 | 148 | }) |
153 | 149 | } |
150 | + else{ | |
151 | + th.setData({show_all:0,err_txt:'未找到活动或者身份不符'}); | |
152 | + } | |
154 | 153 | }) |
155 | 154 | } |
156 | 155 | |
156 | + | |
157 | + | |
157 | 158 | this.requestGoodsList(url); |
158 | 159 | getApp().getConfig2(function(rs){ |
159 | 160 | //计算等级价相关 | ... | ... |
pages/goods/goodsList/goodsList.wxml
... | ... | @@ -295,7 +295,7 @@ |
295 | 295 | <navigator class="lookat" url="/pages/index/index/index">回到首页</navigator> |
296 | 296 | </view> |
297 | 297 | </view> |
298 | - <view hidden="{{!openFilterModal}}"> | |
298 | +<view hidden="{{!openFilterModal}}"> | |
299 | 299 | <view bindtap="closeFilterModal" class="cover-layer"></view> |
300 | 300 | <view class="filter-modal"> |
301 | 301 | <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon> |
... | ... | @@ -334,7 +334,7 @@ |
334 | 334 | |
335 | 335 | <share_box id="share"></share_box> |
336 | 336 | <view class="t-c fs32" wx:if="{{err_txt}}"> |
337 | - <view class="no-data" wx:if="{{(!requestData||requestData.length==0) && is_go}}"> | |
337 | + <view class="no-data"> | |
338 | 338 | <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> |
339 | 339 | <view class="no-data-title">{{err_txt}}</view> |
340 | 340 | <navigator class="lookat" url="/pages/index/index/index">回到首页</navigator> | ... | ... |