flat: 优化
This commit is contained in:
@@ -127,7 +127,7 @@ function getList(type = 'add', loading = true) {
|
||||
pageSize: pageState.pageSize,
|
||||
type: ranItem.value.value,
|
||||
};
|
||||
$api.createRequest('/app/user/collection/fair', params).then((resData) => {
|
||||
const LoadCache = (resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
@@ -140,7 +140,8 @@ function getList(type = 'add', loading = true) {
|
||||
// pageState.list = resData.rows;
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
};
|
||||
$api.createRequestWithCache('/app/user/collection/fair', params, 'GET', false, {}, LoadCache).then(LoadCache);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user