ajax请求后台数据,console了msg之后,出现的数据,显示是有maxPage的,但是代码中,会报错maxPage为空,这是什么问题?
下面是我的代码
$.ajax({
url : "../../yqParameter/queryForList",
// url : "../../json/test_smokeQuality_paramsync.json",// 模拟json
data : {
limit : rowNum,// 行数
thisPage : pageNo,// 当前页
runningStatus : runstateo,// 运行状态
msgStatus : msgstateo,// 通讯状态
lackStatus : qualitystateo,
dtuImei : dtustateo,// DTU的值
dvArea : valArea,// 区域
dvName : mouSearch
// 名称
},
type : 'post',
dataType : 'jsonp',
// dataType : 'json',
beforeSend : function() {
$(window.parent.document).find("#loadings").show();
},
success : function(msg) {
$(window.parent.document).find("#loadings").hide();
$('#tabid tbody').empty();
// console.log(msg);
console.log(msg.data.maxPage);
totalPage = msg.data.maxPage;
totalRecord = msg.data.total;
// console.log(totalRecord);
kkpager.total = totalPage;
kkpager.totalRecords = totalRecord;
initpage(pageNo, totalRecord, totalPage);
// table数据展示
successmsg(msg);
$(".loadings").hide();
},
error : function(jqXHR, textStatus, errorThrown) {
autoLogin(jqXHR);
}
});
read property 'maxPage' of null
的意思是xxx.maxPage
中xxx
是null