在无数据的时候提示一下

This commit is contained in:
Jerry Yan 2019-09-08 12:46:07 +08:00
parent 17e9a8658e
commit 23067c9d9e

View File

@ -59,11 +59,11 @@ function getData(page) {
page: page, page: page,
pagesize: 10 pagesize: 10
}, function(data) { }, function(data) {
//console.log(data);
var data = toJson(data); var data = toJson(data);
var html = '' var html = ''
if ('' == data.data.Rows) { if ('' == data.data.Rows) {
mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
$('.con').append("<div style='text-align: center;margin-top: 50px;'>无数据</div>");
return; return;
} }
$.each(data.data.Rows, function() { $.each(data.data.Rows, function() {
@ -123,7 +123,6 @@ function getData(page) {
html += '</div></div>' html += '</div></div>'
}) })
$('.con').append(html); $('.con').append(html);
isLoad = false; isLoad = false;
}) })