diff --git a/property-uniapp-project/pageSubPack/my/addCar.vue b/property-uniapp-project/pageSubPack/my/addCar.vue index 1dce18d..6e2bdf5 100644 --- a/property-uniapp-project/pageSubPack/my/addCar.vue +++ b/property-uniapp-project/pageSubPack/my/addCar.vue @@ -237,8 +237,8 @@ carModel: formData.value.carModel, carColor: formData.value.carColor, carImageUrl: imageUrl, - // villageId:uni.getStorageSync('currentVillageId') - residentId: uni.getStorageSync('userId') + villageId:uni.getStorageSync('currentVillageId'), + userId: uni.getStorageSync('userId') } diff --git a/property-uniapp-project/pageSubPack/my/bindCar.vue b/property-uniapp-project/pageSubPack/my/bindCar.vue index 33b31b2..155c318 100644 --- a/property-uniapp-project/pageSubPack/my/bindCar.vue +++ b/property-uniapp-project/pageSubPack/my/bindCar.vue @@ -69,7 +69,7 @@ const res = await getMyCarList({ pageNum: pageNum.value, pageSize: pageSize.value, - residentId: uni.getStorageSync('userId') + userId: uni.getStorageSync('userId') }) const data = res diff --git a/property-uniapp-project/pageSubPack/my/myCarIndex.vue b/property-uniapp-project/pageSubPack/my/myCarIndex.vue index ef8bb59..a3d8459 100644 --- a/property-uniapp-project/pageSubPack/my/myCarIndex.vue +++ b/property-uniapp-project/pageSubPack/my/myCarIndex.vue @@ -72,7 +72,7 @@ const res = await getMyCarList({ pageNum: pageNum.value, pageSize: pageSize.value, - residentId: uni.getStorageSync('userId') + userId: uni.getStorageSync('userId') }) const data = res diff --git a/property-uniapp-project/pageSubPack/my/myParkingSpaceIndex.vue b/property-uniapp-project/pageSubPack/my/myParkingSpaceIndex.vue index 4784cd3..7b3e1f9 100644 --- a/property-uniapp-project/pageSubPack/my/myParkingSpaceIndex.vue +++ b/property-uniapp-project/pageSubPack/my/myParkingSpaceIndex.vue @@ -140,7 +140,7 @@ const tapParkingSpace = (item) => { console.log(item); uni.redirectTo({ - url: '/pageSubPack/my/parkingSpaceDetail?id=' + item.parkingId + '&statusClass=' + item.checkStatus + url: '/pageSubPack/my/parkingSpaceDetail?id=' + item.id + '&statusClass=' + item.checkStatus }) } diff --git a/property-uniapp-project/pageSubPack/payment-list/paymentIndex.vue b/property-uniapp-project/pageSubPack/payment-list/paymentIndex.vue index fc96ef4..e38fd6e 100644 --- a/property-uniapp-project/pageSubPack/payment-list/paymentIndex.vue +++ b/property-uniapp-project/pageSubPack/payment-list/paymentIndex.vue @@ -27,26 +27,33 @@ - - - - - + + + + + + - - {{switchStatus(item.type)}} - 已欠费 + + {{switchStatus(item.type)}} + 未缴纳 + + {{item.name}} - - {{item.name}} + + + + + 加载中... + + + — 没有更多了 — - - - + @@ -106,8 +113,12 @@ } from '/pageSubPack/api/apiSub.js' // 响应式数据 const statusBarHeight = ref(20) - // const subscribeAuth = ref(uni.getStorageSync('subscribeAuth') || '') - + const detailslist = ref([]) + const pageNum = ref(1) + const pageSize = ref(3) + const total = ref(0) + const hasMore = ref(true) + const loadingMore = ref(false) const paymentList = ref([ // { // id: 1, @@ -164,6 +175,8 @@ // iconClass: "parking" // } ]) + + const postOpenId = async () => { // App 端直接从本地存储获取 openid @@ -279,18 +292,40 @@ } - - - const detailslist = ref([]) - const getBillDetails = ()=>{ + // 获取缴费列表 + const getBillDetails = (isLoadMore = false) => { + if (isLoadMore) { + if (!hasMore.value || loadingMore.value) return + pageNum.value++ + loadingMore.value = true + } else { + pageNum.value = 1 + hasMore.value = true + } getTopUpDetails({ - userId:uni.getStorageSync('userId'), - villageId:uni.getStorageSync('currentVillageId'), - }).then(res=>{ - // console.log(res) - detailslist.value = res.data; + userId: uni.getStorageSync('userId'), + villageId: uni.getStorageSync('currentVillageId'), + pageNum: pageNum.value, + pageSize: pageSize.value, + }).then(res => { + if (isLoadMore) { + detailslist.value = [...detailslist.value, ...(res.rows || [])] + loadingMore.value = false + } else { + detailslist.value = res.rows || [] + } + total.value = res.total || 0 + hasMore.value = detailslist.value.length < total.value + }).catch(() => { + if (isLoadMore) { + pageNum.value-- + loadingMore.value = false + } }) } + const onLoadMore = () => { + getBillDetails(true) + } const switchStatus = (type) => { const typeMap = { '0': '物业费', @@ -515,4 +550,26 @@ width: 100vw; height: 46px; } + + .details-scroll { + max-height: 500rpx; + margin-bottom: 40rpx; + } + + .load-more-status { + display: flex; + justify-content: center; + align-items: center; + padding: 20rpx 0; + } + + .loading-text { + font-size: 26rpx; + color: #999; + } + + .no-more-text { + font-size: 26rpx; + color: #ccc; + } \ No newline at end of file diff --git a/property-uniapp-project/pageSubPack/payment-list/propertyFeePayment.vue b/property-uniapp-project/pageSubPack/payment-list/propertyFeePayment.vue index dd71ae1..0dd4815 100644 --- a/property-uniapp-project/pageSubPack/payment-list/propertyFeePayment.vue +++ b/property-uniapp-project/pageSubPack/payment-list/propertyFeePayment.vue @@ -16,7 +16,7 @@ {{outstandingPayment?'-¥'+payAmount:'¥'+payAmount}} + :class="{ 'outstandingPaymentClass':outstandingPayment }">{{outstandingPayment?'¥'+payAmount:'¥'+payAmount}} {{'¥'+payAmount}} @@ -101,7 +101,7 @@ const amount = Number(options.amount) || 0 payAmount.value = amount arrearsAmount.value = amount.toFixed(2) - outstandingPayment.value = amount > 0 + // outstandingPayment.value = amount > 0 } }) @@ -220,7 +220,8 @@ } .outstandingPaymentClass { - color: #E34D59; + /* color: #E34D59; */ + color: #00aaff; } .paymentClass {