<page-wrap id="Page" class="{{grayTheme?'page':''}}">
  <view class='swiper_box'>
    <swiper class="swiper" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" current="{{currentSwiper}}" bindanimationfinish="swiperChange">
      <block wx:for="{{bannerList}}" wx:key="unique">
        <swiper-item>
          <view class="swiper-item swiper1">
            <image src="{{item.figure}}" class="top_img" data-appid="{{item.appId}}" data-path="{{item.path}}" bindtap="goToBanner"></image>
          </view>
        </swiper-item>
      </block>

    </swiper>
    <view class="dots">
      <block wx:for="{{bannerList}}" wx:key="index">
        <view class="dot{{index == currentSwiper ? ' active_dot' : ''}}"></view>
      </block>
    </view>

  </view>
  <view class="banner_list flex-row">
    <view class="banner_item flex-column" bindtap="goToCoupon" wx:for="{{navigationList}}" data-appid="{{item.appId}}" data-path="{{item.path}}" wx:key="unique">
      <image class="b_i_img" src="{{item.figure}}"></image>
      <view class="b_i_text">{{item.title}}</view>
    </view>
  </view>

  <view class="coupon_list flex-column">
    <view class="c_l_top flex-row">
      <view class="c_l_top_l">推荐优惠</view>
      <view class="c_l_top_r" bindtap="goToCouponBag">更多</view>
    </view>

    <view class="coupon_item flex-row" wx:for="{{activityList}}" 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: {{config.mainColor?config.mainColor:'#B01717'}};" wx:if="{{item.isPay!=0}}">{{item.formatPrice}}元抢</view>
          <view class="coupon_buy" style="background: {{config.mainColor?config.mainColor:'#B01717'}};" wx:else>免费领取</view>
        </view>
      </view>
    </view>

    <!-- <view class="coupon_item flex-row">
    <image src="https://dy.shpr.top/welfareGo/index_top.png" class="coupon_item_img"></image>
    <view class="coupon_item_right flex-column">
    <view class="flex-column">
      <view class="coupon_name over-ellipsis-two">圣诞优惠券包</view>
      <view class="coupon_num">含3张代金券、3张折扣券</view>
    </view>
      <view class="coupon_i_r_bottom flex-row">
        <view class="coupon_price">价值 ￥99</view>
        <view class="coupon_buy" bindtap="goCouponDetail">99.99元抢</view>
      </view>
    </view>
  </view> -->
  </view>

  <view class="jointly-info" wx:if="{{adList != null && adList.length > 0}}">
    <view class="c_l_top flex-row">
      <view class="c_l_top_l">沪上联名</view>
    </view>
    <view class="jointly-style">
      <view class="jointly-list" wx:for="{{adList}}" data-appid="{{item.appId}}" data-path="{{item.path}}" wx:key="unique" bindtap="goToAd">
        <image class="jointly-img" src="{{item.figure}}"></image>
        <view class="jointly-text over-ellipsis-two">{{item.title}}</view>
      </view>
    </view>
  </view>
</page-wrap>