修改bug,优化导航

This commit is contained in:
zhouyanli
2026-07-30 15:35:02 +08:00
parent a6243cf466
commit 80ff7588b1
54 changed files with 389 additions and 499 deletions

View File

@@ -216,14 +216,14 @@
// 跳转成功页
const goNext = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/addPaymentSuccess?type=bind'
})
}
// 返回
const goBack = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex'
})
}

View File

@@ -173,21 +173,21 @@
// 跳转成功页
const goNext = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/addPaymentSuccess'
})
}
// 切换(注释保留)
const goToChange = () => {
// uni.redirectTo({
// uni.navigateTo({
// url: '/pageSubPack/payment-list/selectPaymentEntity'
// })
}
// 返回
const goBack = () => {
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' });
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
}
</script>
<style lang="scss">

View File

@@ -88,12 +88,12 @@
// 方法
const goBack = () => {
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' });
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
}
const handlePrimaryClick = () => {
const url = pageConfig.value.backUrl
uni.redirectTo({ url });
uni.navigateTo({ url });
}
</script>

View File

@@ -136,7 +136,7 @@
// 返回
const goBack = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex'
});
}
@@ -220,7 +220,7 @@
// 返回缴费列表
const handleBackToList = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex'
});
}

View File

@@ -107,7 +107,7 @@
// 方法
const goBack = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex'
});
}

View File

@@ -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 {

View File

@@ -248,7 +248,7 @@
}
const goBack = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex'
});
}

View File

@@ -118,7 +118,7 @@
// 返回
const goBack = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex'
});
}
@@ -203,7 +203,7 @@
// 返回缴费列表
const handleBackToList = () => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex'
});
}

View File

@@ -213,7 +213,7 @@
// 方法
const selectItem = (item) => {
console.log(item)
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/addPayment'
})
}
@@ -233,7 +233,7 @@
const onSearch = () => {}
const goBack = () => {
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' });
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
}
</script>

View File

@@ -206,7 +206,7 @@
uni.showToast({ title: '支付成功', icon: 'success' })
uni.setStorageSync('paySuccess', true)
setTimeout(() => {
uni.redirectTo({
uni.navigateTo({
url: '/pageSubPack/payment-list/addPaymentSuccess?type=pay'
})
}, 1500)