<view class="love_index">
  <van-nav-bar title="{{title}}" right-text="查看明细" bind:click-right="onClickRight" wx:if="{{!show}}"/>
  <!-- 优化 -->
  <view class="content">
    <view class="my_balance ul">
      <view class="balance_a li">
        <icon class="iconfont icon-wealth-b"></icon>
        <text>{{  usable_name||(love_name+'激活') }}</text>
      </view>
      <view class="balance_b li">{{ usable }}</view>
      <view class="balance_c li">{{ froze_name||('冻结'+love_name) }}{{ froze }}</view>
      <view class="balance_c li" wx:if="{{no_recharge > 0}}">
        待用{{ love_name }}{{ no_recharge }}
      </view>
      <view class="balance_c li"  wx:if="{{love_queue}}">冻结{{love_name}}{{love_queue.wait_award}}</view>
    </view>
    <view class="list_box ul">
      <view wx:if="{{recharge_status}}" class="li" data-url="LoveRecharge" catchtap="gotoPage">
        <icon class="iconfont icon-balance_b"></icon>
        充值
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
      <view wx:if="{{transfer_status}}" class="li" catchtap="makeTransfer">
        <icon class="iconfont icon-balance_c"></icon>
        转账
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
      <view wx:if="{{withdraw_status}}" data-url="loveWithdrawals" class="li" catchtap="gotoPage">
        <icon class="iconfont icon-balance_a"></icon>
        {{ withdrawData.language }} <view style="display:inline-block;padding-left:10rpx;width:440rpx;white-space:nowrap;color:red;text-overflow:ellipsis;font-size:28rpx;overflow:hidden;" wx:if="{{ withdrawData.disable==1 }}">不可{{ withdrawData.language }}，可{{ withdrawData.language }}日期为{{ withdrawData.day }}</view>
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
      <view wx:if="{{change_integral && change_integral.is_open}}" data-url="toIntegral" class="li" catchtap="gotoPage">
        <icon class="iconfont icon-xiaofeijifen" style="color: #f15353;"></icon>
        转换{{integral}}
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
    </view>
    <view class="list_box_b ul">
      <view class="li" wx:if="{{trading_status == 1}}" data-url="love_trading_sell" catchtap="gotoPage">
        <icon class="iconfont icon-balance_k" style="color: #f15353;"></icon>
        {{ love_name }}出售
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
      <view class="li" wx:if="{{trading_status == 1}}" data-url="love_trading" catchtap="gotoPage">
        <icon class="iconfont icon-balance_n"></icon>
        交易中心
        <van-icon class="fa fa-angle-right" bindtap="add" />
      </view>
    </view>
    <view class="list_box_b ul">
      <view class="li" data-url="love_record" catchtap="gotoPage" wx:if="{{activation_record == 1}}">
        <icon class="iconfont icon-balance_m"></icon>
        激活记录
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>

      <view class="li" data-url="donate" catchtap="makeTransfer" wx:if="{{transfer_point_status}}">
        <icon class="iconfont icon-fontclass-zuanz" style="color: rgb(250, 195, 55);"></icon>
        {{ love_name }}{{pointKey}}转赠
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>

      <view class="li" data-url="love_gift_bag" catchtap="gotoPage" wx:if="{{redpack_enable}}">
        <icon class="iconfont icon-fontclass-xiaofeihongbao"></icon>
        天天红包
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
      <view class="li" data-url="love_gift_queue" catchtap="gotoPage" wx:if="{{love_queue}}">
        <icon class="iconfont icon-fontclass-guazhang" style="color: #ff781f;"></icon>
        挂账额度
        <div class="love-gift-queue {{love_queue_length >= 6 ? 'love-gift-queue-line' : ''}}" >
          <view>{{love_queue.queue_credit}}</view>
          <van-count-down time="{{credit_validity_at}}" format="DD 天 HH 时 mm 分 ss 秒" />
        </div>
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
      <!-- <view class="li" data-url="lovePeriod" catchtap="gotoPage">
        <icon class="iconfont icon-rewards_record" style='color:red'></icon>
        周期奖励记录
        <van-icon name="arrow" class="fa fa-angle-right"></van-icon>
      </view> -->
    </view>
    <view class="list_box_b ul" wx:if="{{poster_center_show}}">
      <view class="li" catchtap="tapPoster">
        <icon class="iconfont icon-fontclass-fenxianghaibao" style="color:#fac337"></icon>
        {{love_poster_name}}
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
    </view>
    <view class="list_box_b ul" wx:if="{{love_cycle_reward=='enabled'}}">
      <view class="li"  data-url="loveCycleReceive" catchtap="gotoPage">
        <icon class="iconfont icon-zb_all_like" style="color:#DF5D58"></icon>
        {{love_name}}周期释放领取
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
    </view>
    <view class="list_box_b ul" wx:if="{{speed_pool_enable==1}}">
      <view class="li"  data-url="LoveSpeedLease" catchtap="gotoPage">
        <icon class="iconfont icon-ht_basis_JJC" style="color:#DF5D58;font-size: 44rpx;padding-left: 10rpx;"></icon>
        {{love_name}}加速池释放
        <van-icon class="fa fa-angle-right"></van-icon>
      </view>
    </view>
    <view class="explain">
      <icon class="iconfont icon-balance_o"></icon>
      <text class="span" data-url="love_explain" catchtap="gotoPage">{{ love_name }}说明</text>
    </view>
  </view>
  <van-popup show="{{showPoster}}" custom-style="width:80%;background-color: transparent;" bind:close="onPosterClose" >
    <view class="posterMin">
      <image src="{{posterImg}}" mode="widthFix" catchtap="saveImg"></image>
    </view>
  </van-popup>
  <!-- 爱心值出售 -->
  <van-popup show="{{ show }}" position="right" custom-style="width:100%;height:100%;background:#fff;" overlay="{{ false }}" bind:close="onClose">
    <view class="love_transfer">
      <van-nav-bar title="{{love_name}}出售" left-arrow bind:click-left="onClickLeft" />
      <!-- 优化 -->
      <view class="content">
        <view class="transfer_info ul">
          <view class="info_a li">
            <text class="span">可出售{{ love_name }}：</text>
            <text class="span">{{ usables }}</text>
          </view>
        </view>
        <view class="transfer_sum">
          <text class="span">{{ love_name }}</text>
          <view class="sum">
            {{language['money']}}
            <van-field value="{{ sell_value }}" placeholder="0.00" border="{{ false }}" bind:change="onChange" />
          </view>
        </view>
        <button type="button" class="btn custom_color" catchtap="saleBalance">确认出售</button>
        <view class="notes p">
          <view>注：交易手续费收取{{ poundage }}%，</view>
          <view>交易限制(最小额度){{ trading_limit }}，</view>
          <view>交易限制(倍数) {{ trading_fold }}，</view>
          <view>只有 {{ trading_fold }} 或 {{ trading_fold }} 的倍数是可以交易。</view>
          <view wx:if="{{trading_fetter}}">出售限制{{trading_fetter}}</view>
        </view>
      </view>
    </view>
  </van-popup>
</view>
