审查视图

application/home/view/member/withdraw_log.html 4.4 KB
王晓刚 authored
1 2 3 4 5 6 7 8
<!DOCTYPE html>
<html lang="en">

{include file="public/head"/}
<link rel="stylesheet" href="__CDN__/assets/advertising/css/record.css">

<body>
    <!-- 提现记录 -->
王晓刚 authored
9
    <div class="income_record" id="dom">
王晓刚 authored
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
        <div class="record_tips">提现记录详情</div>
        {foreach name="$data" item="vo"}
        <div class="record_single">
            <div class="record_box layout justify flex_diection">
                <div class="layout justify flex_row">
                    <div class="record_title">提现(微信余额)</div>
                    <div class="record_num">{$vo.rmb}元</div>
                </div>
                <div class="record_date layout justify flex_row">
                    <div>{$vo.createtime}</div>
                    <div class="record_succ">
                        {if condition="$vo.type eq 1"}
                        提现审核中
                        {elseif condition="$vo.type eq 2"}
                        提现审核成功
                        {elseif condition="$vo.type eq 3"}
                        提现审核失败
                        {/if}
                    </div>
                </div>
            </div>
        </div>
        {/foreach}
    </div>
    {empty name="$data"}
    <div class="empty_data">
        暂无数据
    </div>
    {/empty}
    {notempty name="$data"}
    <div class="load_more layout align_center justify_center">
        <div>加载更多</div>
        <div class="layout align_center justify_center">
            <img src="__CDN__/assets/advertising/img/right.png" alt="">
        </div>
    </div>
    <!--当前页-->
    <input type="hidden" id="page" value="1"/>
    {/notempty}
    {include file="public/js" /}
</body>
<script>
    $(function(){
        //加载更多
        $(".load_more").click(function () {
王晓刚 authored
55
            var user_id = "{$user.id}";
王晓刚 authored
56 57 58
            var page = $('#page').val();
            page++;
            $.ajax({
王晓刚 authored
59
                url:"{:url('home/member/more_withdraw_log')}",
王晓刚 authored
60
                type:"POST",
王晓刚 authored
61
                data:{'page':page,'user_id':user_id},
王晓刚 authored
62 63 64 65 66 67 68 69 70 71
                success:function(res){
                    if(res.code == 1){
                        if(res.data == ''){
                            $('.justify_center').html("<div>没有更多了~</div>");
                            toast('没有更多了~');
                            return;
                        }
                        var html = "";
                        $(res.data).each(function (key, vo) {
                            var type = "";
王晓刚 authored
72 73
                            if(vo.type == 1){
                                type = "提现审核中";
王晓刚 authored
74
                            }else if(vo.type == 5){
王晓刚 authored
75 76 77
                                type = "体现审核成功";
                            }else if(vo.type == 6){
                                type = "提现审核失败";
王晓刚 authored
78 79
                            }
                            html += "<div class=\"record_single\">\n" +
王晓刚 authored
80 81 82 83 84 85 86 87 88
                                "            <div class=\"record_box layout justify flex_diection\">\n" +
                                "                <div class=\"layout justify flex_row\">\n" +
                                "                    <div class=\"record_title\">提现(微信余额)</div>\n" +
                                "                    <div class=\"record_num\">"+vo.rmb+"元</div>\n" +
                                "                </div>\n" +
                                "                <div class=\"record_date layout justify flex_row\">\n" +
                                "                    <div>"+vo.createtime+"</div>\n" +
                                "                    <div class=\"record_succ\">\n" +
                                "                        "+type+"\n" +
王晓刚 authored
89 90
                                "                    </div>\n" +
                                "                </div>\n" +
王晓刚 authored
91 92
                                "            </div>\n" +
                                "        </div>";
王晓刚 authored
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
                        });
                        $('#dom').append(html);
                        $('#page').val(page);
                    }else{
                        toast('与服务器断开连接');
                    }
                },
                error:function(){
                    toast('与服务器断开连接');
                }
            })
        })
    })
</script>
</html>