修改生活缴费页面、扫码功能、车位参数

This commit is contained in:
zhouyanli
2026-06-16 17:18:12 +08:00
parent bea0077272
commit c363c90f95
6 changed files with 92 additions and 34 deletions

View File

@@ -237,8 +237,8 @@
carModel: formData.value.carModel, carModel: formData.value.carModel,
carColor: formData.value.carColor, carColor: formData.value.carColor,
carImageUrl: imageUrl, carImageUrl: imageUrl,
// villageId:uni.getStorageSync('currentVillageId') villageId:uni.getStorageSync('currentVillageId'),
residentId: uni.getStorageSync('userId') userId: uni.getStorageSync('userId')
} }

View File

@@ -69,7 +69,7 @@
const res = await getMyCarList({ const res = await getMyCarList({
pageNum: pageNum.value, pageNum: pageNum.value,
pageSize: pageSize.value, pageSize: pageSize.value,
residentId: uni.getStorageSync('userId') userId: uni.getStorageSync('userId')
}) })
const data = res const data = res

View File

@@ -72,7 +72,7 @@
const res = await getMyCarList({ const res = await getMyCarList({
pageNum: pageNum.value, pageNum: pageNum.value,
pageSize: pageSize.value, pageSize: pageSize.value,
residentId: uni.getStorageSync('userId') userId: uni.getStorageSync('userId')
}) })
const data = res const data = res

View File

@@ -140,7 +140,7 @@
const tapParkingSpace = (item) => { const tapParkingSpace = (item) => {
console.log(item); console.log(item);
uni.redirectTo({ uni.redirectTo({
url: '/pageSubPack/my/parkingSpaceDetail?id=' + item.parkingId + '&statusClass=' + item.checkStatus url: '/pageSubPack/my/parkingSpaceDetail?id=' + item.id + '&statusClass=' + item.checkStatus
}) })
} }

View File

@@ -27,26 +27,33 @@
</view> </view>
</view> </view>
<!-- 已缴/费列表 --> <!-- 物业费/车位/垃圾处理费列表 -->
<view class="bill-list" v-if="detailslist.length != 0"> <scroll-view class="details-scroll" scroll-y="true" @scrolltolower="onLoadMore" v-if="detailslist.length != 0">
<view class="bill-item" @click="goToBill(item)" v-for="item,index in detailslist" :key="index"> <view class="bill-list">
<image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/property.png" <view class="bill-item" @click="goToBill(item)" v-for="item,index in detailslist" :key="index">
v-if="item.type=='0'"></image> <image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/property.png"
<image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/parkingIcon.png" v-if="item.type=='0'"></image>
v-if="item.type=='1'"></image> <image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/parkingIcon.png"
v-if="item.type=='1'"></image>
<image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/垃圾处理2x.png" <image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/垃圾处理2x.png"
v-if="item.type=='2'"></image> v-if="item.type=='2'"></image>
<view class="bill-info"> <view class="bill-info">
<view class="bill-title">{{switchStatus(item.type)}} <view class="bill-title">{{switchStatus(item.type)}}
<view class="bill-status debt" v-if="item.balance<0">已欠费</view> <view class="bill-status debt" v-if="item.payStatus === '0'">未缴纳</view>
</view>
<view class="bill-desc">{{item.name}}</view>
</view> </view>
<!-- <view class="bill-desc">{{item.villageName+item.buildingName+item.fullAddress}}</view> --> <view class="arrow"></view>
<view class="bill-desc">{{item.name}}</view> </view>
<!-- 滚动加载状态 -->
<view class="load-more-status" v-if="loadingMore">
<text class="loading-text">加载中...</text>
</view>
<view class="load-more-status" v-else-if="!hasMore && detailslist.length >= pageSize">
<text class="no-more-text"> 没有更多了 </text>
</view> </view>
<view class="arrow"></view>
</view> </view>
</view> </scroll-view>
<!-- 新增缴费区域 --> <!-- 新增缴费区域 -->
<view class="add-section"> <view class="add-section">
@@ -106,8 +113,12 @@
} from '/pageSubPack/api/apiSub.js' } from '/pageSubPack/api/apiSub.js'
// 响应式数据 // 响应式数据
const statusBarHeight = ref(20) 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([ const paymentList = ref([
// { // {
// id: 1, // id: 1,
@@ -164,6 +175,8 @@
// iconClass: "parking" // iconClass: "parking"
// } // }
]) ])
const postOpenId = async () => { const postOpenId = async () => {
// App 端直接从本地存储获取 openid // App 端直接从本地存储获取 openid
@@ -279,18 +292,40 @@
} }
// 获取缴费列表
const getBillDetails = (isLoadMore = false) => {
const detailslist = ref([]) if (isLoadMore) {
const getBillDetails = ()=>{ if (!hasMore.value || loadingMore.value) return
pageNum.value++
loadingMore.value = true
} else {
pageNum.value = 1
hasMore.value = true
}
getTopUpDetails({ getTopUpDetails({
userId:uni.getStorageSync('userId'), userId: uni.getStorageSync('userId'),
villageId:uni.getStorageSync('currentVillageId'), villageId: uni.getStorageSync('currentVillageId'),
}).then(res=>{ pageNum: pageNum.value,
// console.log(res) pageSize: pageSize.value,
detailslist.value = res.data; }).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 switchStatus = (type) => {
const typeMap = { const typeMap = {
'0': '物业费', '0': '物业费',
@@ -515,4 +550,26 @@
width: 100vw; width: 100vw;
height: 46px; 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;
}
</style> </style>

View File

@@ -16,7 +16,7 @@
<!-- 金额展示 --> <!-- 金额展示 -->
<view class="amount-section" v-if="outstandingPayment"> <view class="amount-section" v-if="outstandingPayment">
<text class="amount-text" <text class="amount-text"
:class="{ 'outstandingPaymentClass':outstandingPayment }">{{outstandingPayment?'-¥'+payAmount:'¥'+payAmount}}</text> :class="{ 'outstandingPaymentClass':outstandingPayment }">{{outstandingPayment?'¥'+payAmount:'¥'+payAmount}}</text>
</view> </view>
<view class="amount-section" v-else> <view class="amount-section" v-else>
<text class="amount-text paymentClass">{{'¥'+payAmount}}</text> <text class="amount-text paymentClass">{{'¥'+payAmount}}</text>
@@ -101,7 +101,7 @@
const amount = Number(options.amount) || 0 const amount = Number(options.amount) || 0
payAmount.value = amount payAmount.value = amount
arrearsAmount.value = amount.toFixed(2) arrearsAmount.value = amount.toFixed(2)
outstandingPayment.value = amount > 0 // outstandingPayment.value = amount > 0
} }
}) })
@@ -220,7 +220,8 @@
} }
.outstandingPaymentClass { .outstandingPaymentClass {
color: #E34D59; /* color: #E34D59; */
color: #00aaff;
} }
.paymentClass { .paymentClass {