<!-- 秒杀专场 -->
<!-- pages/snapUpList/snapUpList.wxml -->
<view class="seckill-box">
  <view class="banner">
    <view class="bg">
      <image src="../../images/icon/flash-bg.png"></image>
    </view>
    <view class="img">
      <image src="../../images/icon/flash-banner.png"></image>
    </view>
  </view>
  <view class="seckill-list">
    <!-- 秒杀商品 -->
    <block wx:for="{{seckillList}}" wx:key="seckillId">
      <view class="item" bindtap="toSeckillDetaile" data-seckillid='{{item.seckillId}}'>
        <!-- 商品图片 -->
        <view class="img-box">
          <image src="{{item.pic}}" mode="aspectFit"></image>
        </view>
        <!-- 商品信息 -->
        <view class="goods-msg">
          <!-- 秒杀在进行 -->
          <view class="countdown-box" wx:if="{{countDownList[index].type===1}}">
            <view class="tip">距结束</view>
            <view class="num">{{countDownList[index].day}}</view>
            <view class="text">天</view>
            <view class="num">{{countDownList[index].hou}}</view>
            <view class="text">:</view>
            <view class="num">{{countDownList[index].min}}</view>
            <view class="text">:</view>
            <view class="num">{{countDownList[index].sec}}</view>
          </view>
          <!-- 秒杀未开始 -->
          <view class="countdown-box" wx:if="{{countDownList[index].type!=1}}">
            <view class="tip">距开始</view>
            <view class="num">{{countDownList[index].day}}</view>
            <view class="text">天</view>
            <view class="num">{{countDownList[index].hou}}</view>
            <view class="text">:</view>
            <view class="num">{{countDownList[index].min}}</view>
            <view class="text">:</view>
            <view class="num">{{countDownList[index].sec}}</view>
          </view>
          <view class="goods-name">
            <view class="discounts">减{{wxs.toPrice(item.price - item.seckillPrice)}}元</view>
            <view class="name">{{item.prodName}}</view>
          </view>
          <view class="progress-box">
            <view class="bg-box">
              <view class="progress" style="width: {{wxs.rounding((item.seckillOriginStocks - item.seckillTotalStocks) * 100 / item.seckillOriginStocks)}}%"></view>
            </view>
            <view class="text">已抢{{wxs.rounding((item.seckillOriginStocks - item.seckillTotalStocks) * 100 / item.seckillOriginStocks)}}%</view>
          </view>
          <view class="goods-price">
            <view class="price-box">
              <text class="current-price"><text class="sub">￥</text>{{wxs.toPrice(item.seckillPrice)}}</text>
              <text class="original-price">￥{{wxs.toPrice(item.price)}}</text>
            </view>
            <view class="residue">仅剩{{item.seckillTotalStocks}}件</view>
          </view>
        </view>
      </view>
    </block>

    <!-- 空 -->
    <view class="empty {{current==pages?'all':''}}" wx:if="{{seckillList.length==0 || current==pages}}">
      <view class="empty-icon" wx:if="{{seckillList.length==0}}">
        <image src="../../images/icon/empty.png"></image>
      </view>
      <view class="empty-text">{{current==pages?'已经到底了~':'商家还未发布秒杀相关商品'}}</view>
    </view>
  </view>
</view>

<wxs module="wxs" src="../../wxs/number.wxs" />