273c8980 by 任超

style:新闻

1 parent baf6d5b5
......@@ -21,9 +21,11 @@ function LoadNewsData(currentPage) {
dataType: "json",
//数据,这里使用的是Json格式进行传输
success: function (result) {
data.total = result.data.total;
if (result.code == 200 && result.data != null) {
data.total = result.data.total;
data.list = result.data.records;
}else {
data.total = 0;
}
layui.use('laytpl', function () {
laytpl = layui.laytpl;
......@@ -103,8 +105,11 @@ layui.use('laypage', function () {
}
}
});
if(data.total ==0) {
$('#page').hide();
}
})
var data = { //数据
"list": [],
total: undefined
total: 0
};
\ No newline at end of file
......