代码更新

This commit is contained in:
GaoHao
2025-03-10 09:14:57 +08:00
parent 4f65b08c06
commit 490c513f48
48 changed files with 1162 additions and 537 deletions

View File

@@ -27,9 +27,10 @@
</template>
<script setup>
import { creditRePaymentRecord } from '@/http/yskApi/credit.js'
import { reactive, ref } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
import { creditRePaymentRecord } from '@/api/buyer.js';
const pageData = reactive({
query: {
page: 1,
@@ -38,6 +39,7 @@
orderId: null,
paymentMethod: ''
},
totalElements: 0,
list: []
})
@@ -51,7 +53,14 @@
}
getList()
})
// 监听,触底事件。 查询下一页
onReachBottom(() => {
console.log(pageData.query.page)
if( pageData.query.page * pageData.query.size < pageData.totalElements) {
pageData.query.page++
getList();
}
});
/**
* 获取还款记录列表
*/
@@ -66,7 +75,8 @@
params.orderId = pageData.query.orderId
}
creditRePaymentRecord(params).then(res => {
pageData.list = res.content
pageData.list = [...pageData.list,...res.records]
pageData.totalElements = res.totalRow
})
}
@@ -75,7 +85,8 @@
*/
function inputEvent(d) {
pageData.query.paymentMethod = pageData.query.paymentMethod.replace(/\s*/g, "");
console.log(pageData.query)
pageData.query.size = 1;
pageData.list = [];
getList()
}
</script>