给停车订单页面的接口添加页数页码
This commit is contained in:
parent
997502ef01
commit
1ee4532487
@ -61,7 +61,9 @@ import { apiArr } from '@/api/park.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderData: []
|
||||
orderData: [],
|
||||
page_num: 1,
|
||||
page_size: 20,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -144,6 +146,8 @@ export default {
|
||||
// 获取订单数据
|
||||
getOrderData() {
|
||||
const params = {
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
user_id: uni.getStorageSync('userId')
|
||||
}
|
||||
request(apiArr.tempParkingOrderList, "POST", params).then((res) => {
|
||||
@ -154,6 +158,12 @@ export default {
|
||||
onLoad() {
|
||||
// 页面加载时获取订单数据
|
||||
this.getOrderData();
|
||||
},
|
||||
|
||||
// 页面滑动到底部时触发
|
||||
onReachBottom() {
|
||||
this.page_size += 10;
|
||||
this.getOrderData();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user