<!--pages/my/account/account.wxml-->
<view class="topBox">
    <view class="tit auto">
        账户余额 (元)
        <van-icon name="question-o" color="#999999" />
    </view>
    <view class="num auto">
      {{amount}}
    </view>
    <view class="btnBox flex ju-a" wx:if="{{is_online==1}}">
        <view class="le btn-border" bindtap="showBalance">提现</view>
        <view class="lr btn-sky" bindtap="showPopup">充值</view>
    </view>
</view>

<view class="bg"></view>

<view class="contioner">
    <view class="tit b-bottom">余额变动明细</view>

    <view class="list">
        <view class="item flex ju-b b-bottom" bindtap="toDrtail" data-id="{{item.id}}" wx:for="{{amountList}}" wx:key="index">
            <view class="le">
                <view class="top flex ju-b">
                    <text class="type">{{item.type_name}}</text>
                    <text class="num">{{item.price}}</text>
                </view>
                <view class="footer flex ju-b">
                    <text class="time">{{item.created_at}}</text>
                    <text class="price">余额 {{item.balance}}</text>
                </view>
            </view>
            <van-icon name="arrow" color="#C7C7CC" />
        </view>
    </view>
</view>

<van-popup show="{{ show }}" bind:close="showPopup" position="bottom " round closeable close-icon="/image/icon/close.png" 
overlay-style="background: rgba(0, 0, 0, 0.5);">
    <view class="pup">
        <view class="tit flex ju-b">
            <text>充值金额</text>
        </view>

        <view class="content flex ju-b">
            <view class="items flex {{active == index ? 'active' : ''}}" bindtap="changeCurrent" data-index="{{index}}" data-value="{{item.price}}" wx:for="{{recharge}}" wx:key="index">
                <view class="num">充{{item.price}}元</view>
                <view class="tips">赠送{{item.give_price}}元</view>
                <image class="hot" wx:if="{{index == 0}}" src="/image/my/hot.png"></image>
            </view>


        </view>

        <view class="inputBox flex b-bottom">
            <text class="code">￥</text>
            <input type="number" bindinput="inputChange" placeholder="自定义小额充值（1-99）" maxlength="2" placeholder-class="placeholder" />
        </view>

        <view class="explain">
            <view class="title">
                充值说明
            </view>
            <view class="contents">
                <view class="its">1.消费时优先消费充值金额，充值金额消费完毕后消费赠送金额</view>
                <view class="its">1.消费时优先消费充值金额，充值金额消费完毕后消费赠送金额</view>
            </view>
        </view>

        <view class="footerBtn btn-sky" bindtap="wxPay">{{value}}元/立即充值</view>
    </view>
</van-popup>

<van-popup show="{{ balance }}" bind:close="showBalance" position="bottom " round closeable close-icon="/image/icon/close.png" overlay-style="background: rgba(0, 0, 0, 0.5);">
    <view class="pup">
        <view class="tit flex ju-b">
            <text>提现金额</text>
        </view>

        <view class="inputBox flex b-bottom">
            <text class="code">￥</text>
            <input type="number" bindinput="inputChange" placeholder="输入提现金额" maxlength="2" placeholder-class="placeholder" />
        </view>

        <view class="tip">
            当前账户余额10.00元，<text class="all">全部提现</text>
        </view>

        <view class="footerBtn btn-sky">提现</view>
    </view>
</van-popup>