fix: 未出账单倒序排列。
This commit is contained in:
@@ -174,7 +174,12 @@ function loadmore() {
|
|||||||
function getList() {
|
function getList() {
|
||||||
status.value = 'loading'
|
status.value = 'loading'
|
||||||
listCreditCardBill({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
listCreditCardBill({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||||
listData.value = listData.value.concat(res.rows)
|
let rows = res.rows
|
||||||
|
// 如果查询条件是 billState='0',对数据进行倒序排列
|
||||||
|
if (queryParams.value.billState === '0' && rows && rows.length > 0) {
|
||||||
|
rows = rows.reverse()
|
||||||
|
}
|
||||||
|
listData.value = listData.value.concat(rows)
|
||||||
if (listData.value.length < res.total) {
|
if (listData.value.length < res.total) {
|
||||||
status.value = 'loadmore'
|
status.value = 'loadmore'
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user