Commit 35fc3332224c56cb2344149633faf289f78af1ca
合并解决冲突
Showing
6 changed files
with
93 additions
and
15 deletions
components/diy_public/diy_public.js
@@ -50,9 +50,11 @@ Component({ | @@ -50,9 +50,11 @@ Component({ | ||
50 | '2':"/miniapp/images/component/pingd/pingd.png", | 50 | '2':"/miniapp/images/component/pingd/pingd.png", |
51 | '6':"/miniapp/images/component/pingd/pingd.png", | 51 | '6':"/miniapp/images/component/pingd/pingd.png", |
52 | '8':"/miniapp/images/component/presale.png", | 52 | '8':"/miniapp/images/component/presale.png", |
53 | + '9':"/miniapp/images/component/luckyactivity.png", | ||
53 | }, | 54 | }, |
54 | nav1:'/packageA/pages/goodsInfo/goodsInfo?', | 55 | nav1:'/packageA/pages/goodsInfo/goodsInfo?', |
55 | nav2:'/pages/goods/goodsInfo/goodsInfo?', | 56 | nav2:'/pages/goods/goodsInfo/goodsInfo?', |
57 | + | ||
56 | }, | 58 | }, |
57 | 59 | ||
58 | pageLifetimes: { | 60 | pageLifetimes: { |
@@ -98,7 +100,7 @@ Component({ | @@ -98,7 +100,7 @@ Component({ | ||
98 | prom_text:'已团', | 100 | prom_text:'已团', |
99 | nav1:'/pages/goods/goodsInfo/goodsInfo?', | 101 | nav1:'/pages/goods/goodsInfo/goodsInfo?', |
100 | nav2:'/pages/goods/goodsInfo/goodsInfo?' | 102 | nav2:'/pages/goods/goodsInfo/goodsInfo?' |
101 | - }) | 103 | + }) |
102 | } | 104 | } |
103 | if (this.data.prom_type==8) { //预售 | 105 | if (this.data.prom_type==8) { //预售 |
104 | this.setData({ | 106 | this.setData({ |
@@ -107,6 +109,14 @@ Component({ | @@ -107,6 +109,14 @@ Component({ | ||
107 | nav2:'/packageC/pages/presell/goodsInfo/goodsInfo?' | 109 | nav2:'/packageC/pages/presell/goodsInfo/goodsInfo?' |
108 | }) | 110 | }) |
109 | } | 111 | } |
112 | + if (this.data.prom_type==9) { //幸运购 | ||
113 | + this.setData({ | ||
114 | + prom_text:'已售', | ||
115 | + nav1:'/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?', | ||
116 | + nav2:'/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?' | ||
117 | + }) | ||
118 | + } | ||
119 | + | ||
110 | var g_id = this.data.object; | 120 | var g_id = this.data.object; |
111 | 121 | ||
112 | this.init(g_id); | 122 | this.init(g_id); |
@@ -165,6 +175,10 @@ Component({ | @@ -165,6 +175,10 @@ Component({ | ||
165 | gUrl="/api/weshop/marketing/marketingPresellList/page?store_id=" | 175 | gUrl="/api/weshop/marketing/marketingPresellList/page?store_id=" |
166 | +os.stoid+"&goodsidlist="+goodsidlist + "&user_id="+user_id+'&is_end=0&timetype=3&isuse=1'; | 176 | +os.stoid+"&goodsidlist="+goodsidlist + "&user_id="+user_id+'&is_end=0&timetype=3&isuse=1'; |
167 | } | 177 | } |
178 | + if (th.data.prom_type==9) { //幸运购 | ||
179 | + gUrl="/api/weshop/prom/luckyActivity/getGoodsList?store_id=" | ||
180 | + +os.stoid+"&goodsidlist="+goodsidlist + "&user_id="+user_id+'&is_end=0&timetype=1&type=1'; | ||
181 | + } | ||
168 | 182 | ||
169 | 183 | ||
170 | 184 | ||
@@ -226,6 +240,18 @@ Component({ | @@ -226,6 +240,18 @@ Component({ | ||
226 | pageSize:9 | 240 | pageSize:9 |
227 | } | 241 | } |
228 | } | 242 | } |
243 | + if (this.data.prom_type==9) { //幸运购 | ||
244 | + gUrl="/api/weshop/prom/luckyActivity/page" | ||
245 | + req={ | ||
246 | + store_id:os.stoid, | ||
247 | + is_end:0, | ||
248 | + timetype:1, | ||
249 | + // isuse:1, | ||
250 | + // page:1, | ||
251 | + // user_id:user_id, | ||
252 | + // pageSize:9 | ||
253 | + } | ||
254 | + } | ||
229 | 255 | ||
230 | getApp().request.promiseGet(gUrl, | 256 | getApp().request.promiseGet(gUrl, |
231 | { isShowLoading: 1, data:req } | 257 | { isShowLoading: 1, data:req } |
@@ -244,6 +270,7 @@ Component({ | @@ -244,6 +270,7 @@ Component({ | ||
244 | let prom_type=this.data.prom_type | 270 | let prom_type=this.data.prom_type |
245 | goodslist.forEach(function (vy, indy) { | 271 | goodslist.forEach(function (vy, indy) { |
246 | if(!vy.id) vy.id=vy.prom_id; | 272 | if(!vy.id) vy.id=vy.prom_id; |
273 | + if(vy.title && !vy.goods_name) vy.goods_name=vy.title; | ||
247 | }) | 274 | }) |
248 | 275 | ||
249 | // 判断火热,预热 | 276 | // 判断火热,预热 |
@@ -279,7 +306,7 @@ Component({ | @@ -279,7 +306,7 @@ Component({ | ||
279 | 306 | ||
280 | 307 | ||
281 | var promisies = []; | 308 | var promisies = []; |
282 | - if (th.data.prom_type !=8) { | 309 | + if (th.data.prom_type !=8 && th.data.prom_type !=9) { |
283 | for (const key in all_array) { | 310 | for (const key in all_array) { |
284 | if (Object.hasOwnProperty.call(all_array, key)) { | 311 | if (Object.hasOwnProperty.call(all_array, key)) { |
285 | const val = all_array[key]; | 312 | const val = all_array[key]; |
@@ -306,6 +333,7 @@ Component({ | @@ -306,6 +333,7 @@ Component({ | ||
306 | }; | 333 | }; |
307 | // let price=all_array[i].price.toFixed(2) | 334 | // let price=all_array[i].price.toFixed(2) |
308 | let price=all_array[i].price + '' | 335 | let price=all_array[i].price + '' |
336 | + | ||
309 | if (th.data.prom_type==8) { //预售 | 337 | if (th.data.prom_type==8) { //预售 |
310 | price = all_array[i].presell_price + '' | 338 | price = all_array[i].presell_price + '' |
311 | if (all_array[i].status ===0) { | 339 | if (all_array[i].status ===0) { |
@@ -315,8 +343,12 @@ Component({ | @@ -315,8 +343,12 @@ Component({ | ||
315 | all_array[i].goods_num=all_array[i].presell_sumqty*1 + all_array[i].virtual_qty*1 | 343 | all_array[i].goods_num=all_array[i].presell_sumqty*1 + all_array[i].virtual_qty*1 |
316 | all_array[i].buy_num=all_array[i].buy_goodnum + all_array[i].virtual_qty*1 | 344 | all_array[i].buy_num=all_array[i].buy_goodnum + all_array[i].virtual_qty*1 |
317 | } | 345 | } |
318 | - | ||
319 | - | 346 | + } |
347 | + if (th.data.prom_type==9) { //幸运购 | ||
348 | + price = (all_array[i].group_price / 100) + '' | ||
349 | + // all_array[i].buy_num = all_array[i].group_joined | ||
350 | + all_array[i].buy_num = all_array[i].goods_num*1 - all_array[i].actLen*1 | ||
351 | + all_array[i].goods_name = all_array[i].title | ||
320 | } | 352 | } |
321 | 353 | ||
322 | 354 | ||
@@ -329,6 +361,12 @@ Component({ | @@ -329,6 +361,12 @@ Component({ | ||
329 | } | 361 | } |
330 | 362 | ||
331 | all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 | 363 | all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 |
364 | + all_array[i].residue = (all_array[i].residue >= 0) ? all_array[i].residue : 0 | ||
365 | + if (th.data.prom_type==9) { //幸运购 | ||
366 | + all_array[i].residue= all_array[i].actLen | ||
367 | + } | ||
368 | + | ||
369 | + // console.error(all_array[i].residue); | ||
332 | if (all_array[i].residue && all_array[i].residue > 0 && all_array[i].status !=2) { | 370 | if (all_array[i].residue && all_array[i].residue > 0 && all_array[i].status !=2) { |
333 | empty.push(all_array[i]) | 371 | empty.push(all_array[i]) |
334 | } | 372 | } |
@@ -438,7 +476,14 @@ Component({ | @@ -438,7 +476,14 @@ Component({ | ||
438 | sec: '00' | 476 | sec: '00' |
439 | } | 477 | } |
440 | } | 478 | } |
441 | - var txt = "goods_array[" + j + "][" + i + "].djs"; | 479 | + let txt = "goods_array[" + j + "][" + i + "].djs"; |
480 | + | ||
481 | + if (!o.status && obj.day=='00' && obj.hou=='00' && obj.min=='00' && obj.sec=='01') { | ||
482 | + let t1="goods_array[" + j + "][" + i + "].status"; | ||
483 | + ee.setData({ | ||
484 | + [t1]:1 | ||
485 | + }) | ||
486 | + } | ||
442 | ee.setData({ | 487 | ee.setData({ |
443 | [txt]: obj | 488 | [txt]: obj |
444 | }); | 489 | }); |
@@ -464,6 +509,9 @@ Component({ | @@ -464,6 +509,9 @@ Component({ | ||
464 | if (this.data.prom_type==8) { //预售 | 509 | if (this.data.prom_type==8) { //预售 |
465 | url="/packageC/pages/presell/list/list"; | 510 | url="/packageC/pages/presell/list/list"; |
466 | } | 511 | } |
512 | + if (this.data.prom_type==9) { //幸运购 | ||
513 | + url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList"; | ||
514 | + } | ||
467 | 515 | ||
468 | wx.navigateTo({ | 516 | wx.navigateTo({ |
469 | url | 517 | url |
components/diy_public/diy_public.wxml
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> | 16 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> |
17 | <block wx:for="{{goods_array}}"> | 17 | <block wx:for="{{goods_array}}"> |
18 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> | 18 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> |
19 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | 19 | + <navigator url="{{(prom_type==9 && aitem.residue==0) ? '' : (aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ))}}" class="s1_gk_a1"> |
20 | <view class="topBox"> | 20 | <view class="topBox"> |
21 | <view class="imgBox"> | 21 | <view class="imgBox"> |
22 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | 22 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> |
@@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
76 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') }}"> | 76 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') }}"> |
77 | <block wx:for="{{goods_array}}"> | 77 | <block wx:for="{{goods_array}}"> |
78 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> | 78 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> |
79 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | 79 | + <navigator url="{{(prom_type==9 && aitem.residue==0) ? '' : (aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ))}}" class="s1_gk_a1"> |
80 | <view class="topBox"> | 80 | <view class="topBox"> |
81 | <view class="imgBox"> | 81 | <view class="imgBox"> |
82 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | 82 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> |
@@ -130,7 +130,7 @@ | @@ -130,7 +130,7 @@ | ||
130 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> | 130 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> |
131 | <block wx:for="{{goods_array}}"> | 131 | <block wx:for="{{goods_array}}"> |
132 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}"> | 132 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}"> |
133 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | 133 | + <navigator url="{{(prom_type==9 && aitem.residue==0) ? '' : (aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ))}}" class="s1_gk_a1"> |
134 | <view class="topBox"> | 134 | <view class="topBox"> |
135 | <view class="imgBox"> | 135 | <view class="imgBox"> |
136 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> | 136 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> |
@@ -178,7 +178,7 @@ | @@ -178,7 +178,7 @@ | ||
178 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') }}"> | 178 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') }}"> |
179 | <block wx:for="{{goods_array}}"> | 179 | <block wx:for="{{goods_array}}"> |
180 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> | 180 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> |
181 | - <navigator style="display: flex;" url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | 181 | + <navigator style="display: flex;" url="{{(prom_type==9 && aitem.residue==0) ? '' : (aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ))}}" class="s1_gk_a1"> |
182 | <view style="width: 33%;" class="topBox"> | 182 | <view style="width: 33%;" class="topBox"> |
183 | <view class="imgBox"> | 183 | <view class="imgBox"> |
184 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | 184 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
@@ -231,7 +231,7 @@ | @@ -231,7 +231,7 @@ | ||
231 | <block wx:for="{{goods_array}}"> | 231 | <block wx:for="{{goods_array}}"> |
232 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 232 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
233 | <view wx:if="{{aind==0}}" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> | 233 | <view wx:if="{{aind==0}}" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> |
234 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | 234 | + <navigator url="{{(prom_type==9 && aitem.residue==0) ? '' : (aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ))}}" class="s1_gk_a1"> |
235 | <view class="topBox"> | 235 | <view class="topBox"> |
236 | <view class="imgBox"> | 236 | <view class="imgBox"> |
237 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | 237 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
@@ -281,7 +281,7 @@ | @@ -281,7 +281,7 @@ | ||
281 | </navigator> | 281 | </navigator> |
282 | </view> | 282 | </view> |
283 | <view wx:if="{{aind==1}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> | 283 | <view wx:if="{{aind==1}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> |
284 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | 284 | + <navigator url="{{(prom_type==9 && aitem.residue==0) ? '' : (aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ))}}" class="s1_gk_a1"> |
285 | <view class="topBox"> | 285 | <view class="topBox"> |
286 | <view class="imgBox"> | 286 | <view class="imgBox"> |
287 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | 287 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
@@ -323,7 +323,7 @@ | @@ -323,7 +323,7 @@ | ||
323 | </navigator> | 323 | </navigator> |
324 | </view> | 324 | </view> |
325 | <view wx:if="{{aind==2}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> | 325 | <view wx:if="{{aind==2}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> |
326 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | 326 | + <navigator url="{{(prom_type==9 && aitem.residue==0) ? '' : (aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ))}}" class="s1_gk_a1"> |
327 | <view class="topBox"> | 327 | <view class="topBox"> |
328 | <view class="imgBox"> | 328 | <view class="imgBox"> |
329 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | 329 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
@@ -422,7 +422,7 @@ | @@ -422,7 +422,7 @@ | ||
422 | <swiper indicator-dots style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'+(swiperHeight ? ('height:'+swiperHeight+';'):'' )}}" class="{{' new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> | 422 | <swiper indicator-dots style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'+(swiperHeight ? ('height:'+swiperHeight+';'):'' )}}" class="{{' new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> |
423 | <swiper-item wx:for="{{goods_array}}" class="flex2" style="padding: 5rpx;"> | 423 | <swiper-item wx:for="{{goods_array}}" class="flex2" style="padding: 5rpx;"> |
424 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad swiper_h new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}"> | 424 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad swiper_h new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}"> |
425 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | 425 | + <navigator url="{{(prom_type==9 && aitem.residue==0) ? '' : (aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ))}}" class="s1_gk_a1"> |
426 | <view class="topBox"> | 426 | <view class="topBox"> |
427 | <view class="imgBox"> | 427 | <view class="imgBox"> |
428 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> | 428 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
components/diy_public/diy_public.wxss
@@ -555,4 +555,14 @@ swiper { | @@ -555,4 +555,14 @@ swiper { | ||
555 | border-radius: 10rpx; | 555 | border-radius: 10rpx; |
556 | margin-right: 10rpx; | 556 | margin-right: 10rpx; |
557 | opacity: .8; | 557 | opacity: .8; |
558 | + } | ||
559 | + .lucky{ | ||
560 | + display: inline-block; | ||
561 | + font-size: 24rpx; | ||
562 | + padding: 0 10rpx; | ||
563 | + background-color: #f23023; | ||
564 | + opacity: .8; | ||
565 | + color: #fff; | ||
566 | + margin-right: 10rpx; | ||
567 | + border-radius: 10rpx; | ||
558 | } | 568 | } |
559 | \ No newline at end of file | 569 | \ No newline at end of file |
pages/index/index/index.wxml
@@ -484,9 +484,12 @@ | @@ -484,9 +484,12 @@ | ||
484 | <diy_public object="{{item.content}}" prom_type="6"></diy_public> | 484 | <diy_public object="{{item.content}}" prom_type="6"></diy_public> |
485 | </block> | 485 | </block> |
486 | <!--秒杀--> | 486 | <!--秒杀--> |
487 | - <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}"> | 487 | + <block wx:if="{{item.ename=='seckill'}}"> |
488 | <seckill object="{{item.content}}"></seckill> | 488 | <seckill object="{{item.content}}"></seckill> |
489 | </block> | 489 | </block> |
490 | + <block wx:if="{{item.ename=='seckillNew'}}"> | ||
491 | + <diy_public object="{{item.content}}" prom_type="1"></diy_public> | ||
492 | + </block> | ||
490 | <!--标题--> | 493 | <!--标题--> |
491 | <block wx:if="{{item.ename=='title'}}"> | 494 | <block wx:if="{{item.ename=='title'}}"> |
492 | <title object="{{item.content}}"></title> | 495 | <title object="{{item.content}}"></title> |
@@ -530,6 +533,10 @@ | @@ -530,6 +533,10 @@ | ||
530 | <block wx:if="{{item.ename=='luckyactivity'}}"> | 533 | <block wx:if="{{item.ename=='luckyactivity'}}"> |
531 | <luckyGo object="{{item.content}}"></luckyGo> | 534 | <luckyGo object="{{item.content}}"></luckyGo> |
532 | </block> | 535 | </block> |
536 | + <block wx:if="{{item.ename=='luckyactivityNew'}}"> | ||
537 | + <!-- <luckyGo object="{{item.content}}"></luckyGo> --> | ||
538 | + <diy_public object="{{item.content}}" prom_type="9"></diy_public> | ||
539 | + </block> | ||
533 | 540 | ||
534 | <!-- 服务卡项 --> | 541 | <!-- 服务卡项 --> |
535 | <block wx:if="{{item.ename=='servicecategory'}}"> | 542 | <block wx:if="{{item.ename=='servicecategory'}}"> |
pages/template/index.json
@@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
11 | "searchbox":"/components/diy_searchbox/diy_searchbox", | 11 | "searchbox":"/components/diy_searchbox/diy_searchbox", |
12 | "shopname": "/components/diy_shopname/diy_shopname", | 12 | "shopname": "/components/diy_shopname/diy_shopname", |
13 | "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy", | 13 | "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy", |
14 | + "luckyGo": "/components/diy_luckyGo/diy_luckyGo", | ||
14 | "diy_public": "/components/diy_public/diy_public", | 15 | "diy_public": "/components/diy_public/diy_public", |
15 | "title": "/components/diy_title/diy_title", | 16 | "title": "/components/diy_title/diy_title", |
16 | "notice": "/components/diy_notice/diy_notice", | 17 | "notice": "/components/diy_notice/diy_notice", |
pages/template/index.wxml
@@ -41,9 +41,12 @@ | @@ -41,9 +41,12 @@ | ||
41 | <diy_public object="{{item.content}}" prom_type="6"></diy_public> | 41 | <diy_public object="{{item.content}}" prom_type="6"></diy_public> |
42 | </block> | 42 | </block> |
43 | <!--秒杀--> | 43 | <!--秒杀--> |
44 | - <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}"> | 44 | + <block wx:if="{{item.ename=='seckill'}}"> |
45 | <seckill object="{{item.content}}"></seckill> | 45 | <seckill object="{{item.content}}"></seckill> |
46 | </block> | 46 | </block> |
47 | + <block wx:if="{{item.ename=='seckillNew'}}"> | ||
48 | + <diy_public object="{{item.content}}" prom_type="1"></diy_public> | ||
49 | + </block> | ||
47 | <!--标题--> | 50 | <!--标题--> |
48 | <block wx:if="{{item.ename=='title'}}"> | 51 | <block wx:if="{{item.ename=='title'}}"> |
49 | <title object="{{item.content}}"></title> | 52 | <title object="{{item.content}}"></title> |
@@ -79,6 +82,15 @@ | @@ -79,6 +82,15 @@ | ||
79 | <block wx:if="{{item.ename=='groupbuyNew'}}"> | 82 | <block wx:if="{{item.ename=='groupbuyNew'}}"> |
80 | <diy_public object="{{item.content}}" prom_type="2"></diy_public> | 83 | <diy_public object="{{item.content}}" prom_type="2"></diy_public> |
81 | </block> | 84 | </block> |
85 | + | ||
86 | + <!-- 幸运购 --> | ||
87 | + <block wx:if="{{item.ename=='luckyactivity'}}"> | ||
88 | + <luckyGo object="{{item.content}}"></luckyGo> | ||
89 | + </block> | ||
90 | + <block wx:if="{{item.ename=='luckyactivityNew'}}"> | ||
91 | + <!-- <luckyGo object="{{item.content}}"></luckyGo> --> | ||
92 | + <diy_public object="{{item.content}}" prom_type="9"></diy_public> | ||
93 | + </block> | ||
82 | </view> | 94 | </view> |
83 | </block> | 95 | </block> |
84 | </view> | 96 | </view> |