<navbar back home text="拼团专场" background='#fff'></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class='content-box'>
  <!-- <view class='top' wx:if='{{flag=="spellList"&&list.length>0}}'>
    <view class="banner" wx:if="{{list.length>0}}" hover-class="none" hover-stop-propagation="false"> 
        <c-banner wx:key="unique" list="{{list}}" />
    </view>
  </view> -->
  <!-- style='{{"margin-top:"+(list.length>0?"320rpx":"20rpx")+";"+"height:"+(list.length>0?"calc(100vh - 460rpx)":"calc(100vh - 160rpx)")}}' -->
  <view class='no-data01' wx:if='{{flag=="spellList"&&lists.length==0}}'>
    <image src='{{noCoupon}}'></image>
    <view class='no-data-text'>暂无数据</view>
  </view>
  <view class='no-data' wx:if='{{flag=="myspellList"&&lists.length==0}}'>
    <image src='{{noCoupon}}'></image>
    <view class='no-data-text'>暂无数据</view>
  </view>
  <view class='content'> 
    <view class='sepll-list' wx:if='{{flag=="spellList"}}' wx:for="{{lists}}" wx:key="index" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'>
      <view class='spell-left' style="{{mouldConfig.imgHomeH}}">
        <image src='{{item.coverImg}}' style="{{mouldConfig.imgHomeH}}" mode="aspectFill"></image>
      </view>
      <view class='spell-centerH'>
        <view class='tilte'>{{item.title}}</view>
        <view class='remark'>{{item.subTitle}}</view>
        <view class='numBox'>
          <view class='spell-num'>{{item.pressLimitNum+'人团'}}</view>
          <view class='right-text'>剩余{{item.remainInventory}}</view>
        </view>
        <view class='price'>
          <view class='price01'>
            <text class='price-unit'>￥</text>
            <text class='price-numHr'>{{item.salePriceStr}}</text>
            <text class='price02'>￥{{item.priceStr}}</text>
          </view>
          <view class='right-button'>去拼团</view>
        </view>
      </view>
    </view>
    <view class='sepll-list' wx:if='{{flag=="myspellList"}}' wx:for="{{lists}}" wx:key="index" style='position:relative;height:auto;'>
      <view class='spell-top'>
        <view class='spell-top-left' wx:if='{{item.orderStatus!=15&&item.orderStatus!=16&&!(item.orderStatus==13&&item.couponStatus==1)}}'>
          <view class='top-title' wx:if='{{item.remainPeople!=0}}'>距离成团还差</view>
          <view class='top-num' wx:if='{{item.remainPeople!=0}}'>{{item.remainPeople+'人'}}</view>
          <view class='top-title' style='color:#8C8C8C;' wx:if='{{item.remainPeople==0}}'>{{item.pressLimitNum+'人成团'}}</view>
        </view>
        <view class='spell-top-left' wx:if='{{item.orderStatus==15||item.orderStatus==16||(item.orderStatus==13&&item.couponStatus==1)}}'>
          <view class='top-title'>拼团失败</view>
        </view>
        <!-- <view class='spell-top-right' style='{{"color:"+((item.orderStatus==10||item.orderStatus==15)?"#FF3232":item.orderStatus==11?"#57B257":"#8C8C8C")}}'>{{item.statusText02}}</view> -->
        <image class="frImg" wx:if="{{item.status == 10}}" src="{{orangeImg}}" mode="aspectFill" lazy-load="true"><text>{{item.statusText02}}</text></image>
    <image class="frImg" wx:if="{{item.status == 11}}" src="{{blueImg}}" mode="aspectFill" lazy-load="true"><text>{{item.statusText02}}</text></image>
    <image class="frImg" wx:if="{{item.status != 11&&item.status != 10}}" src="{{grayImg}}" mode="aspectFill" lazy-load="true"><text>{{item.statusText02}}</text></image>
      </view>
      <view class='spell-bottom'>
        <view class='spell-left' style="{{mouldConfig.imgHomeH}}" data-id='{{item.id}}' data-data='{{item}}' bindtap='{{((item.couponStatus==1&&item.orderStatus!=11)||(item.orderGroupId=="0"&&item.orderStatus!=15)||item.orderStatus==16)?"":item.orderStatus!=15?"gotoStatusDetail":"gotoPay"}}'>
          <image src='{{item.coverImg}}' style="{{mouldConfig.imgHomeH}}" mode="aspectFill"></image>
        </view>
        <view class='spell-centerHr' data-id='{{item.id}}' data-data='{{item}}' bindtap='{{((item.couponStatus==1&&item.orderStatus!=11)||(item.orderGroupId=="0"&&item.orderStatus!=15)||item.orderStatus==16)?"":item.orderStatus!=15?"gotoStatusDetail":"gotoPay"}}'>
          <view class='tilte'>{{item.title}}</view>
          <view class='remark'>{{item.subTitle}}</view>
          <view class='price'>
            <view class='price01'>
              <view class='price-text'style="display: inline;font-size: 24rpx;">拼团价￥</view>
              <view class='price-num'>{{item.salePrice/100}}</view>
              <!-- <view class='price-unit'>元</view> -->
            </view>
          </view>
        </view>
        <view class='spell-right' data-id='{{item.id}}' data-data='{{item}}' style='position:absolute;width:auto;bottom:12rpx;right:10rpx;' bindtap='{{((item.couponStatus==1&&item.orderStatus!=11)||(item.orderGroupId=="0"&&item.orderStatus!=15)||item.orderStatus==16)?"":item.orderStatus!=15?"gotoStatusDetail":"gotoPay"}}'>
          <!-- 继续邀请好友 -->
          <button class='share user-motto right-button'  wx:if='{{item.couponStatus!=1&&item.orderStatus==10&&item.orderGroupId!="0"}}' data-status='{{item.status}}' data-data='{{item}}' hover-class="other-button-hover" style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</button>
          <!-- 去使用 -->
          <view class='right-button' data-data='{{item}}' wx:if='{{item.orderStatus==11}}' data-status='{{item.status}}' catchtap='gotoUse' style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</view>
          <!-- 重新拼团 -->
          <view class='right-button' data-data='{{item}}' wx:if='{{item.couponStatus!=1&&item.orderStatus==13&&item.orderGroupId!="0"}}' data-status='{{item.status}}' catchtap='gotoAgain' style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</view>
          <!-- 已下架 -->
          <view class='right-button' wx:if='{{item.couponStatus==1&&item.orderStatus!=11}}' data-status='{{item.status}}' catchtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">已下架</view>
          <!-- 拼团未支付 -->
          <view class='right-button' wx:if='{{item.couponStatus!=1&&item.orderStatus!=11&&item.orderStatus!=15&&item.orderGroupId=="0"}}' data-status='{{item.status}}' catchtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">拼团未支付</view>
          <!-- 拼团失败 -->
          <view class='right-button' wx:if='{{item.couponStatus!=1&&item.orderStatus==12&&item.orderGroupId!="0"}}' data-status='{{item.status}}' catchtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">{{item.statusText}}</view>
          <!-- 参团失败 -->
          <view class='right-button' wx:if='{{item.couponStatus!=1&&item.orderStatus==14&&item.orderGroupId!="0"}}' data-status='{{item.status}}' catchtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">{{item.statusText}}</view>
          <!-- 拼团待支付 -->
          <view class='right-button' wx:if='{{item.couponStatus!=1&&item.orderStatus==15}}' data-data='{{item}}' data-status='{{item.status}}' catchtap='gotoPay' style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</view>
          <!-- 拼团发起未支付 -->
          <view class='right-button' wx:if='{{item.couponStatus!=1&&item.orderStatus==16&&item.orderGroupId!="0"}}' data-status='{{item.status}}' catchtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">{{item.statusText}}</view>
          <view class='right-button' wx:if='{{item.couponStatus!=1&&item.orderStatus==98&&item.orderGroupId!="0"}}' data-status='{{item.status}}' catchtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">{{item.statusText}}</view>
          <view class='right-button' wx:if='{{item.couponStatus!=1&&item.orderStatus==99&&item.orderGroupId!="0"}}' data-status='{{item.status}}' catchtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">{{item.statusText}}</view>
          <!-- <view class='right-button' wx:if='{{item.couponStatus!=1&&item.orderStatus==16&&item.orderGroupId!="0"}}' data-data='{{item}}' data-status='{{item.status}}' bindtap='gotoPay' style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</view> -->
        </view>
      </view>
    </view>
  </view>
  <view class='bottom'>
    <view  class="{{flag=='spellList'?'bottom-left':'bottom-leftN'}}" bindtap="getSpellList">拼团商品</view>
    <view  class="{{flag=='spellList'?'bottom-leftN':'bottom-left'}}" bindtap="getmyList">我的拼团</view>
  </view>
  <view class="loading" wx:if="{{loading}}">
    {{content}}
  </view>
</view>