<?php defined('KX_ROOT') || exit('Permission denied');?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <title>我的资产 - <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></title>
    <link rel="stylesheet" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/css/global.css"/>
    <script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/flexible.min.js"></script>
</head>
<body>
<div class="w100">
    <div class="w100 bg-red flex-wrp flex-align-center flex-between lh100 plr15 ptb15">
        <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/return-white2.png" class="pt-return">
        <div class="size18 color1">我的资产</div>
        <div></div>
    </div>
    <div class="bg-red color1 pt10 pl20">
        <p>账户余额（<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?>）</p>
        <span class="bold" style="font-size: 40px;"><?php echo $userinfo['assets']['balance'];?></span>
    </div>
    <style>

    </style>
    <a href="<?php echo \Kuxin\Helper\Url::build("user.pay.recharge",[],"");?>">
        <div class="bg-white mb10 ptb10 pb10 pl20">
            <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/recharge.png" style="width: .2rem;vertical-align: middle;margin-top: -.05rem;" alt="充值">
            <span class="size18 color32 bold pl10">充值</span>
            <img class="fr mr20 pt-arrow-right" style="margin-top: .08rem;" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/arrow_right.png" alt="">
        </div>
    </a>
    <div class="bg-white mb10 pt-list money_list">
        <ul class="label">
            <li data-type="recharge" class="active">充值记录</li>
            <li data-type="reward">赠送记录</li>
            <li data-type="use">消费记录</li>
        </ul>
        <ul class="container">
            <?php $moneys=\Kuxin\Block::show('user.moneylist', ['userid'=>$userinfo['id'],'type'=>1,'num'=>30]);?>
            <li class="recharge active">
                <ul>
                    <?php if(is_array($moneys)): foreach($moneys as $key =>$loop):?>
                    <li>
                        <span class="inline-block"><?php echo \Kuxin\View::date($loop['create_time'],'Y-m-d');?></span>
                        <span class="inline-block"><?php echo \Kuxin\View::default($loop['type'],"未知","充值","赠送","消费");?></span>
                        <span class="inline-block fr color32">+<?php echo $loop['num'];?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?></span>
                    </li>
                    <?php endforeach; endif;?>
                </ul>
            </li>
            <?php $moneys=\Kuxin\Block::show('user.moneylist', ['userid'=>$userinfo['id'],'type'=>2,'num'=>30]);?>
            <li class="reward">
                <ul>
                    <?php if(is_array($moneys)): foreach($moneys as $key =>$loop):?>
                    <li>
                        <span class="inline-block"><?php echo \Kuxin\View::date($loop['create_time'],'Y-m-d');?></span>
                        <span class="inline-block"><?php echo \Kuxin\View::default($loop['type'],"未知","充值","赠送","消费");?></span>
                        <span class="inline-block fr color32">+<?php echo $loop['num'];?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?></span>
                    </li>
                    <?php endforeach; endif;?>
                </ul>
            </li>
            <?php $moneys=\Kuxin\Block::show('user.moneylist', ['userid'=>$userinfo['id'],'type'=>3,'num'=>30]);?>
            <li class="use">
                <ul>
                    <?php if(is_array($moneys)): foreach($moneys as $key =>$loop):?>
                    <li>
                        <span class="inline-block"><?php echo \Kuxin\View::date($loop['create_time'],'Y-m-d');?></span>
                        <span class="inline-block">
                        <?php if($loop['ext']['type'] == 'subscribe'):?>
                            <?php $novelinfo=\Kuxin\Block::show('novel.info', ['id'=>$loop['ext']['novel_id']]);?>
                            订阅《<?php echo $novelinfo['novel']['name'];?>》
                        <?php elseif($loop['ext']['type'] == 'reward'):?>
                            <?php $novelinfo=\Kuxin\Block::show('novel.info', ['id'=>$loop['ext']['novel_id']]);?>
                            打赏《<?php echo $novelinfo['novel']['name'];?>》
                        <?php else:?>
                            <?php echo \Kuxin\View::default($loop['type'],"未知","充值","赠送","消费");?>
                        <?php endif;?>
                        </span>
                        <span class="inline-block fr color32">-<?php echo $loop['num'];?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?></span>
                    </li>
                    <?php endforeach; endif;?>
                </ul>
            </li>
        </ul>
    </div>
</div>

<!-- 底部版权 -->
<div class="pt-copyright">
    <div class="size12  w100 text-center mt15 mb10"><a title="隐私声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'privacy'],"");?>" class="color4">隐私声明</a> | <a title="免责声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'disdaimer'],"");?>" class="color4">免责声明</a> | <a title="关于我们" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'about'],"");?>" class="color4">关于我们</a></div>
    <div class="size12 color4 w100 text-center mb10">Copyright © 2009-<?php echo date(Y);?> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "beian");?></div>
    <div class="size12  w100 text-center"><?php echo \Kuxin\Response::runinfo();?></div>
</div>
<!-- js -->
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/jquery-3.3.1.js"></script>
<script>
    $('.pt-return,.pt-recall').click(function(){
        window.history.back();
    });
    $('.pt-ellipsis').click(function(){
        $('.pt-tip').toggle()
    });
    $('.pt-tip .pt-tip-item').click(function(){
        $('.pt-tip').toggle()
    });
</script>
<div class="none">
    <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "tongji.mobile");?>
    <?php if(\Kuxin\Helper\Arr::getValue($_kxcms_config, "app.use_cdn")):?>
    <script src="/api/stat/novel/info.js"></script>
    <script src="/api/stat/novel/read.js"></script>
    <?php endif;?>
</div>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/layer/mobile/layer.js"></script>
<script>
    $('.money_list .label li').click(function () {
        $(this).addClass('active').siblings().removeClass('active');
        $('.money_list .container .' + $(this).data('type')).addClass('active').siblings().removeClass('active');
    });
</script>
</body>
</html>