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,7 +30,7 @@ | ||
| 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;"> | 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 | </view> | 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 | <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> | 34 | <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> |
| 35 | <view style="text-align: center;"> | 35 | <view style="text-align: center;"> |
| 36 | <view wx:if="{{aitem.status == 1}}">距结束时间</view> | 36 | <view wx:if="{{aitem.status == 1}}">距结束时间</view> |
| @@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
| 84 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | 84 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
| 85 | <view>已售罄</view> | 85 | <view>已售罄</view> |
| 86 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 88 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 89 | </view> | 89 | </view> |
| 90 | </block> | 90 | </block> |
| @@ -126,14 +126,14 @@ | @@ -126,14 +126,14 @@ | ||
| 126 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | 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'}}"></image> |
| 128 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 130 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 131 | </view> --> | 131 | </view> --> |
| 132 | <block wx:if="{{object.count_down}}"> | 132 | <block wx:if="{{object.count_down}}"> |
| 133 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | 133 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
| 134 | <view>已售罄</view> | 134 | <view>已售罄</view> |
| 135 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 137 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 138 | </view> | 138 | </view> |
| 139 | </block> | 139 | </block> |
| @@ -176,14 +176,14 @@ | @@ -176,14 +176,14 @@ | ||
| 176 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | 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'}}"></image> |
| 178 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 180 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 181 | </view> --> | 181 | </view> --> |
| 182 | <block wx:if="{{object.count_down}}"> | 182 | <block wx:if="{{object.count_down}}"> |
| 183 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | 183 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
| 184 | <view>已售罄</view> | 184 | <view>已售罄</view> |
| 185 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 187 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 188 | </view> | 188 | </view> |
| 189 | </block> | 189 | </block> |
| @@ -233,7 +233,7 @@ | @@ -233,7 +233,7 @@ | ||
| 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;"> | 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 | </view> | 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 | <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> | 237 | <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> |
| 238 | <view style="text-align: center;"> | 238 | <view style="text-align: center;"> |
| 239 | <view wx:if="{{aitem.status == 1}}">距结束时间</view> | 239 | <view wx:if="{{aitem.status == 1}}">距结束时间</view> |
| @@ -280,7 +280,7 @@ | @@ -280,7 +280,7 @@ | ||
| 280 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | 280 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
| 281 | <view>已售罄</view> | 281 | <view>已售罄</view> |
| 282 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 284 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 285 | </view> | 285 | </view> |
| 286 | </block> | 286 | </block> |
| @@ -319,7 +319,7 @@ | @@ -319,7 +319,7 @@ | ||
| 319 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | 319 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
| 320 | <view>已售罄</view> | 320 | <view>已售罄</view> |
| 321 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 323 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 324 | </view> | 324 | </view> |
| 325 | </block> | 325 | </block> |
| @@ -363,7 +363,7 @@ | @@ -363,7 +363,7 @@ | ||
| 363 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | 363 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
| 364 | <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> | 364 | <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image> |
| 365 | </view> | 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 | <!-- <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> --> | 367 | <!-- <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> --> |
| 368 | <!-- <view style="text-align: center;"> | 368 | <!-- <view style="text-align: center;"> |
| 369 | <view>距结束时间</view> --> | 369 | <view>距结束时间</view> --> |
| @@ -411,14 +411,14 @@ | @@ -411,14 +411,14 @@ | ||
| 411 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> | 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'}}"></image> |
| 413 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 415 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 416 | </view> --> | 416 | </view> --> |
| 417 | <block wx:if="{{object.count_down}}"> | 417 | <block wx:if="{{object.count_down}}"> |
| 418 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> | 418 | <view wx:if="{{aitem.residue==0}}" class="new_item1_time" style="justify-content: center;color: #fff;background-color:rgb(166,166,166);"> |
| 419 | <view>已售罄</view> | 419 | <view>已售罄</view> |
| 420 | </view> | 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 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> | 422 | <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view> |
| 423 | </view> | 423 | </view> |
| 424 | </block> | 424 | </block> |