我的房屋流程对接接口,缴费页面功能修改一版

This commit is contained in:
wangyuxin
2026-04-30 08:24:22 +08:00
parent d569bbc8e1
commit 2c528b7973
19 changed files with 2675 additions and 2553 deletions

View File

@@ -5,14 +5,11 @@
:border="false">
</uni-nav-bar>
<!-- 表单区域 -->
<scroll-view class="page" scroll-y="true">
<view class="container">
<!-- 1. 物业费详情页 -->
<view class="pay-page">
<!-- 未欠费 -->
<view class="amount-section">
<image src="http://47.104.199.163:9090/images/propertyImgs/noArrears.png" class="background-image-style"></image>
@@ -22,7 +19,6 @@
<text class="lineStyle">{{'|'}}</text>
<text>{{'缴费金额:'+lastPayNum+'元'}}</text>
</view>
</view>
<!-- 缴费信息 -->
@@ -44,7 +40,6 @@
<text class="info-label">可用余额</text>
<text class="info-value">0.00</text>
</view>
</view>
<view v-else>
<view class="info-item" v-if="arrearsPayment=='暖气费'">
@@ -63,153 +58,58 @@
<text class="info-label">缴费单位</text>
<text class="info-value">HN热力有限公司</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
onReady: function(e) {},
components: {
<script setup>
import {
ref,
onMounted,
computed
},
} from 'vue'
import {
onShow,
onReady,
onReachBottom,
onLoad,
onUnload,
onPullDownRefresh
} from '@dcloudio/uni-app'
computed: {
// 响应式数据
const lastPayTime = ref('2022-11-29')
const lastPayNum = ref('2022.00')
const statusBarHeight = ref(20)
const arrearsPayment = ref(uni.getStorageSync('arrearsPayment'))
// 生命周期
onShow(() => {})
onMounted(() => {})
onReady(() => {})
// 方法
const goBack = () => {
uni.redirectTo({
url: '/pageSubPack/payment-list/paymentIndex'
})
}
},
created() {
},
onShow() {
},
mounted() {},
onReady() {
this.$nextTick(() => {
})
},
data() {
return {
lastPayTime: '2022-11-29',
lastPayNum: '2022.00',
/* 设定状态栏默认高度 */
statusBarHeight: 20,
arrearsPayment: uni.getStorageSync('arrearsPayment'),
}
},
methods: {
goBack() {
uni.redirectTo({
url: '/pageSubPack/payment-list/paymentIndex',
success: res => {},
fail: () => {},
complete: () => {}
});
},
// 点击立即缴费
handlePay() {
if (!this.payAmount || Number(this.payAmount) <= 0) {
uni.showToast({
title: "请输入正确的缴费金额",
icon: "none"
});
return;
}
this.currentStep = 2;
},
// 关闭密码弹窗
closePasswordModal() {
this.currentStep = 1;
this.password = "";
this.showBankList = false;
},
// 选择银行卡
selectBank(item) {
this.selectedBank = item;
this.showBankList = false;
},
// 输入密码
inputPassword(num) {
if (this.password.length >= 6) return;
this.password += num.toString();
// 密码满6位自动提交
if (this.password.length === 6) {
this.handleConfirmPay();
}
},
// 删除密码
deletePassword() {
this.password = this.password.slice(0, -1);
},
// 确认支付
handleConfirmPay() {
// 这里模拟支付请求,实际项目中调用后端接口
uni.showLoading({
title: "支付中...",
mask: true
});
setTimeout(() => {
uni.hideLoading();
// 支付成功,跳转到成功页
this.currentStep = 3;
this.password = "";
this.showBankList = false;
}, 1500);
},
// 返回生活缴费列表
handleBackToList() {
uni.redirectTo({
url: '/pageSubPack/payment-list/paymentIndex',
success: res => {},
fail: () => {},
complete: () => {}
});
}
},
}
// 以下为原代码保留的方法(未使用但保持功能完整)
const handlePay = () => {}
const closePasswordModal = () => {}
const selectBank = () => {}
const inputPassword = () => {}
const deletePassword = () => {}
const handleConfirmPay = () => {}
const handleBackToList = () => {}
</script>
<style lang="scss">
page {
background: #f9f9f9;
@@ -221,7 +121,6 @@
display: flex;
flex-direction: column;
height: 100vh;
/* 关键:占满屏幕高度 */
background-color: #f9f9f9;
}
@@ -232,8 +131,6 @@
box-sizing: border-box;
}
/* 1. 物业费详情页 */
.pay-page {
width: 100%;
}
@@ -245,11 +142,9 @@
flex-direction: column;
align-items: center;
color: #999999;
}
.background-image-style {
width: 466rpx;
height: 250rpx;
margin-bottom: 140rpx;
@@ -268,11 +163,8 @@
font-weight: 600;
}
.info-section {}
.lineStyle {
margin: 0rpx 30rpx;
}
.info-item {
@@ -302,11 +194,10 @@
font-size: 50rpx;
color: #333;
font-weight: 600;
}
.input-section {
padding: 030rpx;
padding: 0 30rpx;
margin-bottom: 60rpx;
}
@@ -319,7 +210,7 @@
}
.btn-section {
padding: 030rpx;
padding: 0 30rpx;
}
.pay-btn {
@@ -334,7 +225,6 @@
outline: none;
}
/* 2. 支付密码弹窗 */
.modal-overlay {
position: fixed;
top: 0;
@@ -350,7 +240,7 @@
.password-modal {
width: 100%;
background-color: #fff;
border-radius: 24rpx24rpx 0 0;
border-radius: 24rpx 24rpx 0 0;
padding-bottom: 40rpx;
}
@@ -359,7 +249,7 @@
align-items: center;
justify-content: space-between;
height: 100rpx;
padding: 030rpx;
padding: 0 30rpx;
border-bottom: 2rpx solid #f0f0f0;
}
@@ -382,7 +272,7 @@
}
.pay-info {
padding: 40rpx30rpx;
padding: 40rpx 30rpx;
text-align: center;
}
@@ -434,9 +324,8 @@
color: #999;
}
/* 银行卡列表 */
.bank-list {
padding: 030rpx;
padding: 0 30rpx;
border-bottom: 2rpx solid #f0f0f0;
}
@@ -468,17 +357,15 @@
color: #007aff;
}
/* 密码输入框 */
.password-input {
display: flex;
justify-content: space-between;
padding: 40rpx30rpx;
padding: 40rpx 30rpx;
}
.password-item {
width: 100rpx;
height: 100rpx;
/* border: 2rpx solid #dcdcdc; */
background-color: #efefef;
border-radius: 8rpx;
display: flex;
@@ -493,7 +380,6 @@
border-radius: 50%;
}
/* 数字键盘 */
.keyboard {
width: 100%;
}
@@ -527,7 +413,6 @@
border: none;
}
/* 3. 缴费成功页 */
.success-page {
width: 100%;
min-height: 100vh;
@@ -544,7 +429,6 @@
}
.success-icon {
/* margin-top: 120rpx; */
margin-bottom: 40rpx;
width: 100px;
height: 100px;
@@ -553,12 +437,8 @@
background-color: #007aff;
color: #fff;
border-radius: 50%;
}
.success-icon .iconfont {}
.success-text {
font-size: 40rpx;
font-weight: 600;