<!--pages/wp/wp.wxml-->
<block wx:if="{{goods_array.length>0}}">
  <!--拼单-->
  <view class='top_p' bindtap="go_to_pindlist">
    <view class="top">
      <view class='t_left_p'></view>
      <view class='t_ms_p'>拼单</view>
    </view>
    <view class='right_p'>
      <image src="{{iurl}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image>
    </view>
  </view>
  <!--商品展示-->
  <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}">
    <view class='sp_p' wx:if="{{object.style==1}}">
      <swiper-item class="s_it" wx:for="{{goods_array}}">
        <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
          <navigator url="{{!aitem.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?prom_type=6&goods_id=' + aitem.goods_id + '&prom_id=' + aitem.id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + aitem.goods_id + '&prom_id=' + aitem.id)}}" class="s1_gk_a1">
            <view class='one_p'>
              <view class='sp_top_p'>

                <block wx:if="{{aitem.start_time>newTime}}">
                  <span class='s_top_p' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span>
                </block>				
                <block wx:if="{{aitem.start_time<newTime && aitem.end_time>newTime}}">
                  <span class='s_top_p'>火热进行</span>
                </block>
                <!-- <span class='s_top_p'>火热进行</span> -->

                <view class='s_img_p'>
                  <image src="{{iurl+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
                </view>

                <!--<view class='s_foot_p'>-->
                <!--<text>{{aitem.djs.hou}}天</text>-->
                <!--<text>{{aitem.djs.hou}}时</text>-->
                <!--<text>{{aitem.djs.min}}分</text>-->
                <!--<text>{{aitem.djs.sec}}秒</text>-->
                <!--</view>-->

                <view class='sp_sj_p' wx:if="{{aitem.kttype==1}}">商家</view>
                <view class='sp_sj_p' wx:if="{{aitem.kttype==2}}">会员</view>
                <view class='sp_sj_p' wx:if="{{aitem.kttype==3}}">阶梯</view>
              </view>

              <view class='sp_wz_p'>
                <view class='sp_wzi_p'>{{aitem.title}}</view>
                <view class='sp_jg_p'>￥{{aitem.price}}</view>
                <view  wx:if="{{is_retail_price}}"  class='sp_jgx_p ~no_line_x'>￥{{aitem.market_price}}</view>

                <view class="tuan_set_num">
                  <view class="co-red2">{{aitem.ct_num}}人团</view>			
			      <!-- 判断有没有过期 -->  	  
				  <block wx:if="{{aitem.end_time<=newTime}}">
					  <view class="cantuan huise">已结束</view>
				  </block>				  
				  <block wx:else>
					  <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去参团</view>
					  <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>
					  <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>
					  <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="cantuan huise">已抢光</view>
				  </block>
                </view>
              </view>
            </view>
          </navigator>
        </block>
      </swiper-item>

    </view>
  </swiper>
  <view class="sp2_p" wx:if="{{object.style==2}}">
    <block wx:for="{{goods_array}}">
      <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
        <navigator url="{{!aitem.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?prom_type=6&goods_id=' + aitem.goods_id + '&prom_id=' + aitem.id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + aitem.goods_id + '&prom_id=' + aitem.id)}}" class="s1_gk_a1">
          <view class='one1_p'>
            <block>
              <view class="o1_img_p">
                <image src="{{iurl+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
                <view class='sp_sj1_p' wx:if="{{aitem.kttype==1}}">商家</view>
                <view class='sp_sj1_p' wx:if="{{aitem.kttype==2}}">会员</view>
                <view class='sp_sj1_p' wx:if="{{aitem.kttype==3}}">阶梯</view>
              </view>
            </block>

            <view class="o1_right_p">

              <view class="sp_wzi_p">{{aitem.title}}</view>
              <view class="co-red2">
                <text class="yituan_num">已团{{aitem.buy_num}}件</text> {{aitem.ct_num}}人团
              </view>
              <view class="money">
                <view class='sp_jg_p'>￥{{aitem.price}}</view>
                <view wx:if="{{is_retail_price}}" class='sp_jgx_p ~no_line_x'>￥{{aitem.market_price}}</view>
              </view>
              <view class="o1_sj_p" wx:if="{{aitem.end_time>newTime}}">
                <image class="time_img" src="{{iurl}}/miniapp/images/time.png"></image>
                <block wx:if="{{aitem.djs.day>0 }}">{{aitem.djs.day}}天</block>{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒
              </view>
			  
			  <!-- 判断有没有过期 -->
			  <block wx:if="{{aitem.end_time<=newTime}}">
			  	<view class="wo_p huise">已结束</view>
			  </block>		
			  <block wx:else>
				  <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>
				  <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去开团</view>
				  <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>
				  <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="wo_p huise">已抢光</view>
              </block>  
            </view>
          </view>
        </navigator>
      </block>
    </block>
  </view>

</block>