<!--shoppingGuid/page/pages/welfare/welfare.wxml-->
<!-- 福利界面 -->
<view class='main-container'>
  <view class='top-container'>
    <view class='top-item {{item.isActive ? "active" : ""}}' 
    wx:for="{{navBar}}" 
    wx:key="nav" 
    bindtap='onTopBarTap'
    data-index="{{idx}}"
    data-item="{{item}}"
    wx:for-index="idx" 
    wx:for-item="item">{{item.name}}</view>
  </view>

  <!-- 导购 -->
  <view class='guid' wx:if="{{current == 1}}">
    <view class='guid-item' 
    bindtap='onTapToGuidCollegeInfo' 
    wx:for="{{guidCollege.list}}" 
    wx:key="guidCollege"
    data-index="{{idx}}"
    data-item="{{item}}"
    wx:for-index="idx" 
    wx:for-item="item">
      <image src="{{item.titleUrl}}" mode='widthFix'></image>
      <view class='guid-item-title'>{{item.title}}</view>
    </view>
    <!-- 空时 -->
    <view class='empty' wx:if="{{guidCollege.noData}}">暂无数据~</view>
  </view>
  <!-- 推荐商品 -->
  <view class='recommand-product' wx:if="{{current == 2}}">
    <view class='product-item'
    wx:for="{{recommandProducts}}" 
    wx:key="recommandProducts"
    data-index="{{idx}}"
    data-item="{{item}}"
    wx:for-index="idx" 
    wx:for-item="item" >
      <view class='img'>
        <image src='{{item.productImgUrl}}' mode='aspectFit'></image>
      </view>
      <view class='product-info'>
        <view class='pro-main-title'>{{item.productName}}</view>
        <!-- <view class='pro-second-title'>商品副标题，这个是商品的副标题，只显示一行</view> -->
        <view class='price-btn'>
          <view class='price'>
            <view class='normal theme-text-color'>
              <image src='/assets/imgs/7_1_0/integral-icon.png' mode='aspectFit'></image>
              <text >{{item.point}}</text> 
            </view>
            <!-- <view class='plus'>
              ￥<text>918</text> 
              <image src='/assets/imgs/shoppingGuide/plus.png' mode='widthFix'></image>
            </view> -->
          </view>
          <view class='rg-btn'>
            <button class='theme-color' data-item="{{item}}" bindtap='onTapToRecommandProduct'>立即推荐</button>
          </view>
        </view>
        <!-- 优惠券 -->
        <view class='coupon'>
          <image src='/assets/imgs/7_1_0/rmb.png' mode='aspectFit'></image>
          <text 
          wx:for="{{item.shareBonuses}}" 
          wx:key="shareBonuses"
          wx:for-index="idx" 
          wx:for-item="coupon">{{coupon.couponSettingTitle}}</text> 
        </view>
      </view>
    </view>
    <!-- 空时 -->
    <view class='empty' wx:if="{{recommandProductsNoData}}">暂无数据~</view>
    <!-- 没有你想要的,去商城看看 -->
    <view class='go-mall theme-text-color' bindtap='onTapToMall'>没有你想要的？去商城看看>>></view>

  </view>
  <!-- 优惠券福利 -->
  <view class='coupons' wx:if="{{current == 3}}">
    <view class='coupon-item' style='background-image:url({{item.imageBg}})'
    wx:for="{{coupons.list}}" 
    wx:key="coupons"
    data-index="{{idx}}"
    data-item="{{item}}"
    wx:for-index="idx" 
    wx:for-item="item">
      <view class='coupon-item-lf'>
        <view class='coupon-price'>
          {{item.couponType != 2 ? '￥' : ''}} <text>{{item.price}}</text>
        </view>
        <view>{{item.typeText}}</view>
      </view>
      <view class='coupon-item-rg'>
        <view class='qrcode' data-item="{{item}}" bindtap='onTapShowQrcode' wx:if="{{item.drawType == 2}}">
          <image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/walare_qrcode.png' mode='aspectFit'></image>
        </view>
        <view class='coupon-title'>{{item.title}}</view>
        <view class='op'>
          <view class='text-btn'>
            <text class='theme-text-color'>数量：{{item.stock}}</text>
          </view>
          <button class='info-btn' wx:if="{{item.drawType == 1}}" data-item="{{item}}" bindtap='onTapToSendConpon'>定向发送</button>
        </view>
      </view>
    </view>
    <!-- 空时 -->
    <view class='empty' wx:if="{{coupons.noData}}">暂无数据~</view>
  </view>
</view>
<!-- tabbar -->
<tab-bar index="{{2}}"></tab-bar>