修改bug,优化导航
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { onShow, onLoad, onBackPress } from '@dcloudio/uni-app'
|
||||
|
||||
import {
|
||||
getTopUpSelectByResident,
|
||||
@@ -175,6 +175,15 @@
|
||||
getPayList()
|
||||
})
|
||||
|
||||
// 页面返回拦截
|
||||
onBackPress(() => {
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length <= 1) {
|
||||
uni.switchTab({ url: "/pages/serviceIndex/serviceIndex" })
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const getPayList = async () => {
|
||||
// 防重复请求
|
||||
@@ -202,11 +211,11 @@
|
||||
// 物业费、车位费、垃圾处理费走物业费缴纳页;水费、电费走欠费缴纳页
|
||||
const isProperty = ['物业费', '车位费', '垃圾处理费', '垃圾费', '0', '1', '2'].includes(type)
|
||||
if (isProperty) {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: `/pageSubPack/payment-list/propertyFeePayment?amount=${item.amount || ''}`
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/arrearsPayment'
|
||||
})
|
||||
}
|
||||
@@ -214,18 +223,18 @@
|
||||
|
||||
|
||||
const goToRecord = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentRecord'
|
||||
})
|
||||
}
|
||||
|
||||
const goToAdd = (type) => {
|
||||
if (type.name == '燃气' || type.name == '暖气') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/selectPaymentEntity'
|
||||
})
|
||||
} else if (type.name == '水表' || type.name == '电表') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/addHydropower'
|
||||
})
|
||||
}
|
||||
@@ -376,6 +385,7 @@
|
||||
color: #333;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bill-desc {
|
||||
@@ -388,6 +398,9 @@
|
||||
}
|
||||
|
||||
.bill-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rpx 16rpx;
|
||||
border-radius: 30rpx;
|
||||
font-size: 24rpx;
|
||||
@@ -500,6 +513,7 @@
|
||||
.details-scroll {
|
||||
max-height: 500rpx;
|
||||
margin-bottom: 40rpx;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.load-more-status {
|
||||
|
||||
Reference in New Issue
Block a user