diy_seckill.wxml
15.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<block wx:if="{{goods_array.length>0}}">
<!--新版秒杀组件-->
<block wx:if="{{object.column_action_name}}">
<view class='top' bindtap="go_to_skill" wx:if="{{object.column_title}}" style="{{'background-image:url('+object.column_diy_title+')'}}">
<view class="flex">
<view class='t_left'></view>
<view class='t_ms'>{{object.column_name}}</view>
</view>
<view class='right_k'>
<image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image>
</view>
</view>
<!-- 大图模式 -->
<block wx:if="{{object.style==1}}">
<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 ':'')}}">
<block wx:for="{{goods_array}}">
<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.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}">
<navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
<view class="imgBox">
<!-- <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> -->
<view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}">
<!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
<image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
</view>
<image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
<image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image>
</view>
<view class="new_item1_time" wx:if="{{object.count_down}}">
<image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image>
<view style="text-align: center;">
<view>距结束时间</view>
<view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view>
</view>
</view>
<view class="ellipsis-2 new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view>
<view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
<view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}">
<view class="flex" style="{{'font-size: 28rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}">
<view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text style="font-size:42rpx;">{{aitem.price}}</text></view>
<view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
</view>
<view style="color: rgb(56, 56, 56);">
<text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件,</text>
<text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">20</text>件</text>
</view>
</view>
<view>
<image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 122rpx;height: 122rpx;"></image>
<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>
</view>
</view>
</navigator>
</view>
</block>
</view>
</block>
<!-- 一行两个 -->
<block wx:if="{{object.style==2}}">
<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 ':'')}}">
<block wx:for="{{goods_array}}">
<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.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}">
<navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
<view class="imgBox">
<!-- <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> -->
<view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}">
<!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
<image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
</view>
<image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
<image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image>
</view>
<view class="new_item1_time" wx:if="{{object.count_down}}" style="justify-content: center;">
<!-- <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> -->
<!-- <view style="text-align: center;">
<view>距结束时间</view> -->
<view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view>
<!-- </view> -->
</view>
<view class="ellipsis-2 new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view>
<view class="new_item1_price" style="color: rgb(56, 56, 56);">
<text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件,</text>
<text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">20</text>件</text>
</view>
<view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
<view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}">
<view style="{{'font-size: 28rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}">
<view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text style="font-size:42rpx;">{{aitem.price}}</text></view>
<view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
</view>
</view>
<view>
<image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 122rpx;height: 122rpx;"></image>
<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>
</view>
</view>
</navigator>
</view>
</block>
</view>
</block>
</block>
<block wx:else>
<!--秒杀-->
<view class='top' bindtap="go_to_skill">
<view class="flex">
<view class='t_left'></view>
<view class='t_ms'>秒杀</view>
</view>
<view class='right_k'>
<image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image>
</view>
</view>
<!--商品展示-->
<swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}">
<view class='sp' wx:if="{{object.style==1}}">
<swiper-item class="s_it" wx:for="{{goods_array}}">
<block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
<!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&prom_type=1&prom_id={{aitem.id}}" class="s1_gk_a1"> -->
<navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
<view class='one'>
<view class='sp_top'>
<view class='po'></view>
<block wx:if="{{aitem.status == 0}}">
<view class="rob" style="justify-content: flex-start">
<span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span>
</view>
</block>
<block wx:if="{{aitem.status == 1}}">
<view class="rob" style="justify-content: flex-start">
<span class='s_top_kill'>火热进行</span>
</view>
</block>
<block wx:if="{{aitem.status == 2}}">
<view class="rob" style="justify-content: flex-start">
<span class='s_top_kill gray'>已抢光</span>
</view>
</block>
<block wx:if="{{aitem.status == 3}}">
<view class="rob" style="justify-content: flex-start">
<span class='s_top_kill gray'>活动已结束</span>
</view>
</block>
<view class='clear'></view>
<view class='s_img'>
<image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
</view>
<view class='s_foot_kill'>
<text>{{aitem.djs.day}}天</text>
<text>{{aitem.djs.hou}}时</text>
<text>{{aitem.djs.min}}分</text>
<text>{{aitem.djs.sec}}秒</text>
</view>
<view class='clear'></view>
</view>
<view class='sp_wz'>
<view class='sp_wzi ellipsis-2'>{{aitem.goods_name}}</view>
<view class='sp_jg'>¥{{aitem.price}}</view>
<view wx:if="{{is_retail_price}}"class='sp_jgx ~no_line_x'>¥{{aitem.market_price}}</view>
</view>
</view>
</navigator>
</block>
</swiper-item>
</view>
</swiper>
<view class="sp2" wx:if="{{object.style==2}}">
<block wx:for="{{goods_array}}">
<block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
<!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&prom_type=1&prom_id={{aitem.id}}" class="s1_gk_a1"> -->
<navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
<view class='one1'>
<view class="o1_img">
<image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
</view>
<view class="o1_right">
<view class="sp_wzi ellipsis-2">{{aitem.title}}</view>
<view class="o1_sj_kill">
<text>{{aitem.djs.day}}</text> 天
<text>{{aitem.djs.hou}}</text> :
<text>{{aitem.djs.min}}</text> :
<text>{{aitem.djs.sec}}</text>
</view>
<view class="money">
<view class='sp_jg'>¥{{aitem.price}}</view>
<!-- <view class='sp_jgx'>¥{{aitem.market_price}}</view>-->
</view>
<block wx:if="{{aitem.status == 0}}">
<view class="rob">
<view class="wo" style="background-color: #adadad">正在预热</view>
</view>
</block>
<block wx:if="{{aitem.status == 3}}">
<view class="rob">
<view class="wo" style="background-color: #adadad">已结束</view>
</view>
</block>
<block wx:else>
<block wx:if="{{aitem.status == 1}}">
<view class="rob">
<view class="wo">我要抢</view>
</view>
</block>
<block wx:if="{{aitem.status == 2}}">
<view class="rob">
<view class="wo" style="background-color: #adadad">已抢光</view>
</view>
</block>
</block>
</view>
</view>
</navigator>
</block>
</block>
</view>
<view class='clear'></view>
</block>
</block>