<!--pages/kabaw/kabaw.wxml-->
<view class="main">
  <include src='/components/common/common'></include>
  <view class="info">
    <image class="bg" src="../../images/bg.png"></image>
    <image src="{{users.avatar_url}}" class="usering" bindtap="gousers"></image>
    <view class="txt userid">{{users.nickname}}</view>
    <view class="txt userlv" style="font-size:12px;">LV:{{is_vip==1?'尊贵会员':levelname}}</view>
    <view class="go_center" bindtap="govip">
      <view>我的会员卡</view>
    </view>
    <view class="go_center" bindtap="gocenter" style="top:58px;">
      <view>卡券中心</view>
    </view>
  </view>
<!-- <view class="sousuo">
  <input class="souinput" bindinput="sou" placeholder="请输入搜索内容"></input>
</view> -->
  <view class="mykabaw">
    <view class="title">
      <view class="name">我的券</view>
      <view class="showmore">
        <view class="showtxt" bindtap="showmore">查看全部 ></view>
      </view>
    </view>
    <view class="list">
      <view class="nomore" wx:if="{{mycoupon.length==0}}">暂无数据</view>
      <view class="quan" wx:for="{{mycoupon}}" bindtap="godetail" data-way="use" data-item="{{item.everyday_coupon_id}}">
        <view class="left">
          <image src="{{item.pic_url}}" class="quan-img" mode="aspectFill"></image>
        </view>
        <view class="right">
          <view class="qname">{{item.name}}</view>
          <view class="store" >店铺：{{item.shop_name}}</view>
          <!-- <view class="num">数量：10</view> -->
          <view class="use">剩余{{item.count?item.count:0}}张</view>
        </view>
        <view class="gouser">立即使用</view>
      </view>
    </view>
  </view>


<view class="tabs" wx:if="{{is_vip!=0}}">
  <view class="tab {{lindex==0?'native':''}}" bindtap="thisone" data-index="0">尊贵会员限定</view>
  <view class="tab {{lindex==1?'native':''}}" bindtap="thisone" data-index="1">推荐卡券</view>
</view>
<view class="tabs" wx:if="{{is_vip!=1}}">
  <view class="tab native" bindtap="thisone" style="margin-left: -40vw;" data-index="1">推荐卡券</view>
</view>

  <view class="kaquan" style="margin-bottom: 5vh;">
    <!-- <view class="kqtitle" wx:if="{{is_vip==1}}">
      <view class="tap {{lindex==0?'native':''}}" bindtap="thisone" data-index="0">尊贵会员限定</view>
      <view class="tap {{lindex==1?'native':''}}" bindtap="thisone" data-index="1">推荐卡券</view>
    </view> -->
    <!-- <view class="kqtitle" wx:if="{{is_vip!=1}}">
      <view class="tap native" bindtap="thisone" data-index="1">推荐卡券</view>
    </view> -->
    <view class="qlist" wx:if="{{lindex==0}}">
      <view class="nomore" wx:if="{{lquans.length==0}}">暂无数据</view>
      <view class="quan" wx:for="{{lquans}}" bindtap="godetail" data-way="buy" data-item="{{item.id}}">
        <view class="left">
          <image src="{{item.pic_url}}" class="quan-img" mode="aspectFill"></image>
        </view>
        <view class="right">
          <view class="qname">{{item.name}}</view>
          <view class="store">店铺：{{item.shop_name}}</view>
          <!-- <view class="num">数量：10</view> -->
          <view class="use"></view>
        </view>
        <view class="gouser">立即领取</view>
      </view>
    </view>
    <view class="qlist" wx:if="{{lindex==1}}">
      <view class="nomore" wx:if="{{lquans.length==0}}">暂无数据</view>
      <view class="quan" wx:for="{{lquans}}" bindtap="godetail" data-way="buy" data-item="{{item.id}}">
        <view class="left">
          <image src="{{item.pic_url}}" class="quan-img" mode="aspectFill"></image>
        </view>
        <view class="right">
          <view class="qname">{{item.name}}</view>
          <view class="store">店铺：{{item.shop_name}}</view>
          <!-- <view class="num">数量：10</view> -->
          <view class="use"></view>
        </view>
        <view class="gouser">{{item.is_pay==1?'立即购买':'立即领取'}}</view>
      </view>
    </view>
  </view>
</view>
  <!-- <view class="qr_box">
    <view class="qr">
      <view class="title">扫描下方二维码使用</view>
      <view class="qrcode">
        <image class="use_qr" src=""></image>
      </view>
    </view>
  </view> -->

<view class="foot">
  <view class="box nativ" bindtap="gokaquan">
    <image src="../../images/kq.png"></image>
    <view class="name">卡券中心</view>
  </view>
  <view class="box" bindtap="gohuiyuan">
    <image src="../../images/hy.png"></image>
    <view class="name">会员卡中心</view>
  </view>
</view>