//查询我的充值信息
function findPaymentRecord(page){
var sendData = {};
sendData["pageSize"] = "10";
sendData["pageNo"] = page;
sendData["chargingItemId"] = "";
util.sendAjax({
url:'finance/paymentRecord',
data:sendData,
async:false,
type:'GET',
cache:false,
success:function(json){
console.log(json);
if(json.rc==0){
if(json.list!=null && json.list.length>0){
var html = "";
$.each(json.list,function(index,item){
html+="
"+item.paymentAmount+" | "+
""+item.paymentWay+" | "+
""+item.paymentTime+" |
";
})
$("#showContent").html(html);
initPage(page,10,json.total);
}
}else{
layer.open({
content: "查询我的消费记录失败,错误代码:"+json.rc+"错误信息:"+json.msg
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
}
}
});
}
//初始化分页
function initPage(nowPage,pageSize,total){
var html=""+
""+nowPage+"/"+Math.ceil(total/pageSize)+"
"+
"
";
$("#showPageContent").html(html);
}
$(function(){
var page =1;
var obj = util.getQueryString();
if(obj.page==undefined){
page=1;
}else{
page=obj.page;
}
findPaymentRecord(page);
})