<!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> -->
<navbar back home background="#fff" text="限时抢购"></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<!-- 限时抢购 查看更多对应的页面 -->
<view wx:if="{{showPage}}" >
  <view wx:for="{{list}}" wx:if="{{item.targetA!='end'&&list.length>0}}" class='flashSaleItemWrap' wx:key="index">
    <view class='flashSaleItem' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap="gotodetail">
      <view class='flashSaleItemTop'>
        <view class='flashSaleItemTopL'>
          <image mode='aspectFill' src='{{item.coverImg}}' class='food' lazy-load="true"></image>
        </view>
        <view class='flashSaleItemTopR'>
          <view class='flashSaleItemTopRTop'>
            <text class='foodname'>{{item.title}}</text>
            <text class='small'>{{item.subTitle}}</text>
          </view>
          <view class='flashSaleItemTopRBottom'>
            <view class='presentPrice'><text class='sale'>售价:</text><text class='yuan'>￥</text><text class='yj'>{{item.salePriceStr}}</text><text class='originalPrice'>{{item.priceStr}}元</text></view>
          </view>
        </view>
      </view>
      <image class='lines' src='{{linesUrl}}' mode='widthFix'></image>
      <view class='flashSaleItemBottom'>
        <view class='flashSaleItemBottomTop'>
          <text class='remainingTime' wx:if="{{item.activityStatus==1}}">距结束：</text>
          <text class='remainingTime' wx:if="{{item.activityStatus==0}}">距开始：</text>
          <text wx:if="{{item.flags=='end'&&item.activityStatus==2}}" class='realRemainingTime'>活动已结束</text>
          <text wx:if="{{item.flags!='end'&&item.activityStatus==1}}" class='realRemainingTime'>{{item.endtime}}</text>
          <text wx:if="{{item.flags!='end'&&item.activityStatus==0}}" class='realRemainingTime'>{{item.beginTime}}</text>
        </view>
        <view class='flashSaleItemBottomBottm'>
          <view class="view1">
            <text class="remainingNumber" wx:if="{{item.activityStatus!=0}}">已售{{item.alsells}}%</text>
            <text class="remainingNumber" wx:if="{{item.activityStatus==0}}">已售0%</text>
            <progress percent="{{(item.inventory-item.remainInventory)/item.inventory*100}}" wx:if="{{item.activityStatus!=0}}" stroke-width="6" activeColor="#FD782D" />
            <progress percent="0" wx:if="{{item.activityStatus==0}}" stroke-width="6" activeColor="#FD782D" />
          </view>
          <view class='buy' wx:if="{{item.salePriceStr!=0&&item.activityStatus!=0&&item.remainInventory!=0}}">马上购</view>
          <view class='buy' wx:if="{{item.salePriceStr==0&&item.remainInventory!=0}}">立即领</view>
          <view class='buy' style='background:#999;color:#fff;border:1px solid #999;' wx:if="{{item.remainInventory==0}}">已售罄</view>
          <view class='buy' wx:if="{{item.activityStatus==0}}">即将开始</view>
          <view class='buy' wx:if="{{item.flags=='end'}}" style='background:#999;color:#fff;border:1px solid #999;'>已结束</view>
        </view>
      </view>
    </view>
  </view>
  <view class='expect' wx:if="{{list.length==0}}">
    <image src='{{wmgift}}' mode='widthFix'></image>
    <text>请您敬请期待</text>
    <text>我们正在筹备一大堆优惠活动</text>
  </view>
  <view class="loading" wx:if="{{loading}}">
    <image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}
  </view>
</view>