{extend name="default/base" /}
{block name="title"}资金流水 - {__block__}{/block}
{block name="css"}
<link rel="stylesheet"  href="__MOBILE__/css/userscores.css?v={$v}">
{/block}
{block name="header"}
    {php}$Title = "资金流水"{/php}
  {include file="default/header" /}
{/block}
{block name="main"}
    <input type="hidden" name="" value="" id="currPage" autocomplete="off">
    <input type="hidden" name="" value="" id="totalPage" autocomplete="off">
    <section class="ui-container">
        <div class="ui-row-flex ui-whitespace ui-row-flex-ver head" style="text-align: left;">
            <div class="ui-col" style="padding-top: 30px;font-size: 0.16rem;text-align: right;">可用资金：¥ {$rs['userMoney']}</div>
            <div class="ui-col" style="font-size: 0.16rem;text-align: right;">冻结资金：¥ {$rs['lockMoney']}</div>
        </div>
        <script type="text/html" id="scoreList">
        <ul class="ui-row score-detail">
        {{# for(var i=0;i<d.length;i++){ }}
            <li class="ui-col ui-col-75 wst-re-info">
                {{d[i].remark}}
                <span class="score-time">{{d[i].createTime}}</span>
            </li>
            <li class="ui-col ui-col-25 {{(d[i].moneyType==1)?'score-plus':'score-reduce'}}">{{(d[i].moneyType==1)?'+':'-'}} {{d[i].money}}</li>
            <div class="wst-clear"></div>
            <div class="score-line"></div>
        {{# } }}
    </ul>
        </script>
        <div class="score-detail-title">资金明细</div>
        <div id="score-list"></div>
    </section>
{/block}
{block name="js"}
<script type='text/javascript' src='__MOBILE__/js/jquery.min.js'></script>
<script type='text/javascript' src='__MOBILE__/users/logmoneys/logmoneys.js?v={$v}'></script>
<script>
var currPage = totalPage = 0;
var loading = false;
$(document).ready(function(){
   getRecordList();
   $(window).scroll(function(){  
       if (loading) return;
       if ((5 + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
           currPage = Number( $('#currPage').val() );
           totalPage = Number( $('#totalPage').val() );
           if( totalPage > 0 && currPage < totalPage ){
             getRecordList();
           }
       }
   });
});
</script>
{/block}