Commit c1a60bad1dc98dc05f05db7bc1c24e725acad7a2
1 parent
13dcd44c
秒杀组件优化
Showing
1 changed file
with
12 additions
and
12 deletions
components/diy_seckill/diy_seckill.wxml
... | ... | @@ -30,7 +30,7 @@ |
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;"> |
31 | 31 | 已售罄 |
32 | 32 | </view> |
33 | - <view wx:else style="{{'height: 70rpx;padding: 10rpx 30rpx;background:'+ object.countdown_background_color}}" class="new_item1_time"> | |
33 | + <view wx:else style="{{'height: 70rpx;padding: 10rpx 30rpx;background:'+ (aitem.status ==0 ? object.scountdown_background_color : (aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color))}}" class="new_item1_time"> | |
34 | 34 | <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> |
35 | 35 | <view style="text-align: center;"> |
36 | 36 | <view wx:if="{{aitem.status == 1}}">距结束时间</view> |
... | ... | @@ -84,7 +84,7 @@ |
84 | 84 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
85 | 85 | <view>已售罄</view> |
86 | 86 | </view> |
87 | - <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
87 | + <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | |
88 | 88 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
89 | 89 | </view> |
90 | 90 | </block> |
... | ... | @@ -126,14 +126,14 @@ |
126 | 126 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
127 | 127 | <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> |
128 | 128 | </view> |
129 | - <!-- <view class="new_item1_time" wx:if="{{object.count_down}}" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
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> |
131 | 131 | </view> --> |
132 | 132 | <block wx:if="{{object.count_down}}"> |
133 | 133 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
134 | 134 | <view>已售罄</view> |
135 | 135 | </view> |
136 | - <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
136 | + <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | |
137 | 137 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
138 | 138 | </view> |
139 | 139 | </block> |
... | ... | @@ -176,14 +176,14 @@ |
176 | 176 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
177 | 177 | <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> |
178 | 178 | </view> |
179 | - <!-- <view class="new_item1_time" wx:if="{{object.count_down}}" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
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> |
181 | 181 | </view> --> |
182 | 182 | <block wx:if="{{object.count_down}}"> |
183 | 183 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
184 | 184 | <view>已售罄</view> |
185 | 185 | </view> |
186 | - <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
186 | + <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | |
187 | 187 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
188 | 188 | </view> |
189 | 189 | </block> |
... | ... | @@ -233,7 +233,7 @@ |
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;"> |
234 | 234 | 已售罄 |
235 | 235 | </view> |
236 | - <view wx:else style="{{'height: 70rpx;padding: 10rpx 30rpx;background:'+ object.countdown_background_color}}" class="new_item1_time"> | |
236 | + <view wx:else style="{{'height: 70rpx;padding: 10rpx 30rpx;background:'+ (aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}" class="new_item1_time"> | |
237 | 237 | <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> |
238 | 238 | <view style="text-align: center;"> |
239 | 239 | <view wx:if="{{aitem.status == 1}}">距结束时间</view> |
... | ... | @@ -280,7 +280,7 @@ |
280 | 280 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
281 | 281 | <view>已售罄</view> |
282 | 282 | </view> |
283 | - <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
283 | + <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | |
284 | 284 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
285 | 285 | </view> |
286 | 286 | </block> |
... | ... | @@ -319,7 +319,7 @@ |
319 | 319 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
320 | 320 | <view>已售罄</view> |
321 | 321 | </view> |
322 | - <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
322 | + <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | |
323 | 323 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
324 | 324 | </view> |
325 | 325 | </block> |
... | ... | @@ -363,7 +363,7 @@ |
363 | 363 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
364 | 364 | <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> |
365 | 365 | </view> |
366 | - <view class="new_item1_time" wx:if="{{object.count_down}}" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
366 | + <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)}}"> | |
367 | 367 | <!-- <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> --> |
368 | 368 | <!-- <view style="text-align: center;"> |
369 | 369 | <view>距结束时间</view> --> |
... | ... | @@ -411,14 +411,14 @@ |
411 | 411 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
412 | 412 | <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> |
413 | 413 | </view> |
414 | - <!-- <view class="new_item1_time" wx:if="{{object.count_down}}" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
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> |
416 | 416 | </view> --> |
417 | 417 | <block wx:if="{{object.count_down}}"> |
418 | 418 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
419 | 419 | <view>已售罄</view> |
420 | 420 | </view> |
421 | - <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+object.countdown_background_color}}"> | |
421 | + <view wx:else class="new_item1_time" style="{{'justify-content: center;background:'+(aitem.status ==0 ? object.scountdown_background_color : object.countdown_background_color)}}"> | |
422 | 422 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
423 | 423 | </view> |
424 | 424 | </block> | ... | ... |