<!--packageH/liveAuthorization/liveAuthorization/liveAuthorization.wxml-->
<view id="liveAuthorization">
  <view class="tabsVant">
    <van-tabs active="{{active}}" bind:change="changeActive">
      <van-tab title="已购买授权码"></van-tab>
      <van-tab title="可出售授权码"></van-tab>
    </van-tabs>
  </view>
  <view class="haveBuy" wx:for="{{info}}" wx:key="index" wx:if="{{active == '0' && info }}">
    <view class="BuyTop">
      <icon class="iconfont icon-fontclass-maikefeng"></icon>
      <view class="span">{{ item.level_name }}</view>
    </view>
    <view class="bottom">
      <view class="{{item.type == 2 ? 'BuyBottom' : 'BuyBottomT'}}" catchtap="tapActivate" data-item="{{item}}">{{
        item.type_name }}</view>
    </view>
  </view>
  <block wx:if="{{active == 1 && info}}">
    <view class="listCard">
      <view class="cardLis">
        <swiper previous-margin='30rpx' next-margin='30rpx' bindchange="swiperChange">
          <block wx:for="{{info}}" wx:key="index">
            <swiper-item>
              <view class="lisbox">
                <view class="left">
                  <view class="leftTop">
                    <icon class="iconfont icon-fontclass-maikefeng"></icon>
                    <view class="span">{{ item.level_name }}</view>
                  </view>
                  <view class="leftBottom">
                    <view class="span">数量：{{ item.code_num }}</view>
                  </view>
                </view>
                <view class="right" catchtap="goDetail">
                  <view class="span">明细</view>
                </view>
              </view>
            </swiper-item>
          </block>

        </swiper>
      </view>
      <view class="btnSale">
        <view class="btnLeft" catchtap="tapSele">出售</view>
        <view class="btnRight" catchtap="tapCode">待收款码</view>
      </view>
    </view>
  </block>
  <van-popup show="{{saleboxShow}}" position="bottom" closeable bind:close="saleClose">
    <view class="saleMx">
      <view class="txt">授权码出售</view>
      <view class="search">
        <van-field value="{{money}}" type="number" placeholder="请输入授权码出售价格（单价:元)" bind:input="moneyInp" />
      </view>
      <view class="istxy">限单个出售</view>
      <view class="sureBtn" catchtap="sureBtnTap">确定</view>
    </view>
  </van-popup>
</view>