<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
<wxs module="g_filter" src="g_filter.wxs"></wxs>
<view class=" body_frame">

<block wx:if="{{ad_data}}">
 
   <swiper class="swiper" circular="true"  autoplay="true"
             indicator-dots="true" interval="2500" style="height:{{max_sw_height}}rpx" >
      <block wx:for="{{ad_data}}" wx:key="as">    
  	
          <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}">
            <swiper-item>
                 <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad"  data-index="{{index}}"   class="slide-image" mode="widthFix" lazy-load="true"/>
            </swiper-item>
          </navigator>
  
          <view data-url="{{item.ad_weapplink}}" class="s1_gk_a1" bindtap="go_url" wx:else>
            <swiper-item>
                <image src="{{item.ad_code}}" style="width: 100%;"  bindload="imageLoad"  data-index="{{index}}"  class="slide-image" mode="widthFix" lazy-load="true"/>
            </swiper-item>
          </view>     
  
      </block>
    </swiper>  
</block>


<view class="kill-list seckill_list"> 
    <view class="kill-item" wx:for="{{goodlist}}" wx:key="gs">
        <navigator class="kill-pic rel" url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">
            <image class="wh100" src="{{url+item.original_img}}" data-val="{{item.original_img}}"
                data-errorimg="goodlist[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image>
        </navigator>
        <view class="kill-cont">
            <navigator class="goods-name ellipsis-2"
                       url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">{{item.goods_name}}</navigator>
            <view class="flex-vertical xc-strip-frame">
            <view class="xc-strip-blank rel">

            <view class="flex-vertical rel total" style="background-color: {{item.type == 0 ? '#059de5' : item.type == 1 ? '#ffe3e2' :  ''}};">
               <view wx:if="{{item.type == 1}}" class="t-c abs xc-fill" style="background: #e4374d;width: calc({{filters.toFix(100-(item.buy_goodnum+item.virtual_qty)/(item.presell_sumqty+item.virtual_qty)*100,0)||100}} * 1%);"></view>
               <text wx:if="{{item.type == 1}}" class="fs20 white abs xc-fill-text">剩余{{filters.toFix(100-(item.buy_goodnum+item.virtual_qty)/(item.presell_sumqty+item.virtual_qty)*100,0)||100}}%</text>
               <text wx:else class="fs20 white abs xc-fill-text">已预售0</text>
            </view>
           
            </view>
            <view wx:if="{{item.type == 1}}" class=" ml10 fs20">库存还剩{{item.presell_sumqty-item.buy_goodnum}}件</view>
            <view wx:else class=" ml10 fs20">库存还剩{{item.presell_sumqty+item.virtual_qty}}件</view>
           </view>

           
            <view class="goods-num">
                <view>
                    <view class="blue_c" wx:if="{{item.type == 0 && false}}" style="display: none;position: absolute;margin-top: -40rpx;">
                        <text>剩余：</text>
                        <text class='tui-conutdown-box'>{{item.djs.day}}</text>天
                        <text class='tui-conutdown-box'>{{item.djs.hou}}</text>时
                        <text class='tui-conutdown-box'>{{item.djs.min}}</text>分
                        <text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒
                    </view>

                    <view class="fs40 flex xc-buttom-money {{item.type==1?'xc-wc':'blue_c'}}" >
                    <view class="fs28" style="line-height: 16px;">￥{{item.presell_price}}</view>
                    <text>{{item.price}}</text> 
<!--                    <span class="underline fs20">零售价￥{{item.market_price}}</span>-->
                    </view>
                </view>
                <view class="kill-btn ">
                    <navigator wx:if="{{item.type==1}}" url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">去抢购</navigator>
                    <!-- <navigator wx:else url="/packageC/pages/presell/pregoodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator> -->
                    <navigator wx:else url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator>
                </view>
                
            </view>
        </view>
    </view>
</view>

<block wx:if="{{goodlist.length==0 && is_get}}">
<nodata  nodataContainer="t-c"></nodata>
</block>

  <view class="no-more" wx:elif="{{no_more}}">-- 没有更多 --</view>
  <view style="height:10rpx"></view>

  <!-- 底部按钮 暂时隐藏-->
  <!--
  <view class="kill-time xc-seckill-bottom">
    <view class="theader" >
        <view bindtap='tip' data-ty="1" class="xc-border-right flex-center timeac left {{type==1?'active':''}}">
            <image class="xc-bottom" src="{{url}}{{type==1?'/miniapp/images/fire-red.png':'/miniapp/images/fire-black.png'}}"></image>
            火热进行中
        </view>

        <view bindtap='tip' data-ty="0"  class=" flex-center timeac right {{type==0?'active':''}}">
            <image class="xc-bottom" src="{{url}}{{type==0?'/miniapp/images/clock-rad.png':'/miniapp/images/clock-black.png'}}"></image>
            即将开始
        </view>

    </view>
</view>
-->

</view>




