Commit 2e42a1cb by 陈超

A

parent e323e9e0
...@@ -90,10 +90,18 @@ ...@@ -90,10 +90,18 @@
data: "p=" + (opt.page + 1) + "&cate=" + (this.tab + 1), data: "p=" + (opt.page + 1) + "&cate=" + (this.tab + 1),
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
that.loading =false that.loading = false
that.finished = true let array = data.data.length > 0 ? data.data : [],
console.log(data.count) if(array.length > 0) {
return opt.page += 1
opt.items = opt.items.concat(array.map( r => {
return {
}
}))
}
opt.finished = data.nowPage >= data.totalPages
that.finished = data.nowPage >= data.totalPages
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment