修改生活缴费页面、扫码功能、车位参数
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,9 @@
|
||||
</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-list">
|
||||
<view class="bill-item" @click="goToBill(item)" v-for="item,index in detailslist" :key="index">
|
||||
<image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/property.png"
|
||||
v-if="item.type=='0'"></image>
|
||||
@@ -38,15 +39,21 @@
|
||||
v-if="item.type=='2'"></image>
|
||||
<view class="bill-info">
|
||||
<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.villageName+item.buildingName+item.fullAddress}}</view> -->
|
||||
<view class="bill-desc">{{item.name}}</view>
|
||||
</view>
|
||||
|
||||
<view class="arrow"></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>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 新增缴费区域 -->
|
||||
<view class="add-section">
|
||||
@@ -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,
|
||||
@@ -165,6 +176,8 @@
|
||||
// }
|
||||
])
|
||||
|
||||
|
||||
|
||||
const postOpenId = async () => {
|
||||
// App 端直接从本地存储获取 openid
|
||||
try {
|
||||
@@ -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;
|
||||
}
|
||||
</style>
|
||||
@@ -16,7 +16,7 @@
|
||||
<!-- 金额展示 -->
|
||||
<view class="amount-section" v-if="outstandingPayment">
|
||||
<text class="amount-text"
|
||||
:class="{ 'outstandingPaymentClass':outstandingPayment }">{{outstandingPayment?'-¥'+payAmount:'¥'+payAmount}}</text>
|
||||
:class="{ 'outstandingPaymentClass':outstandingPayment }">{{outstandingPayment?'¥'+payAmount:'¥'+payAmount}}</text>
|
||||
</view>
|
||||
<view class="amount-section" v-else>
|
||||
<text class="amount-text paymentClass">{{'¥'+payAmount}}</text>
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user