mui.init({ pullRefresh: { container: '#pullrefresh', down: {}, up: { contentrefresh: '正在加载...', callback: pullupRefresh } } }); var pageNumber = 0, pagesize = 10; function pullupRefresh() { var btnArray = ['否', '是']; $.ajax(base_path + '/WithDrawalsLogs/historyWithdrawNext?dates=' + new Date().getTime(), { data: { "openid": "", "page": { "pageSize": pagesize, "pageNumber": pageNumber } }, dataType: 'json', type: 'post', timeout: 15000, xhrFields: { withCredentials: true }, crossDomain: true, success: function(dt) { if(dt.isRedirect) { location.href = dt.redirectURL; } else { if(dt.status) { var fenxiao_list = []; fenxiao_list = dt.data.list; $("#amount").html("¥" + accDiv(dt.data.amount, 100)); mui('#pullrefresh').pullRefresh().endPullupToRefresh(fenxiao_list.length < pagesize); var table = document.body.querySelector('.my-tab-view-pull'); mui(fenxiao_list).each(function(index) { var li = document.createElement('li'); li.className = 'mui-table-view-cell'; this.name == null ? this.name = "神仙哥哥" : this.name; var status = this.status; switch(status) { case 1: status = "申请中"; break; case 2: status = "申请成功"; break; default: status = "申请失败" }; li.innerHTML = '
提现:¥' + accDiv(this.withDrawalsNum, 100) + '' + status + '' + this.createDate + '

' + this.withDrawalsName + ':' + this.accountNo + '' + this.bankLocal + '

'; table.appendChild(li) }) } else { mui.confirm(dt.message, '爱贝源-提示', btnArray, function(e) { if(e.index == 1) { location.reload(true) } }) } } }, error: function(xhr, type, errorThrown) { console.log(xhr) } }); }; function getMoney() { window.location.href = base_path + "/drp/withdrawalsPage?openid=" }; mui.ready(function() { mui('#pullrefresh').pullRefresh().pullupLoading(); getCartNum(); document.querySelector('.loading-bg').style.display = 'none' });