Commit 1d52804fe3fd65a43888b9e69d6858b98b25d4dd
1 parent
b114b869
秒杀 图片增加版本号、增加打印请求数据
Showing
2 changed files
with
26 additions
and
17 deletions
components/diy_seckill/diy_seckill.js
... | ... | @@ -47,6 +47,7 @@ Component({ |
47 | 47 | //会员身份变化 |
48 | 48 | var th = this; |
49 | 49 | var g_id = this.data.object; |
50 | + | |
50 | 51 | //只有再会员登陆之后,才重新调用接口 |
51 | 52 | console.log('秒杀组件------------'); |
52 | 53 | if(this.data.user_id!=getApp().globalData.user_id){ |
... | ... | @@ -70,6 +71,7 @@ Component({ |
70 | 71 | |
71 | 72 | ready: function () { |
72 | 73 | var g_id = this.data.object; |
74 | + | |
73 | 75 | this.init(g_id); |
74 | 76 | this.data.user_id=getApp().globalData.user_id; |
75 | 77 | }, |
... | ... | @@ -112,7 +114,9 @@ Component({ |
112 | 114 | // var gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&goodsidlist=" + goodsidlist+"&user_id="+user_id+"&type=1"; |
113 | 115 | var gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&idlist=" + idlist + "&user_id="+user_id+"&type=1"; |
114 | 116 | app.request.promiseGet(gUrl, {}).then(res => { |
115 | - | |
117 | + console.error('手动选择--秒杀数据-------获取---------------'); | |
118 | + console.error(gUrl); | |
119 | + console.error(res); | |
116 | 120 | //如果秒杀的数组为空的时候 |
117 | 121 | var goodslist = res.data.data; |
118 | 122 | //就算是添加的活动已经过期,就要用最新的进行中活动 |
... | ... | @@ -134,6 +138,11 @@ Component({ |
134 | 138 | getApp().request.promiseGet("/api/ms/flash_sale/spikepage?page=1&pageSize=9", |
135 | 139 | { isShowLoading: 1, data:req } |
136 | 140 | ).then(res => { |
141 | + console.error('默认选择--秒杀数据-------获取---------------'); | |
142 | + console.error('/api/ms/flash_sale/spikepage?page=1&pageSize=9'); | |
143 | + console.error(req); | |
144 | + console.error('返回数据------'); | |
145 | + console.error(res); | |
137 | 146 | if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) { |
138 | 147 | var goodsidlist = res.data.data.pageData; |
139 | 148 | this.set_goods_list(null, goodsidlist); | ... | ... |
components/diy_seckill/diy_seckill.wxml
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | </view> |
25 | 25 | |
26 | 26 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
27 | - <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | |
27 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | |
28 | 28 | </view> |
29 | 29 | <block wx:if="{{object.count_down}}"> |
30 | 30 | <view wx:if="{{aitem.residue==0 || aitem.status==2}}" style="height: 70rpx;line-height: 70rpx;color: #fff;background-color:rgb(166,166,166);text-align: center;"> |
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | </view> |
56 | 56 | </view> |
57 | 57 | <view> |
58 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" class="imgbox1"></image> | |
58 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> | |
59 | 59 | <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> |
60 | 60 | </view> |
61 | 61 | </view> |
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 | </view> |
79 | 79 | |
80 | 80 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
81 | - <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | |
81 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | |
82 | 82 | </view> |
83 | 83 | <block wx:if="{{object.count_down}}"> |
84 | 84 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
... | ... | @@ -101,7 +101,7 @@ |
101 | 101 | </view> |
102 | 102 | </view> |
103 | 103 | <view> |
104 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 60rpx;height: 60rpx;"></image> | |
104 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> | |
105 | 105 | <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> |
106 | 106 | </view> |
107 | 107 | </view> |
... | ... | @@ -124,7 +124,7 @@ |
124 | 124 | </view> |
125 | 125 | |
126 | 126 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
127 | - <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | |
127 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | |
128 | 128 | </view> |
129 | 129 | <!-- <view class="new_item1_time" wx:if="{{object.count_down}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> |
130 | 130 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
... | ... | @@ -150,7 +150,7 @@ |
150 | 150 | </view> |
151 | 151 | </view> |
152 | 152 | <view> |
153 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 50rpx;height: 50rpx;"></image> | |
153 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> | |
154 | 154 | <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> |
155 | 155 | </view> |
156 | 156 | </view> |
... | ... | @@ -174,7 +174,7 @@ |
174 | 174 | </view> |
175 | 175 | |
176 | 176 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
177 | - <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | |
177 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | |
178 | 178 | </view> |
179 | 179 | <!-- <view class="new_item1_time" wx:if="{{object.count_down}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> |
180 | 180 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
... | ... | @@ -202,7 +202,7 @@ |
202 | 202 | </view> |
203 | 203 | </view> |
204 | 204 | <view> |
205 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width:60rpx;height: 60rpx;"></image> | |
205 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width:60rpx;height: 60rpx;"></image> | |
206 | 206 | <view style="width: 130rpx;height: 60rpx;line-height: 60rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> |
207 | 207 | </view> |
208 | 208 | </view> |
... | ... | @@ -227,7 +227,7 @@ |
227 | 227 | </view> |
228 | 228 | |
229 | 229 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
230 | - <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | |
230 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | |
231 | 231 | </view> |
232 | 232 | <block wx:if="{{object.count_down}}"> |
233 | 233 | <view wx:if="{{aitem.residue==0 || aitem.status==2}}" style="height: 70rpx;line-height: 70rpx;color: #fff;background-color:rgb(166,166,166);text-align: center;"> |
... | ... | @@ -258,7 +258,7 @@ |
258 | 258 | </view> |
259 | 259 | </view> |
260 | 260 | <view> |
261 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" class="imgbox1"></image> | |
261 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> | |
262 | 262 | <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> |
263 | 263 | </view> |
264 | 264 | </view> |
... | ... | @@ -274,7 +274,7 @@ |
274 | 274 | </view> |
275 | 275 | |
276 | 276 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
277 | - <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | |
277 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | |
278 | 278 | </view> |
279 | 279 | <block wx:if="{{object.count_down}}"> |
280 | 280 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
... | ... | @@ -297,7 +297,7 @@ |
297 | 297 | </view> |
298 | 298 | </view> |
299 | 299 | <view> |
300 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 60rpx;height: 60rpx;"></image> | |
300 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> | |
301 | 301 | <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> |
302 | 302 | </view> |
303 | 303 | </view> |
... | ... | @@ -313,7 +313,7 @@ |
313 | 313 | </view> |
314 | 314 | |
315 | 315 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
316 | - <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | |
316 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | |
317 | 317 | </view> |
318 | 318 | <block wx:if="{{object.count_down}}"> |
319 | 319 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
... | ... | @@ -336,7 +336,7 @@ |
336 | 336 | </view> |
337 | 337 | </view> |
338 | 338 | <view> |
339 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 60rpx;height: 60rpx;"></image> | |
339 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> | |
340 | 340 | <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> |
341 | 341 | </view> |
342 | 342 | </view> |
... | ... | @@ -409,7 +409,7 @@ |
409 | 409 | </view> |
410 | 410 | |
411 | 411 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
412 | - <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | |
412 | + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png?v=1'}}"></image> | |
413 | 413 | </view> |
414 | 414 | <!-- <view class="new_item1_time" wx:if="{{object.count_down}}" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> |
415 | 415 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
... | ... | @@ -435,7 +435,7 @@ |
435 | 435 | </view> |
436 | 436 | </view> |
437 | 437 | <view> |
438 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 50rpx;height: 50rpx;"></image> | |
438 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> | |
439 | 439 | <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> |
440 | 440 | </view> |
441 | 441 | </view> | ... | ... |