<!--pages/flashsale/flashsale.wxml-->
<view style="{{'background:'+(params.bgcolor?params.bgcolor:'')+';'}}">
  <view class="rush-buy">
    <view class="h4" style="'height:1.875rem;line-height:1.875rem;font-size:1rem;text-align:left;'+'background:'+(params.bgcolor?params.bgcolor:'')+';'+'color:'+(params.titlecolor?params.titlecolor:'')+';'" wx:if="{{params.showtitle == 1?true:false}}">{{params.title}}</view>
    <view class="single-row" wx:if="{{params.style=='100%'}}" wx:for="{{data}}" catchtap="buy" wx:key="index" data-item="{{item}}" wx:for-item="item">
      <view class="img">
        <image src="{{item.img?item.img:'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/loading.jpg'}}" mode='aspectFill' />
        <view class="sale-img {{params.option?params.option:''}}"></view>
        <view class="time-box" wx:if="{{params.countdown}}">
          <block wx:if="{{item.begShow}}">
            <view class="left">距离结束还剩：</view>
          </block>
          <block wx:else>
            <view class="left">距离开始还剩：</view>
          </block>
          <view class="content">
            <view class="date">{{item.day}}</view>
            <view class="mes">天</view>
            <view class="date">{{item.hou}}</view>
            <view class="mes">时</view>
            <view class="date">{{item.min}}</view>
            <view class="mes">分</view>
            <view class="date">{{item.sec}}</view>
            <view class="mes">秒</view>
          </view>
        </view>
      </view>
      <view class="ul text">
        <view class="li title">
          <view class="h2" wx:if="{{params.showname == '1'}}">{{item.name}}</view>
          <view class="span" wx:if="{{params.overage}}" style="flex: 2;">仅剩
            <text class="big">{{item.stock}}</text>件</view>
        </view>
        <view class="li price">
          <view class="span left" wx:if="{{params.price != '0' && params.price == 1?true:false}}">
            <view class="font price-a" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">
              <text class="small">{{language['money']}}</text>{{item.pricenow}}</view>
            <view class="font price-b" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}" wx:if="{{!(item.pricenow ==  item.priceold)}}">
              <text class="small">{{language['money']}}</text>{{item.priceold}}</view>
          </view>
          <view class="span left" wx:if="{{params.price != '0' && params.price == 2?true:false}}">
            <view class="font price-a" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">
              <text class="small">{{language['money']}}</text>{{item.pricenow}}</view>
          </view>
          <view class="button_1 {{params.buysub}}" style="color:#f15353;" type="button" wx:if="{{params.buysub}}" catchtap="buy" data-item="{{item}}">立即抢购</view>
        </view>
      </view>
    </view>
    <view class="double-row" wx:if="{{params.style=='49.5%'?true:false}}">
      <view class="dl list-box" wx:for-item="item" wx:for="{{data}}" catchtap="buy" data-item="{{item}}" wx:key="index">
        <view class="dt img">
          <image src="{{item.img?item.img:'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/loading.jpg'}}" mode='aspectFill' />
          <view class="sale-img {{params.option?params.option:''}}"></view>
          <view class="time-box" wx:if="{{params.countdown}}">
            <block wx:if="{{!item.begShow}}">
              <view class="left" style="color: #fff;">距开始还剩：</view>
            </block>
            <view class="content">
              <view class="date">{{item.day}}</view>
              <view class="mes">天</view>
              <view class="date">{{item.hou}}</view>
              <view class="mes">时</view>
              <view class="date">{{item.min}}</view>
              <view class="mes">分</view>
              <view class="date">{{item.sec}}</view>
              <view class="mes">秒</view>
            </view>
          </view>
        </view>
        <view class="dt text">
          <view class="h2" wx:if="{{params.showname == '1'}}">{{item.name}}</view>
          <view class="dd price" wx:if="{{params.price != '0' && params.price == 1?true:false}}">
            <view class="span left" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">
              <text class="small">{{language['money']}}</text>{{item.pricenow}}</view>
            <view class="span right" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}" wx:if="{{!(item.pricenow ==  item.priceold)}}">
              <text class="small"></text>{{language['money']}}{{item.priceold}}</view>
          </view>
          <view class="dd price" wx:if="{{params.price != '0' && params.price == 2?true:false}}">
            <view class="left span" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">
              <text class="small">{{language['money']}}</text>{{item.pricenow}}</view>
          </view>
          <view class="dd rob">
            <view class="span left" wx:if="{{params.overage}}">仅剩
              <text class="big">{{item.stock}}</text>件</view>
            <view class="button_1 {{params.buysub?params.buysub:''}}" wx:if="{{params.buysub}}" data-item="{{item}}" catchtap="buy">立即抢购</view>
          </view>
        </view>
      </view>
    </view>
    <view class="three-row" wx:if="{{params.style=='33.3%'?true:false}}">
      <view class="dl list-box" wx:key="index" wx:for-item="item" wx:for="{{data}}" catchtap="buy" data-item="{{item}}">
        <view class="dt img">
          <image src="{{item.img?item.img:'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/loading.jpg'}}" mode='aspectFill' />
          <view class="sale-img {{params.option?params.option:''}}"></view>
          <view class="time-box" wx:if="{{params.countdown}}">
            <block wx:if="{{!item.begShow}}">
              <view class="left" style="color: #fff;">距开始还剩：</view>
            </block>
            <view class="content">
              <view class="date">{{item.day}}</view>
              <view class="mes">天</view>
              <view class="date">{{item.hou}}</view>
              <view class="mes">时</view>
              <view class="date">{{item.min}}</view>
              <view class="mes">分</view>
              <view class="date">{{item.sec}}</view>
              <view class="mes">秒</view>
            </view>
          </view>
        </view>
        <view class="dt text">
          <view class="h2" wx:if="{{params.showname == '1'}}">{{item.name}}</view>
          <view class="dd price" wx:if="{{params.price != '0' && params.price == 1?true:false}}">
            <view class="span price-a" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">
              <text class="small">{{language['money']}}</text>{{item.pricenow}}</view>
          </view>
          <view class="dd price" wx:if="{{params.price != '0' && params.price == 2?true:false}}">
            <view class="span price-a" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">
              <text class="small">{{language['money']}}</text>{{item.pricenow}}</view>
          </view>
          <view class="dd rob">
            <view class="span left" wx:if="{{params.overage}}">仅剩
              <text class="big">{{item.stock}}</text>件</view>
          </view>
          <view class="dd button" wx:if="{{params.buysub}}">
            <view class="button_1 {{params.buysub?params.buysub:''}}" data-item="{{item}}" catchtap="buy">立即抢购</view>
          </view>
        </view>
      </view>
    </view>
    <view class="across-row" wx:if="{{params.style=='hp'?true:false}}">
      <view class="list" wx:for-item="item" wx:key="index" wx:for="{{data}}" catchtap="buy" data-item="{{item}}">
        <view class="img">
          <image src="{{item.img?item.img:'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/loading.jpg'}}" mode='aspectFill' />
          <view class="sale-img {{params.option?params.option:''}}"></view>
          <view class="time-box" wx:if="{{params.countdown}}">
            <block wx:if="{{!item.begShow}}">
              <view class="left" style="color: #fff;">距开始还剩：</view>
            </block>
            <view class="content" style="font-size: 26rpx;">
              <view class="date">{{item.day}}</view>
              <view class="mes">天</view>
              <view class="date">{{item.hou}}</view>
              <view class="mes">时</view>
              <view class="date">{{item.min}}</view>
              <view class="mes">分</view>
              <view class="date">{{item.sec}}</view>
              <view class="mes">秒</view>
            </view>
          </view>
        </view>
        <view class="ul text">
          <view class="h2" wx:if="{{params.showname == '1'}}">{{item.name}}</view>
          <view class="li price" wx:if="{{params.price != '0' && params.price == 1?true:false}}">
            <view class="span price-a" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">
              <text class="small">{{language['money']}}</text>{{item.pricenow}}</view>
            <view class="font price-b" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}" wx:if="{{!(item.pricenow ==  item.priceold)}}">
              <text class="small">{{language['money']}}</text>{{item.priceold}}</view>
          </view>
          <view class="li price" wx:if="{{params.price != '0' && params.price == 2?true:false}}">
            <view class="span price-a" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">
              <text class="small">{{language['money']}}</text>{{item.pricenow}}</view>
          </view>
          <view class="li rob">
            <view class="span left" wx:if="{{params.overage}}">仅剩
              <text class="big">{{item.stock}}</text>件</view>
          </view>
          <view class="li button" wx:if="{{params.buysub}}">
            <view class="button_1 {{params.buysub?params.buysub:''}}" data-item="{{item}}" catchtap="buy">立即抢购</view>
          </view>
        </view>
      </view>
    </view>
  </view>
</view>
