Commit 9582b6a26ac8822b02258ea0ad0fd0c25a57ca3f
1 parent
1d80bc8e
自定义组件优化
Showing
4 changed files
with
32 additions
and
13 deletions
components/diy_public/diy_public.js
@@ -54,6 +54,7 @@ Component({ | @@ -54,6 +54,7 @@ Component({ | ||
54 | }, | 54 | }, |
55 | nav1:'/packageA/pages/goodsInfo/goodsInfo?', | 55 | nav1:'/packageA/pages/goodsInfo/goodsInfo?', |
56 | nav2:'/pages/goods/goodsInfo/goodsInfo?', | 56 | nav2:'/pages/goods/goodsInfo/goodsInfo?', |
57 | + | ||
57 | }, | 58 | }, |
58 | 59 | ||
59 | pageLifetimes: { | 60 | pageLifetimes: { |
@@ -345,7 +346,8 @@ Component({ | @@ -345,7 +346,8 @@ Component({ | ||
345 | } | 346 | } |
346 | if (th.data.prom_type==9) { //幸运购 | 347 | if (th.data.prom_type==9) { //幸运购 |
347 | price = (all_array[i].group_price / 100) + '' | 348 | price = (all_array[i].group_price / 100) + '' |
348 | - all_array[i].buy_num = all_array[i].group_joined | 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 | ||
349 | all_array[i].goods_name = all_array[i].title | 351 | all_array[i].goods_name = all_array[i].title |
350 | } | 352 | } |
351 | 353 | ||
@@ -360,7 +362,11 @@ Component({ | @@ -360,7 +362,11 @@ Component({ | ||
360 | 362 | ||
361 | 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 |
362 | all_array[i].residue = (all_array[i].residue >= 0) ? all_array[i].residue : 0 | 364 | all_array[i].residue = (all_array[i].residue >= 0) ? all_array[i].residue : 0 |
363 | - console.error(all_array[i].residue); | 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); | ||
364 | 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) { |
365 | empty.push(all_array[i]) | 371 | empty.push(all_array[i]) |
366 | } | 372 | } |
@@ -470,7 +476,14 @@ Component({ | @@ -470,7 +476,14 @@ Component({ | ||
470 | sec: '00' | 476 | sec: '00' |
471 | } | 477 | } |
472 | } | 478 | } |
473 | - 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 | + } | ||
474 | ee.setData({ | 487 | ee.setData({ |
475 | [txt]: obj | 488 | [txt]: obj |
476 | }); | 489 | }); |
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;' : ''}}"> |
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> |
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> |