<!--shoppingGuid/page/pages/home/home.wxml-->
<!-- 整体布局 -->
<view class='main-container'>
  <!-- 优惠券 -->
  <view class='mg-b-40'>
    <view class='status-bar'>
      <view class='status-items'>
        <view 
        class='status-bar-item {{item.active ? "active" : ""}}'
        wx:for="{{coupon.couponTypeArr}}"
        wx:for-item="item"
        bindtap='onTapChangeCouponType'
        wx:for-index="idx"
        wx:key="coupon{{idx}}"
        data-index="{{idx}}">{{item.name}}</view>
      </view>
    </view>
    <!-- list -->
    <view class='coupons'>
      <view class='coupon-item' 
      wx:for="{{coupon.couponList}}"
      wx:for-item="item"
      wx:for-index="idx"
      wx:key="{{idx}}"
      data-item="{{item}}"
      style='background-image:url({{item.imageBg}})'>
        <view class='coupon-item-lf' data-item="{{item}}" bindtap='onTapShowQrcode'>
          <image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/daogou_qrcode.png' mode='aspectFit'></image>
          <view>查看详情</view>
        </view>
        <view class='coupon-item-rg'>
          <view class='coupon-title'>{{item.title}}</view>
          <view class='op'>
            <view class='text-btn'>数量：{{item.stock}}</view>
            <view class='goods-share'>
              <view class='send-coupon' data-item="{{item}}" bindtap='onTapToSendConpon'>定向发券</view>
              <view class='send-coupon' data-item="{{item}}" bindtap='onTapToSendByGroup'>群发推荐</view>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>

</view>
<!-- 分享 -->
<!-- 分享好友 -->
<view class='bg' style='display:{{showShareModel ? "block" : "none"}}' bindtap='onTapCancelShare'></view>
<view class='share-container {{showShareModel ? "sliderUp" : ""}}'>
  <button open-type="share">
    <view class='share-item'>
        <image src='/assets/imgs/7_1_0/wx-icon.png' mode='aspectFit'></image>
        <text>微信好友</text>
    </view>
  </button>
</view>

