<!--packageF/debt/vipIndex/vipIndex.wxml-->
<view id="vipIndex">
    <view class="headtop" wx:if="{{userInfo.member}}">
        <view class="img">
            <image src="{{userInfo.member.avatar}}" alt="" />
        </view>
        <view class="user">
            <view class="name">{{userInfo.member.nickname}}</view>
            <view class="time">有效期：{{datainfo.has_one_vip.end_time_str}}</view>
        </view>
        <view class="typeBtn" wx:if="{{datainfo.has_one_vip.status == '-1' || datainfo.has_one_vip.status == '1' }}" catchtap="renewTap">续费</view>
        <view class="typeBtn" wx:if="{{ datainfo.has_one_vip.status == '-2' || datainfo.has_one_vip.status == '-3' }}" catchtap="applyTap">申请</view>
    </view>
    <view class="detailBox">
        <view class="account">
            <view class="accountLeft">{{plugin_setting.common_credit_name || '消费账户'}}：</view>
            <view class="accountRight">￥{{datainfo.common_credit}}</view>
        </view>
        <view class="accountDetail">
            <view class="accountDetailL">
                <view class="text">{{userInfo.order_count}}</view>
                <view class="txt">已完成订单数</view>
            </view>
            <view class="accountDetailL">
                <view class="text">￥{{userInfo.order_price}}</view>
                <view class="txt">累计订单金额</view>
            </view>
        </view>
    </view>
    <view class="removeBox" wx:if="{{datainfo.has_one_vip.status != '-2' && datainfo.has_one_vip.status != '-3'}}">
        <view class="toptxt">联名消费的债权人</view>
        <view class="removelist" wx:if="{{datainfo.has_one_owner_member}}">
            <view class="removelis">
                <view class="img">
                    <image src="{{datainfo.has_one_owner_member.avatar}}" alt="" />
                </view>
                <view class="user">
                    <view class="name">{{datainfo.has_one_owner_member.nickname}}</view>
                    <view class="time">化债期：{{datainfo.end_time_str}}</view>
                </view>
                <view class="removeBtn" catchtap="removeTap">解绑</view>
            </view>
        </view>
        <view class="removelist debt" wx:if="{{datainfo.has_one_debtor_member}}">
            <view class="removelis">
                <view class="img">
                    <image src="{{datainfo.has_one_debtor.avatar}}" alt="" />
                </view>
                <view class="user">
                    <view class="name">{{datainfo.has_one_debtor_member.nickname}}</view>
                    <view class="time">化债期：{{datainfo.end_time_str}}</view>
                </view>
                <view class="removeBtn" wx:if="{{datainfo.is_expire == '0' && datainfo.status == 1}}" catchtap="toShop">进店</view>
            </view>
        </view>
    </view>
    <view class="bottomBox">
        <view class="bottomList" catchtap="toOrder">
            <i class="iconfont icon-fontclass-shangpindingdan"></i>
            <view class="txt">订单管理</view>
        </view>
        <view class="bottomList" catchtap="toDetail">
            <i class="iconfont icon-fontclass-wenzhangzhongxin"></i>
            <view class="txt">提货券明细</view>
        </view>
        <view class="bottomList" catchtap="toBindDetail">
            <i class="iconfont icon-massage_order"></i>
            <view class="txt">绑定记录</view>
        </view>
    </view>
</view>

<van-popup show="{{RenewShow}}" bind:close="tapclose" position="bottom" custom-style="height: 492rpx, borderRadius: 10rpx 10rpx 0px 0px" closeable>
    <view class="shopShowTxt">续费</view>
    <view class="flexCell">
        <view>当前拥有商品数量：{{vip_goods_count}}</view>
        <view class="right">
            <view class="pay" catchtap='toDetailVip'>
                购买商品
                <i class="iconfont icon-member_right"></i>
            </view>
        </view>
    </view>
    <view class="flexCell">
        <view>充值数量</view>
        <view class="right">
            <van-stepper class="pay" bind:change='stepperTap' value="{{goodsTotal}}" theme="round" button-size="22" />
        </view>
    </view>
    <view class="btn" catchtap='renewPost'>充值</view>
</van-popup>