4/18 样式修改,缴费部分页面按照ui重做

This commit is contained in:
wangyuxin
2026-04-18 16:24:20 +08:00
parent 72ec4017e8
commit 452bf0b84d
36 changed files with 975 additions and 973 deletions

View File

@@ -4,23 +4,22 @@
<uni-nav-bar :title="'新增'+paymentType+'缴费'" left-icon="left" @clickLeft="goBack" backgroundColor="transparent"
:border="false">
</uni-nav-bar>
<Loading mask="true" click="true" ref="loading"></Loading>
<!-- 表单区域 -->
<scroll-view class="page" scroll-y="true">
<view class="container">
<!-- 顶部蓝色标题栏 -->
<view class="header-card">
<view class="header-icon">
<text class="icon-fire">🔥</text>
<image class="iconStyle" src="/static/propertyImgs/gas.png"></image>
</view>
<text class="header-title">燃气费</text>
</view>
<!-- 缴费信息卡片 -->
<view class="info-card">
<view class="form-item">
<view class="form-item" @click="goToChange()">
<text class="label">缴费单位</text>
<text class="company-name">XXXXXXXX燃气有限公司</text>
</view>
@@ -34,21 +33,7 @@
</view>
</view>
<!-- 底部协议和提交按钮 -->
<view class="bottom-area">
<view class="agreement">
<checkbox-group @change="handleAgreeChange">
<checkbox :checked="isAgree" />
</checkbox-group>
<text class="agreement-text">已阅并同意</text>
<text class="agreement-link" @click="handleProtocol">协议链接</text>
</view>
<button class="submit-btn" @click="handleSubmit">
提交
</button>
</view>
</view>
@@ -81,6 +66,21 @@
</scroll-view>
<!-- 底部协议和提交按钮 -->
<view class="bottom-area">
<view class="agreement">
<checkbox-group @change="handleAgreeChange">
<checkbox :checked="isAgree" />
</checkbox-group>
<text class="agreement-text">我已阅并同意</text>
<text class="agreement-link" @click="handleProtocol">协议链接</text>
</view>
<button class="submit-btn" @click="handleSubmit">
提交
</button>
</view>
</view>
@@ -191,6 +191,14 @@
complete: () => {}
});
},
goToChange() {
// uni.redirectTo({
// url: '/pages/payment-list/selectPaymentEntity',
// success: res => {},
// fail: () => {},
// complete: () => {}
// });
},
goBack() {
uni.redirectTo({
url: '/pages/payment-list/paymentIndex',
@@ -207,7 +215,7 @@
</script>
<style lang="scss">
page {
background: #f2f1f6;
background: #f9f9f9;
}
</style>
@@ -223,37 +231,39 @@
.page {
flex: 1;
overflow-y: auto;
padding: 0px 20px;
padding: 0px 40rpx;
box-sizing: border-box;
background-color: #fff;
}
.container {
min-height: 100vh;
background-color: #f5f5f5;
padding: 20rpx;
box-sizing: border-box;
border-radius: 10rpx;
}
/* 顶部标题栏 */
.header-card {
background: linear-gradient(135deg, #66b3ff 0%, #4080ff 100%);
border-radius: 20rpx 20rpx 0 0;
padding: 30rpx 40rpx;
background: #fff;
padding: 30rpx;
display: flex;
align-items: center;
color: #fff;
border-bottom: 2rpx solid #ededed;
}
.header-icon {
width: 60rpx;
height: 60rpx;
width: 56rpx;
height: 56rpx;
background-color: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
}
.iconStyle {
width: 100%;
height: 100%;
}
.icon-fire {
@@ -262,20 +272,22 @@
}
.header-title {
font-size: 16px;
font-size: 32rpx;
font-weight: bold;
}
/* 信息卡片 */
.info-card {
background-color: #fff;
border-radius: 0 0 20rpx 20rpx;
padding: 40rpx;
border-radius: 10rpx;
/* padding: 30rpx; */
margin-bottom: 40rpx;
}
.form-item {
margin-bottom: 40rpx;
/* margin-bottom: 40rpx; */
border-bottom: 2rpx solid #ededed;
padding: 30rpx;
}
.form-item:last-child {
@@ -284,14 +296,14 @@
.label {
display: block;
font-size: 14px;
color: #565656;
font-size: 28rpx;
color: #222;
margin-bottom: 20rpx;
}
.company-name {
display: block;
font-size: 16px;
font-size: 32rpx;
color: #333;
font-weight: 600;
}
@@ -304,7 +316,7 @@
.input-field {
flex: 1;
font-size: 16px;
font-size: 32rpx;
color: #333;
padding: 10rpx 0;
border: none;
@@ -316,7 +328,7 @@
}
.help-link {
font-size: 14px;
font-size: 28rpx;
color: #4080ff;
white-space: nowrap;
margin-left: 20rpx;
@@ -328,15 +340,14 @@
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
padding: 15px;
padding: 30rpx;
box-sizing: border-box;
}
.agreement {
display: flex;
align-items: center;
margin-bottom: 30rpx;
margin-bottom: 20rpx;
}
.agreement checkbox {
@@ -345,12 +356,12 @@
}
.agreement-text {
font-size: 14px;
font-size: 24rpx;
color: #333;
}
.agreement-link {
font-size: 14px;
font-size: 28rpx;
color: #4080ff;
margin-left: 10rpx;
}
@@ -406,15 +417,15 @@
}
.popup-title {
font-size: 16px;
line-height: 30px;
font-size: 32rpx;
line-height: 60rpx;
font-weight: bold;
color: #333;
width: 100%;
display: flex;
/* align-items: center; */
justify-content: space-evenly;
border-bottom: 1px solid #ebebeb;
border-bottom: 2rpx solid #ebebeb;
}
.popup-close {
@@ -460,20 +471,20 @@
}
.item-title {
font-size: 16px;
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 16rpx;
}
.item-desc {
font-size: 14px;
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
/* 弹窗动画 */
@keyframes slideUp {
/* @keyframes slideUp {
from {
transform: translateY(100%);
}
@@ -481,7 +492,7 @@
to {
transform: translateY(0);
}
}
} */
/* 成功提示弹窗 */
.toast-mask {

View File

@@ -4,7 +4,7 @@
<uni-nav-bar :title="'新增'+paymentType+'缴费'" left-icon="left" @clickLeft="goBack" backgroundColor="transparent"
:border="false">
</uni-nav-bar>
<Loading mask="true" click="true" ref="loading"></Loading>
<!-- 表单区域 -->
<scroll-view class="page" scroll-y="true">
@@ -94,7 +94,7 @@
</script>
<style lang="scss">
page {
background: #f2f1f6;
background: #f9f9f9;
}
</style>
@@ -110,27 +110,24 @@
.page {
flex: 1;
overflow-y: auto;
padding: 0px 20px;
padding: 0px 40rpx;
box-sizing: border-box;
background-color: #fff;
/* background-color: #fff; */
}
</style>
<style scoped>
/* 全局容器 */
.container {
min-height: 100vh;
background-color: #f5f5f7;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 30rpx;
box-sizing: border-box;
}
/* 成功图标 */
.success-icon {
width: 180rpx;
height: 180rpx;
width: 220rpx;
height: 220rpx;
border-radius: 50%;
background-color: #1677ff;
display: flex;
@@ -142,7 +139,7 @@
.icon-check {
color: #fff;
font-size: 100rpx;
font-size: 130rpx;
font-weight: bold;
line-height: 1;
}

View File

@@ -4,7 +4,7 @@
<uni-nav-bar :title="arrearsPayment" left-icon="left" @clickLeft="goBack" backgroundColor="transparent"
:border="false">
</uni-nav-bar>
<Loading mask="true" click="true" ref="loading"></Loading>
<!-- 表单区域 -->
<scroll-view class="page" scroll-y="true">
@@ -18,7 +18,7 @@
<text class="amount-text"
:class="{ 'outstandingPaymentClass':outstandingPayment }">{{outstandingPayment?'-¥'+payAmount:'¥'+payAmount}}</text>
</view>
<view style="border-bottom: 1px solid #c7c7c7;padding-bottom: 10px;"></view>
<view style="border-bottom: 2rpx solid #ededed;margin:10rpx 0rpx;"></view>
<!-- 缴费信息 -->
<view class="info-section" style="">
<view v-if="arrearsPayment=='物业费'">
@@ -59,13 +59,15 @@
<text class="info-label">缴费单位</text>
<text class="info-value">HN热力有限公司</text>
</view>
<!-- <view style="border-bottom: 1px solid #c7c7c7;padding-bottom: 10px;"></view> -->
<!-- <view style="border-bottom: 2rpx solid #c7c7c7;padding-bottom:20rpx;"></view> -->
<!-- 缴费金额输入 -->
<view style="border-bottom: 2rpx solid #ededed;margin:10rpx 0rpx;"></view>
<view class="input-section" style="display: flex;">
<text class="amount-input" style="width: auto;">¥</text>
<input type="number" v-model="payAmount" class="amount-input" placeholder="点击输入缴费金额">
<text class="amount-input" style="width: auto;margin: 0rpx 20rpx;">¥</text>
<input type="number" v-model="payNum" class="amount-input" placeholder="点击输入缴费金额">
</input>
</view>
<view style="border-bottom: 2rpx solid #ededed;margin:10rpx 0rpx;"></view>
<view class="arrears-row">
<text class="arrears-text">当前欠费金额¥{{ arrearsAmount }}</text>
<text class="auto-fill-btn" @click="handleAutoFill">点击自动填入</text>
@@ -92,7 +94,7 @@
<!-- 商户信息 & 金额 -->
<view class="pay-info">
<text class="merchant-name">智享日照洗护</text>
<text class="merchant-name">充值金额</text>
<text class="pay-amount">¥{{ payAmount }}</text>
</view>
@@ -153,17 +155,19 @@
</view>
<!-- 3. 缴费成功页 -->
<view v-if="currentStep === 3" class="success-page">
<view class="icon-box">
<!-- 成功图标 -->
<view class="success-icon">
<text class="icon"></text>
</view>
<view class="container" v-if="currentStep==3">
<!-- 成功图标 -->
<view class="success-icon">
<text class="icon-check"></text>
</view>
<!-- 主标题 -->
<view class="title">缴费成功</view>
<!-- 提示文案 -->
<view class="desc">
成功缴纳物业费
</view>
<!-- 成功文字 -->
<view class="success-text">缴费成功</view>
<view class="success-desc">成功缴纳物业费</view>
</view>
@@ -223,6 +227,7 @@
password: "", // 输入的密码
showBankList: false, // 是否显示银行卡列表
arrearsAmount: "21.21",
payNum: '',
// 银行卡列表
bankList: [{
id: 1,
@@ -246,16 +251,13 @@
name: "建设银行储蓄卡(8888)",
icon: "/static/bank-logo.png"
}
}
},
methods: {
handleAutoFill() {
this.payAmount = this.arrearsAmount;
this.payNum = this.arrearsAmount;
uni.vibrateShort({
type: "light"
});
@@ -359,7 +361,7 @@
.page {
flex: 1;
overflow-y: auto;
padding: 0px 20px;
padding: 0px 40rpx;
box-sizing: border-box;
background-color: #
/* fff */
@@ -375,12 +377,12 @@
}
.amount-section {
padding: 30px 0;
padding: 60rpx 0;
text-align: center;
}
.amount-text {
font-size: 28px;
font-size: 56rpx;
font-weight: 600;
}
@@ -389,8 +391,8 @@
}
.info-section {
padding: 0 15px 15px 15px;
/* margin-bottom: 20px; */
padding-top: 20rpx;
/* margin-bottom: 40rpx; */
}
@@ -398,62 +400,62 @@
display: flex;
justify-content: space-between;
align-items: center;
height: 40px;
height: 80rpx;
}
.info-label {
font-size: 15px;
font-size: 30rpx;
color: #666;
}
.info-value {
font-size: 15px;
font-size: 30rpx;
color: #333;
font-weight: 600;
}
.info-payAmountItem {
height: 50px;
line-height: 50px;
margin-bottom: 30px;
height: 100rpx;
line-height: 100rpx;
margin-bottom: 60rpx;
}
.info-payAmount {
font-size: 25px;
font-size: 50rpx;
color: #333;
font-weight: 600;
}
.input-section {
/* padding: 0 15px; */
/* padding: 030rpx; */
}
.amount-input {
width: 100%;
height: 50px;
font-size: 24px;
line-height: 50px;
height: 100rpx;
font-size: 32rpx;
line-height: 100rpx;
border: none;
outline: none;
margin-right: 5px;
margin-right: 10rpx;
}
.btn-section {
padding: 10px 15px 20px;
padding: 20rpx 30rpx 40rpx;
display: flex;
gap: 20rpx;
}
.pay-btn {
width: 100%;
height: 50px;
line-height: 50px;
height: 100rpx;
line-height: 100rpx;
background-color: #007aff;
color: #fff;
border-radius: 8px;
font-size: 16px;
border-radius: 16rpx;
font-size: 32rpx;
border: none;
outline: none;
}
@@ -469,56 +471,57 @@
z-index: 999;
display: flex;
align-items: flex-end;
}
.password-modal {
width: 100%;
background-color: #fff;
border-radius: 12px 12px 0 0;
padding-bottom: 20px;
border-radius: 24rpx 24rpx 0 0;
padding-bottom: 40rpx;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
padding: 0 15px;
border-bottom: 1px solid #f0f0f0;
height: 100rpx;
padding: 0 30rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.close-icon {
font-size: 22px;
width: 40px;
height: 50px;
font-size: 44rpx;
width: 80rpx;
height: 100rpx;
display: flex;
align-items: center;
}
.modal-title {
font-size: 17px;
font-size: 32rpx;
font-weight: 500;
color: #000;
}
.header-right {
width: 40px;
width: 80rpx;
}
.pay-info {
padding: 20px 15px;
padding: 40rpx 30rpx;
text-align: center;
}
.merchant-name {
display: block;
font-size: 16px;
font-size: 32rpx;
color: #333;
margin-bottom: 10px;
margin-bottom: 20rpx;
}
.pay-amount {
font-size: 32px;
font-size: 64rpx;
font-weight: 500;
color: #000;
}
@@ -527,12 +530,12 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
border-bottom: 1px solid #f0f0f0;
padding: 30rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.way-label {
font-size: 15px;
font-size: 30rpx;
color: #666;
}
@@ -542,33 +545,33 @@
}
.bank-icon {
width: 16px;
height: 16px;
margin-right: 3px;
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
}
.bank-name {
font-size: 15px;
font-size: 30rpx;
color: #333;
margin-right: 8px;
margin-right: 16rpx;
}
.arrow-icon {
font-size: 14px;
font-size: 28rpx;
color: #999;
}
/* 银行卡列表 */
.bank-list {
padding: 0 15px;
border-bottom: 1px solid #f0f0f0;
padding: 030rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.bank-item {
display: flex;
align-items: center;
height: 50px;
border-bottom: 1px solid #f5f5f5;
height: 100rpx;
border-bottom: 2rpx solid #f5f5f5;
}
.bank-item:last-child {
@@ -576,19 +579,19 @@
}
.bank-item-icon {
width: 24px;
height: 24px;
margin-right: 10px;
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.bank-item-name {
flex: 1;
font-size: 15px;
font-size: 30rpx;
color: #333;
}
.check-icon {
font-size: 18px;
font-size: 36rpx;
color: #007aff;
}
@@ -596,23 +599,23 @@
.password-input {
display: flex;
justify-content: space-between;
padding: 20px 15px;
padding: 40rpx 30rpx;
}
.password-item {
width: 50px;
height: 50px;
/* border: 1px solid #dcdcdc; */
width: 100rpx;
height: 100rpx;
/* border: 2rpx solid #dcdcdc; */
background-color: #efefef;
border-radius: 4px;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.password-dot {
width: 12px;
height: 12px;
width: 24rpx;
height: 24rpx;
background-color: #000;
border-radius: 50%;
}
@@ -631,9 +634,9 @@
height: 54px;
line-height: 54px;
text-align: center;
font-size: 24px;
font-size: 48rpx;
color: #000;
border: 1px solid #f0f0f0;
border: 2rpx solid #f0f0f0;
background-color: #fff;
}
@@ -652,48 +655,48 @@
}
/* 3. 缴费成功页 */
.success-page {
width: 100%;
min-height: 100vh;
background-color: #fff;
text-align: center;
}
.icon-box {
/* 全局容器 */
.container {
display: flex;
justify-content: center;
width: 100vw;
height: 150px;
padding: 30px 0px;
flex-direction: column;
align-items: center;
}
/* 成功图标 */
.success-icon {
/* margin-top: 60px; */
margin-bottom: 20px;
width: 100px;
height: 100px;
font-size: 80px;
color: #007aff;
background-color: #007aff;
color: #fff;
width: 220rpx;
height: 220rpx;
border-radius: 50%;
background-color: #1677ff;
display: flex;
align-items: center;
justify-content: center;
margin-top: 200rpx;
margin-bottom: 60rpx;
}
.success-icon .iconfont {}
.icon-check {
color: #fff;
font-size: 130rpx;
font-weight: bold;
line-height: 1;
}
.success-text {
font-size: 20px;
font-weight: 600;
/* 主标题 */
.title {
font-size: 40rpx;
font-weight: bold;
color: #000;
margin-bottom: 10px;
margin-bottom: 20rpx;
}
.success-desc {
font-size: 15px;
color: #999;
margin-bottom: 50px;
/* 提示文案 */
.desc {
font-size: 32rpx;
color: #666;
line-height: 1.6;
text-align: center;
margin-bottom: 150rpx;
}
/* 核心:欠费金额行样式 */
@@ -701,22 +704,21 @@
display: flex;
align-items: center;
justify-content: space-between;
/* padding: 15px; */
margin-bottom: 30px;
/* padding:30rpx; */
margin-bottom: 60rpx;
}
.arrears-text {
font-size: 14px;
color: #333;
font-weight: 600;
font-size: 28rpx;
color: #999;
}
.auto-fill-btn {
font-size: 14px;
font-size: 28rpx;
color: #007aff;
/* 蓝色,匹配设计图 */
font-weight: 500;
padding: 5px 0;
padding: 10rpx 0;
}
.status-bar {

View File

@@ -1,149 +1,75 @@
<template>
<view class="contentStyle" style="">
<view class="status-bar"></view>
<uni-nav-bar :title="arrearsPayment" left-icon="left" @clickLeft="goBack" backgroundColor="transparent"
<uni-nav-bar :title="arrearsPayment" left-icon="left" @clickLeft="goBack" backgroundColor="transparent"
:border="false">
</uni-nav-bar>
<Loading mask="true" click="true" ref="loading"></Loading>
<!-- 表单区域 -->
<scroll-view class="page" scroll-y="true">
<view class="container">
<!-- 1. 物业费详情页 -->
<view v-if="currentStep === 1" class="pay-page">
<view class="pay-page">
<!-- 金额展示 -->
<!-- 未欠费 -->
<view class="amount-section">
<text class="amount-text">- ¥1680.00</text>
<image src="/static/propertyImgs/noArrears.png" class="background-image-style"></image>
<text class="noArrearsText">暂未查到欠费</text>
<view class="recordText">
<text>{{'最近缴费:'+lastPayTime}}</text>
<text class="lineStyle">{{'|'}}</text>
<text>{{'缴费金额:'+lastPayNum+'元'}}</text>
</view>
</view>
<!-- 缴费信息 -->
<view class="info-section" style="">
<view class="info-item">
<text class="info-label">户名</text>
<text class="info-value">桂花园别墅2号楼2层</text>
<view v-if="arrearsPayment=='物业费'">
<view class="info-item">
<text class="info-label">户名</text>
<text class="info-value">桂花园别墅2号楼2层</text>
</view>
<view class="info-item">
<text class="info-label">户主</text>
<text class="info-value">周大声</text>
</view>
<view class="info-item">
<text class="info-label">缴费单位</text>
<text class="info-value">CT物业</text>
</view>
<view class="info-item">
<text class="info-label">可用余额</text>
<text class="info-value">0.00</text>
</view>
</view>
<view class="info-item">
<text class="info-label">户主</text>
<text class="info-value">周大声</text>
</view>
<view class="info-item">
<text class="info-label">缴费单位</text>
<text class="info-value">CT物业</text>
</view>
<view class="info-item" style="border-bottom: 1px solid #c7c7c7;padding-bottom: 10px;">
<text class="info-label">可用余额</text>
<text class="info-value">0.00</text>
</view>
<view class="info-payAmountItem">
<text class="info-payAmount">{{'¥'+payAmount}}</text>
<view v-else>
<view class="info-item" v-if="arrearsPayment=='暖气费'">
<text class="info-label">房屋</text>
<text class="info-value">桂花园别墅2号楼2层</text>
</view>
<view class="info-item">
<text class="info-label">户号</text>
<text class="info-value">101123456</text>
</view>
<view class="info-item">
<text class="info-label">户主</text>
<text class="info-value">周大声</text>
</view>
<view class="info-item">
<text class="info-label">缴费单位</text>
<text class="info-value">HN热力有限公司</text>
</view>
</view>
</view>
<!-- 缴费金额输入 -->
<!-- <view class="input-section">
<input type="number" v-model="payAmount" class="amount-input" placeholder="请输入缴费金额" />
</view> -->
<!-- 立即缴费按钮 -->
<view class="btn-section">
<button class="pay-btn" @click="handlePay">立即缴费</button>
</view>
</view>
<!-- 2. 支付密码弹窗 -->
<view v-if="currentStep === 2" class="modal-overlay" @click="closePasswordModal">
<view class="password-modal" @click.stop>
<!-- 弹窗头部 -->
<view class="modal-header">
<view class="close-icon" @click="closePasswordModal">
<text class="close-text">×</text>
</view>
<view class="modal-title">请输入支付密码</view>
<view class="header-right"></view>
</view>
<!-- 商户信息 & 金额 -->
<view class="pay-info">
<text class="merchant-name">智享日照洗护</text>
<text class="pay-amount">¥{{ payAmount }}</text>
</view>
<!-- 支付方式选择 -->
<view class="pay-way">
<text class="way-label">支付方式</text>
<view class="way-content">
<image class="bank-icon" src="/static/propertyImgs/bank-logo.png" mode="aspectFit">
</image>
<text class="bank-name">建设银行储蓄卡(8888)</text>
<text class="arrow-icon">></text>
</view>
</view>
<!-- 银行卡选择列表 -->
<!-- <view v-if="showBankList" class="bank-list">
<view v-for="(item, index) in bankList" :key="index" class="bank-item"
@click="selectBank(item)">
<image class="bank-item-icon" :src="item.icon" mode="aspectFit"></image>
<text class="bank-item-name">{{ item.name }}</text>
<text v-if="selectedBank.id === item.id" class="check-icon">&#xe60c;</text>
</view>
</view> -->
<!-- 密码输入框 -->
<view class="password-input">
<view v-for="(item, index) in 6" :key="index" class="password-item">
<text v-if="password.length > index" class="password-dot"></text>
</view>
</view>
<!-- 数字键盘 -->
<view class="keyboard">
<view class="keyboard-row">
<view class="keyboard-item" @click="inputPassword(1)">1</view>
<view class="keyboard-item" @click="inputPassword(2)">2</view>
<view class="keyboard-item" @click="inputPassword(3)">3</view>
</view>
<view class="keyboard-row">
<view class="keyboard-item" @click="inputPassword(4)">4</view>
<view class="keyboard-item" @click="inputPassword(5)">5</view>
<view class="keyboard-item" @click="inputPassword(6)">6</view>
</view>
<view class="keyboard-row">
<view class="keyboard-item" @click="inputPassword(7)">7</view>
<view class="keyboard-item" @click="inputPassword(8)">8</view>
<view class="keyboard-item" @click="inputPassword(9)">9</view>
</view>
<view class="keyboard-row">
<view class="keyboard-item empty"></view>
<view class="keyboard-item" @click="inputPassword(0)">0</view>
<view class="keyboard-item delete" @click="deletePassword">
<text class="icon"></text>
</view>
</view>
</view>
</view>
</view>
<!-- 3. 缴费成功页 -->
<view v-if="currentStep === 3" class="success-page">
<view class="icon-box">
<!-- 成功图标 -->
<view class="success-icon">
<text class="icon"></text>
</view>
</view>
<!-- 成功文字 -->
<view class="success-text">缴费成功</view>
<view class="success-desc">成功缴纳物业费</view>
<!-- 返回按钮 -->
<view class="btn-section">
<button class="pay-btn" @click="handleBackToList">返回生活缴费</button>
</view>
</view>
</view>
@@ -168,12 +94,12 @@
computed: {
},
created() {
},
onShow() {
@@ -188,36 +114,12 @@
},
data() {
return {
lastPayTime: '2022-11-29',
lastPayNum: '2022.00',
/* 设定状态栏默认高度 */
statusBarHeight: 20,
arrearsPayment: uni.getStorageSync('arrearsPayment'),
currentStep: 1, // 1: 详情页 2: 密码弹窗 3: 成功页
payAmount: "1680.00", // 缴费金额
password: "", // 输入的密码
showBankList: false, // 是否显示银行卡列表
// 银行卡列表
bankList: [{
id: 1,
name: "建设银行储蓄卡(8888)",
icon: "/static/bank-logo.png"
},
{
id: 2,
name: "工商银行储蓄卡(6666)",
icon: "/static/icbc-logo.png"
},
{
id: 3,
name: "招商银行储蓄卡(9999)",
icon: "/static/cmb-logo.png"
}
],
// 默认选中的银行卡
selectedBank: {
id: 1,
name: "建设银行储蓄卡(8888)",
icon: "/static/bank-logo.png"
}
@@ -310,7 +212,7 @@
</script>
<style lang="scss">
page {
background: #f2f1f6;
background: #f9f9f9;
}
</style>
@@ -322,37 +224,54 @@
/* 关键:占满屏幕高度 */
background-color: #f9f9f9;
}
.page {
flex: 1;
overflow-y: auto;
padding: 0px 20px;
padding: 0px 40rpx;
box-sizing: border-box;
background-color: #fff;
}
/* 1. 物业费详情页 */
.pay-page {
width: 100%;
min-height: 100vh;
background-color: #fff;
}
.amount-section {
padding: 30px 0;
padding: 30rpx 0;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
color: #999999;
}
.amount-text {
font-size: 28px;
.background-image-style {
width: 466rpx;
height: 250rpx;
margin-bottom: 140rpx;
}
.noArrearsText {
padding-bottom: 50rpx;
width: 100%;
border-bottom: 2rpx solid #ededed;
}
.recordText {
font-size: 24rpx;
color: #222;
margin-top: 20rpx;
font-weight: 600;
color: #bd3124;
}
.info-section {
padding: 0 15px 15px 15px;
/* margin-bottom: 20px; */
.info-section {}
.lineStyle {
margin: 0rpx 30rpx;
}
@@ -360,58 +279,57 @@
display: flex;
justify-content: space-between;
align-items: center;
height: 40px;
height: 80rpx;
}
.info-label {
font-size: 15px;
font-size: 30rpx;
color: #666;
}
.info-value {
font-size: 15px;
font-size: 30rpx;
color: #333;
font-weight: 600;
}
.info-payAmountItem {
height: 50px;
line-height: 50px;
margin-bottom: 30px;
height: 100rpx;
line-height: 100rpx;
margin-bottom: 60rpx;
}
.info-payAmount {
font-size: 25px;
font-size: 50rpx;
color: #333;
font-weight: 600;
}
.input-section {
padding: 0 15px;
margin-bottom: 30px;
padding: 030rpx;
margin-bottom: 60rpx;
}
.amount-input {
width: 100%;
height: 50px;
font-size: 24px;
height: 100rpx;
font-size: 48rpx;
border: none;
outline: none;
}
.btn-section {
padding: 0 15px;
padding: 030rpx;
}
.pay-btn {
width: 100%;
height: 50px;
line-height: 50px;
height: 100rpx;
line-height: 100rpx;
background-color: #007aff;
color: #fff;
border-radius: 8px;
font-size: 16px;
border-radius: 16rpx;
font-size: 32rpx;
border: none;
outline: none;
}
@@ -432,51 +350,51 @@
.password-modal {
width: 100%;
background-color: #fff;
border-radius: 12px 12px 0 0;
padding-bottom: 20px;
border-radius: 24rpx24rpx 0 0;
padding-bottom: 40rpx;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
padding: 0 15px;
border-bottom: 1px solid #f0f0f0;
height: 100rpx;
padding: 030rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.close-icon {
font-size: 22px;
width: 40px;
height: 50px;
font-size: 44rpx;
width: 80rpx;
height: 100rpx;
display: flex;
align-items: center;
}
.modal-title {
font-size: 17px;
font-size: 32rpx;
font-weight: 500;
color: #000;
}
.header-right {
width: 40px;
width: 80rpx;
}
.pay-info {
padding: 20px 15px;
padding: 40rpx30rpx;
text-align: center;
}
.merchant-name {
display: block;
font-size: 16px;
font-size: 32rpx;
color: #333;
margin-bottom: 10px;
margin-bottom: 20rpx;
}
.pay-amount {
font-size: 32px;
font-size: 64rpx;
font-weight: 500;
color: #000;
}
@@ -485,12 +403,12 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
border-bottom: 1px solid #f0f0f0;
padding: 30rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.way-label {
font-size: 15px;
font-size: 30rpx;
color: #666;
}
@@ -500,33 +418,33 @@
}
.bank-icon {
width: 16px;
height: 16px;
margin-right: 3px;
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
}
.bank-name {
font-size: 15px;
font-size: 30rpx;
color: #333;
margin-right: 8px;
margin-right: 16rpx;
}
.arrow-icon {
font-size: 14px;
font-size: 28rpx;
color: #999;
}
/* 银行卡列表 */
.bank-list {
padding: 0 15px;
border-bottom: 1px solid #f0f0f0;
padding: 030rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.bank-item {
display: flex;
align-items: center;
height: 50px;
border-bottom: 1px solid #f5f5f5;
height: 100rpx;
border-bottom: 2rpx solid #f5f5f5;
}
.bank-item:last-child {
@@ -534,19 +452,19 @@
}
.bank-item-icon {
width: 24px;
height: 24px;
margin-right: 10px;
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.bank-item-name {
flex: 1;
font-size: 15px;
font-size: 30rpx;
color: #333;
}
.check-icon {
font-size: 18px;
font-size: 36rpx;
color: #007aff;
}
@@ -554,23 +472,23 @@
.password-input {
display: flex;
justify-content: space-between;
padding: 20px 15px;
padding: 40rpx30rpx;
}
.password-item {
width: 50px;
height: 50px;
/* border: 1px solid #dcdcdc; */
width: 100rpx;
height: 100rpx;
/* border: 2rpx solid #dcdcdc; */
background-color: #efefef;
border-radius: 4px;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.password-dot {
width: 12px;
height: 12px;
width: 24rpx;
height: 24rpx;
background-color: #000;
border-radius: 50%;
}
@@ -589,9 +507,9 @@
height: 54px;
line-height: 54px;
text-align: center;
font-size: 24px;
font-size: 48rpx;
color: #000;
border: 1px solid #f0f0f0;
border: 2rpx solid #f0f0f0;
background-color: #fff;
}
@@ -621,13 +539,13 @@
display: flex;
justify-content: center;
width: 100vw;
height: 150px;
padding: 30px 0px;
height: 1100rpx;
padding: 60rpx 0px;
}
.success-icon {
/* margin-top: 60px; */
margin-bottom: 20px;
/* margin-top: 120rpx; */
margin-bottom: 40rpx;
width: 100px;
height: 100px;
font-size: 80px;
@@ -642,17 +560,19 @@
.success-icon .iconfont {}
.success-text {
font-size: 20px;
font-size: 40rpx;
font-weight: 600;
color: #000;
margin-bottom: 10px;
margin-bottom: 20rpx;
}
.success-desc {
font-size: 15px;
font-size: 30rpx;
color: #999;
margin-bottom: 50px;
}.status-bar{
margin-bottom: 100rpx;
}
.status-bar {
width: 100vw;
height: 46px;
}

View File

@@ -43,6 +43,7 @@
</view>
</view>
</view>
<view style="width: 100%;height: 30rpx;"></view>
</view>
</scroll-view>
@@ -220,43 +221,43 @@
.page {
flex: 1;
overflow-y: auto;
padding: 0px 20px;
padding: 0px 40rpx;
box-sizing: border-box;
/* background-color: #fff; */
}
.topbox {
height: 80px;
height: 150rpx;
width: 100%;
position: relative;
}
.titleImg {
width: 131px;
height: 37px;
width: 262rpx;
height: 74rpx;
position: absolute;
left: 20px;
bottom: 10px;
left: 40rpx;
bottom: 20rpx;
}
.payImg {
width: 250px;
height: 230px;
width: 349.97rpx;
height: 313.57rpx;
position: absolute;
right: -60px;
bottom: -100px;
right: -80rpx;
bottom: -140rpx;
}
.container {
/* padding: 15px; */
/* padding:30rpx; */
}
/* ===================== 欠费列表 ===================== */
.bill-list {
margin-bottom: 40rpx;
background-color: #fff;
padding: 15px;
border-radius: 5px;
padding: 30rpx;
border-radius: 10rpx;
}
.bill-item {
@@ -264,24 +265,27 @@
align-items: center;
background-color: #F6F9FE;
border-radius: 12rpx;
padding: 10px 10px 10px 0px;
padding: 20rpx 20rpx 20rpx 0px;
margin-bottom: 20rpx;
}
.bill-item:last-child {
margin-bottom: 0rpx;
}
.bill-info {
width: calc(90% - 50px);
width: calc(90% - 100rpx);
flex: 1;
}
.billIcon {
width: 30px;
height: 30px;
margin: 10px;
width: 64rpx;
height: 64rpx;
margin: 20rpx;
}
.bill-title {
font-size: 16px;
font-size: 32rpx;
font-weight: 600;
color: #333;
margin-bottom: 10rpx;
@@ -290,7 +294,7 @@
.bill-desc {
font-size: 14px;
font-size: 28rpx;
font-weight: 600;
color: #999;
white-space: nowrap;
@@ -300,13 +304,13 @@
/* 已欠费标签 */
.bill-status {
padding: 1px 8px;
border-radius: 15px;
font-size: 12px;
padding: 2rpx 16rpx;
border-radius: 30rpx;
font-size: 24rpx;
font-weight: 500;
color: #fff;
background-color: #E34D59;
margin-left: 5px;
margin-left: 10rpx;
}
/* 右侧箭头 */
@@ -321,8 +325,8 @@
/* ===================== 新增缴费区域 ===================== */
.add-section {
background-color: #fff;
padding: 15px;
border-radius: 5px;
padding: 30rpx;
border-radius: 10rpx;
}
.section-header {
@@ -333,13 +337,13 @@
}
.section-title {
font-size: 16px;
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.record-link {
font-size: 14px;
font-size: 28rpx;
color: #1677ff;
}
@@ -348,14 +352,14 @@
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
gap: 13px;
gap: 26rpx;
}
.grid-item {
width: calc(25% - 30px);
width: calc(25% - 60rpx);
background-color: #F6F9FE;
border-radius: 12rpx;
padding: 10px;
padding: 20rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
@@ -364,10 +368,10 @@
/* 图标容器 */
.icon-box {
width: 80rpx;
height: 80rpx;
width: 88rpx;
height: 88rpx;
border-radius: 50%;
background-color: #e6f0ff;
/* background-color: #e6f0ff; */
display: flex;
align-items: center;
justify-content: center;
@@ -381,10 +385,11 @@
}
.item-name {
font-size: 14px;
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.status-bar {
width: 100vw;
height: 46px;

View File

@@ -1,21 +1,34 @@
<template>
<view class="contentStyle" style="">
<view class="status-bar"></view>
<uni-nav-bar title="缴费记录" left-icon="left" @clickLeft="goBack" backgroundColor="transparent"
:border="false">
<uni-nav-bar title="缴费记录" left-icon="left" @clickLeft="goBack" backgroundColor="transparent" :border="false">
</uni-nav-bar>
<Loading mask="true" click="true" ref="loading"></Loading>
<!-- 表单区域 -->
<scroll-view class="page" scroll-y="true">
<!-- 累计缴费 -->
<view class="total-box">
<view class="total-title">累计缴费</view>
<view class="total-price">¥800.00</view>
<view class="top-box">
<view class="total-title">累计缴费</view>
<view class="total-price">¥800.00</view>
</view>
<!-- 折线图 Canvas -->
<canvas canvas-id="chargeChart" class="chart-canvas"></canvas>
<!-- <canvas canvas-id="chargeChart" class="chart-canvas"></canvas> -->
<view class="chart-box">
<!-- 循环6个月柱状图 -->
<view class="chart-item" v-for="(item,index) in chartData" :key="index">
<!-- 柱子顶部金额文字 -->
<view class="chart-label">{{ item.price }}</view>
<!-- 柱状图柱子 -->
<view class="chart-bar" :style="{ height: barHeight(item.price) }"></view>
<!-- 底部月份文字 -->
<view class="chart-month">{{ item.month }}</view>
</view>
</view>
</view>
<!-- 缴费明细 -->
@@ -29,7 +42,7 @@
<view class="item-list">
<view class="bill-item" v-for="bill in item.list" :key="bill.id">
<view class="bill-icon">
<text class="icon">{{ bill.icon }}</text>
<image class="iconStyle" :src="bill.icon"></image>
</view>
<view class="bill-info">
<view class="name">{{ bill.name }}</view>
@@ -59,7 +72,7 @@
computed: {
// 自动按月份分组
monthGroups() {
let map = {}
@@ -78,7 +91,7 @@
}
},
created() {
},
onShow() {
@@ -96,14 +109,40 @@
return {
/* 设定状态栏默认高度 */
statusBarHeight: 20,
// 折线图数据
// 完全对应你图片的数据
chartData: [{
month: '1月',
price: 250
},
{
month: '2月',
price: 130
},
{
month: '3月',
price: 220
},
{
month: '4月',
price: 250
},
{
month: '5月',
price: 100
},
{
month: '6月',
price: 130
}
],
maxPrice: 250, // 最大值(基准高度)
barMaxHeight: 300, // 柱子最大高度rpx
// canvas折线图数据
chart: {
months: ['1月', '2月', '3月', '4月', '5月', '6月'],
values: [100, 140, 230, 100, 130, 100]
},
// ====================== 核心5月6月放在一个list里 ======================
billList: [
// 5月数据
{
@@ -112,7 +151,7 @@
name: '燃气费',
account: '123123123123',
amount: 25,
icon: ''
icon: "/static/propertyImgs/gas.png",
},
{
id: 2,
@@ -120,7 +159,7 @@
name: '水费',
account: '123123123123',
amount: 25,
icon: ''
icon: "/static/propertyImgs/water.png",
},
// 6月数据
@@ -130,7 +169,7 @@
name: '燃气费',
account: '123123123123',
amount: 30,
icon: ''
icon: "/static/propertyImgs/gas.png",
},
{
id: 4,
@@ -138,7 +177,7 @@
name: '水费',
account: '123123123123',
amount: 10,
icon: ''
icon: "/static/propertyImgs/water.png",
},
{
id: 5,
@@ -146,7 +185,7 @@
name: '电费',
account: '123123123123',
amount: 30,
icon: '⚡'
icon: "/static/propertyImgs/electric.png",
}
]
@@ -156,6 +195,11 @@
methods: {
// 计算每个柱子自适应高度(按金额比例换算)
barHeight(price) {
const height = (price / this.maxPrice) * this.barMaxHeight
return `${height}rpx`
},
drawLineChart() {
const ctx = uni.createCanvasContext('chargeChart', this)
const canvasPage = uni.getSystemInfoSync();
@@ -241,7 +285,7 @@
</script>
<style lang="scss">
page {
background: #f2f1f6;
// background: #f2f1f6;
}
</style>
@@ -251,78 +295,94 @@
flex-direction: column;
height: 100vh;
/* 关键:占满屏幕高度 */
background-color: #f9f9f9;
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
}
.page {
flex: 1;
overflow-y: auto;
padding: 0px 20px;
padding: 0px 40rpx;
box-sizing: border-box;
background-color: #fff;
/* background-color: #fff; */
}
.total-box {
padding: 15px;
/* margin-bottom: 10px; */
margin-bottom: 30rpx;
}
.top-box {
display: flex;
justify-content: space-between;
align-items: center;
}
.total-title {
font-size: 16px;
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.total-price {
font-size: 24px;
font-size: 48rpx;
font-weight: bold;
margin-top: 6px;
margin-bottom: 10px;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
.chart-canvas {
width: calc(100vw - 30px);
width: calc(100vw - 60rpx);
height: 30vh;
}
.list-wrapper {
padding: 0 15px;
padding: 10rpx 0rpx;
}
.month-group {
padding-bottom: 15px;
border-bottom: 1px solid #f2f2f2;
}
.month-group:last-child {
border-bottom: none;
border-bottom: 2rpx solid #f2f2f2;
padding: 30rpx;
background-color: #fff;
margin-bottom: 30rpx;
border-radius: 10rpx;
}
.month-title {
font-size: 16px;
font-size: 32rpx;
font-weight: 600;
margin-bottom: 15px;
margin-bottom: 30rpx;
}
.bill-item {
display: flex;
align-items: center;
margin-bottom: 15px;
margin-bottom: 30rpx;
padding-bottom: 30rpx;
border-bottom: 1px solid #ebebeb;
}
.bill-item:last-child {
border-bottom: none;
margin-bottom: 0rpx;
padding-bottom: 0rpx;
}
.bill-icon {
width: 40px;
height: 40px;
background: #e6efff;
width: 80rpx;
height: 80rpx;
/* background: #e6efff; */
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #4080FF;
margin-right: 12px;
font-size: 18px;
margin-right: 24rpx;
font-size: 36rpx;
}
.iconStyle {
width: 100%;
height: 100%;
}
.bill-info {
@@ -330,22 +390,68 @@
}
.name {
font-size: 14px;
font-size: 28rpx;
color: #333;
font-weight: 600;
}
.account {
font-size: 12px;
font-size: 24rpx;
color: #999;
margin-top: 4px;
margin-top: 8rpx;
}
.bill-price {
font-size: 16px;
font-size: 32rpx;
color: #333;
}.status-bar{
}
.status-bar {
width: 100vw;
height: 46px;
}
</style>
<style scoped>
/* 图表外层容器 横向排列 */
.chart-box {
width: 100%;
height: 444rpx;
display: flex;
align-items: flex-end;
justify-content: space-around;
/* padding: 40rpx 20rpx; */
box-sizing: border-box;
}
/* 单个柱子单元:垂直排列 文字+柱子+月份 */
.chart-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
width: 120rpx;
font-size: 24rpx;
}
/* 顶部金额标签 */
.chart-label {
font-size: 32rpx;
color: #333;
margin-bottom: 20rpx;
}
/* 蓝色圆角柱子 完全还原原图顶部圆角 */
.chart-bar {
width: 40rpx;
background: #3388ff;
border-radius: 40rpx 40rpx 0 0;
/* 只有顶部圆角!和原图一模一样 */
}
/* 底部月份文字 */
.chart-month {
font-size: 32rpx;
color: #666;
margin-top: 24rpx;
}
</style>

View File

@@ -3,7 +3,7 @@
<view class="status-bar"></view>
<uni-nav-bar title="选择缴费单位" left-icon="left" @clickLeft="goBack" backgroundColor="transparent" :border="false">
</uni-nav-bar>
<Loading mask="true" click="true" ref="loading"></Loading>
<!-- 表单区域 -->
<scroll-view class="page" scroll-y="true">
@@ -293,7 +293,7 @@
</script>
<style lang="scss">
page {
background: #f2f1f6;
background: #f9f9f9;
}
</style>
@@ -309,14 +309,14 @@
.page {
flex: 1;
overflow-y: auto;
padding: 0px 20px;
box-sizing: border-box;
background-color: #fff;
}
.search-section {
background-color: #fff;
padding: 10px;
padding:20rpx;
display: flex;
}
@@ -330,10 +330,10 @@
.city-select {
display: flex;
align-items: center;
padding: 4px 0;
padding:8rpx 0;
cursor: pointer;
width: 80px;
height: 35px;
height: 70rpx;
}
.ellipsis {
@@ -343,7 +343,7 @@
}
.city-text {
font-size: 14px;
font-size:28rpx;
/* 匹配截图字体大小 */
font-weight: 600;
color: #000000;
@@ -354,11 +354,11 @@
.arrow-icon {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 8px solid #333333;
border-left:10rpx solid transparent;
border-right:10rpx solid transparent;
border-top:16rpx solid #333333;
/* 纯黑实心三角,和截图一致 */
margin-top: 2px;
margin-top: 4rpx;
}
@@ -368,10 +368,10 @@
width: 100%;
align-items: center;
background-color: #f3f4f6;
border-radius: 50rpx;
border-radius:20rpx;
/* margin: 0rpx 30rpx 20rpx 30rpx; */
padding: 0 15px;
margin: 0px 0px 0px 5px;
padding: 0 30rpx;
margin:10rpx 0px 0px10rpx;
height: 70rpx;
}
@@ -395,20 +395,20 @@
/* 列表 */
.list-scroll {
height: calc(100vh - 44px - 70px);
}
.group-title {
padding: 10px 15px;
font-size: 14px;
padding:20rpx 40rpx;
font-size:28rpx;
color: #666;
background-color: #f3f3f3;
}
.item {
background: #fff;
padding: 10px 15px;
font-size: 14px;
border-bottom: 1px solid #f2f2f2;
padding:20rpx 40rpx;
font-size:28rpx;
border-bottom: 2rpx solid #f2f2f2;
}
.item:active {
@@ -416,8 +416,8 @@
}
::v-deep .selected-item {
margin-left: 5px !important;
margin-right: 5px !important;
margin-left:10rpx !important;
margin-right:10rpx !important;
}
.status-bar {