<page-wrap id="Page">
  <view class="top_banner flex-row">
    <view class="top_banner_item flex-column" bindtap="gotoPay">
      <view class="t_b_i_title">特惠券包</view>
      <!-- <view class="t_b_i_border {{type==2?'active':''}}"></view> -->
      <block wx:if="{{type==2}}">
        <view class="t_b_i_border active" style="background: {{config.mainColor?config.mainColor:'#B01717'}};"></view>
      </block>
      <block wx:else>
        <view class="t_b_i_border"></view>
      </block>
    </view>

    <view class="top_banner_item flex-column" bindtap="gotoFree">
      <view class="t_b_i_title">免费券包</view>
      <!-- <view class="t_b_i_border {{type==1?'active':''}}"></view> -->
      <block wx:if="{{type==1}}">
        <view class="t_b_i_border active" style="background: {{config.mainColor?config.mainColor:'#B01717'}};"></view>
      </block>
      <block wx:else>
        <view class="t_b_i_border"></view>
      </block>
    </view>

  </view>

  <view class="coupon-list">
    <view class="coupon_item flex-row" wx:for="{{list}}" wx:key="unique" bindtap="goCouponDetail" data-id="{{item.activityId}}">
      <image src="{{item.coverImg}}" class="coupon_item_img"></image>
      <view class="coupon_item_right flex-column">
        <view class="flex-column">
          <view class="coupon_name over-ellipsis-two">{{item.name}}</view>
          <view class="coupon_num" wx:if="{{item.cashCouponNum > 0 && item.discountCouponNum > 0}}">含{{item.cashCouponNum}}张代金券、{{item.discountCouponNum}}张折扣券</view>
          <view class="coupon_num" wx:if="{{item.cashCouponNum ==0 && item.discountCouponNum > 0}}">含{{item.discountCouponNum}}张折扣券</view>
          <view class="coupon_num" wx:if="{{item.cashCouponNum > 0 && item.discountCouponNum == 0}}">含{{item.cashCouponNum}}张代金券</view>
          <view class="coupon_num" wx:if="{{item.cashCouponNum ==0 && item.discountCouponNum ==0}}"></view>

        </view>
        <view class="coupon_i_r_bottom flex-row">
          <view class="coupon_price" style="color: {{config.secColor?config.secColor:'#B01717'}};">价值 ￥{{item.formatShowPrice}}</view>
          <view class="coupon_buy" style="background-color: {{config.mainColor?config.mainColor:'#B01717'}}" wx:if="{{item.isPay!=0}}">{{item.formatPrice}}元抢</view>
          <view class="coupon_buy" style="background-color: {{config.mainColor?config.mainColor:'#B01717'}}" wx:else>免费领取</view>
        </view>
      </view>
    </view>
    <view class="no_result" wx:if="{{noResult}}">——— 抱歉，暂无券包 ———</view>
    <view class="no_result" wx:if="{{noMore}}">—— 人家也是有底线的 ——</view>
  </view>




</page-wrap>