perf :包含分页数据页面代码优化

This commit is contained in:
kele
2023-02-07 15:45:02 +08:00
parent 447ece1a49
commit 29131a3af7
10 changed files with 67 additions and 82 deletions
-4
View File
@@ -48,15 +48,11 @@
page,
});
if (res.error === 0) {
if (page >= 2) {
let couponlist = _.concat(state.pagination.data, res.data.data);
state.pagination = {
...res.data,
data: couponlist,
};
} else {
state.pagination = res.data;
}
if (state.pagination.current_page < state.pagination.last_page) {
state.loadStatus = 'more';
} else {