From 95216e2464f3cd8006c29e20f29511b408581ddf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E6=9E=97?= <2720981056@qq.com>
Date: Mon, 11 Aug 2025 17:39:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81+=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E5=AF=86=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages.json | 13 +-
src/pages/more/addbankCard.vue | 40 +--
src/pages/more/bank.vue | 146 ++++++++-
src/pages/more/bankCardDetail.vue | 292 -----------------
src/pages/more/changepwd.vue | 379 ++++++++++++++++++++++
src/pages/more/index.vue | 6 +-
src/pages/more/realauth.vue | 502 ++++++++++++++++++++++++++++++
src/pages/register/register.vue | 4 +-
src/static/lang/zh_CN.json | 90 +++++-
9 files changed, 1140 insertions(+), 332 deletions(-)
delete mode 100644 src/pages/more/bankCardDetail.vue
create mode 100644 src/pages/more/changepwd.vue
create mode 100644 src/pages/more/realauth.vue
diff --git a/src/pages.json b/src/pages.json
index f6c8169..363fb74 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -2,7 +2,11 @@
"easycom": {
- "^qiun-(.*)": "@qiun/ucharts/components/$1/$1.vue"
+ "^qiun-(.*)": "@qiun/ucharts/components/$1/$1.vue",
+ "autoscan": true,
+ "custom": {
+ "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
+ }
},
"pages": [
{
@@ -39,7 +43,12 @@
"navigationBarTitleText": ""
}
},{
- "path": "pages/more/bankCardDetail",
+ "path": "pages/more/changepwd",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },{
+ "path": "pages/more/realauth",
"style": {
"navigationBarTitleText": ""
}
diff --git a/src/pages/more/addbankCard.vue b/src/pages/more/addbankCard.vue
index d7112d4..b7c5e62 100644
--- a/src/pages/more/addbankCard.vue
+++ b/src/pages/more/addbankCard.vue
@@ -18,7 +18,7 @@
- {{ bankList[bankIndex]?.name || '请选择银行' }}
+ {{ bankList[bankIndex]?.name || $t('bank.selectBankcardname') }}
@@ -54,7 +54,7 @@
@@ -62,11 +62,11 @@
- {{$t(bank.idCard)}}
+ {{$t('bank.idCard')}}
@@ -78,7 +78,7 @@
@@ -91,7 +91,7 @@
@@ -163,7 +163,7 @@ export default {
},
computed: {
smsBtnText() {
- return this.isCounting ? `${this.countdown}s后重新获取` : '获取验证码'
+ return this.isCounting ? `${this.countdown}s` : this.$t('bank.getverifycode')
},
canSendSms() {
return /^1[3-9]\d{9}$/.test(this.formData.phone)
@@ -240,19 +240,19 @@ export default {
handleSendSms() {
if (!this.canSendSms) {
uni.showToast({
- title: '请输入正确的手机号',
+ title: "$t('bank.inputcorrectphone')",
icon: 'none'
})
return
}
- uni.showLoading({ title: '发送中...' })
+ uni.showLoading({ title: "$t('bank.sendingcode')" })
// 模拟发送验证码
setTimeout(() => {
uni.hideLoading()
uni.showToast({
- title: '验证码已发送',
+ title: "$t('bank.codesent')",
icon: 'success'
})
this.startCountdown()
@@ -284,13 +284,13 @@ export default {
handleSubmit() {
if (!this.validateForm()) return
- uni.showLoading({ title: '绑定中...' })
+ uni.showLoading({ title: "$t(bank.binding)" })
// 模拟API请求
setTimeout(() => {
uni.hideLoading()
uni.showToast({
- title: '绑定成功',
+ title: "$t('bank.bindSuccess')",
icon: 'success'
})
@@ -303,37 +303,37 @@ export default {
// 表单验证
validateForm() {
if (!this.formData.cardNumber || this.formData.cardNumber.replace(/\s/g, '').length < 16) {
- uni.showToast({ title: '请输入正确的银行卡号', icon: 'none' })
+ uni.showToast({ title: "$t('bank.inputcorrectcardnum')", icon: 'none' })
return false
}
if (!this.formData.bankCode) {
- uni.showToast({ title: '请选择银行', icon: 'none' })
+ uni.showToast({ title: "$t('bank.selectbank')", icon: 'none' })
return false
}
if (!this.formData.cardHolder) {
- uni.showToast({ title: '请输入持卡人姓名', icon: 'none' })
+ uni.showToast({ title: "$t('bank.inputcorrectcardpersonname')", icon: 'none' })
return false
}
if (!/^\d{17}[\dXx]$/.test(this.formData.idCard)) {
- uni.showToast({ title: '请输入正确的身份证号', icon: 'none' })
+ uni.showToast({ title: "$t('bank.inputcorrectidcardnum')", icon: 'none' })
return false
}
if (!/^1[3-9]\d{9}$/.test(this.formData.phone)) {
- uni.showToast({ title: '请输入正确的手机号', icon: 'none' })
+ uni.showToast({ title: "$t('bank.inputcorrectphone')", icon: 'none' })
return false
}
if (!/^\d{6}$/.test(this.formData.smsCode)) {
- uni.showToast({ title: '请输入正确的验证码', icon: 'none' })
+ uni.showToast({ title: "$t('bank.inputcorrectcode')", icon: 'none' })
return false
}
if (!this.formData.agreed) {
- uni.showToast({ title: '请先阅读并同意协议', icon: 'none' })
+ uni.showToast({ title: "$t('bank.inputcorrectcode')", icon: 'none' })
return false
}
diff --git a/src/pages/more/bank.vue b/src/pages/more/bank.vue
index 39b030f..b2ff112 100644
--- a/src/pages/more/bank.vue
+++ b/src/pages/more/bank.vue
@@ -3,7 +3,7 @@
-
+
{{ $t('bank.myBank') }}
@@ -46,6 +46,52 @@
{{$t('bank.longpressTip')}}
+
+
+
+
+
@@ -61,7 +107,7 @@ export default {
cardNumber: '6222021234567890123',
cardType: '储蓄卡',
cardHolder: '张三',
- phone: '138****1234',
+ phone: '13812341234',
bindTime: '2023-01-01'
},
{
@@ -74,7 +120,8 @@ export default {
phone: '138****1234',
bindTime: '2023-02-15'
}
- ]
+ ],
+ currentCard: null
}
},
methods: {
@@ -107,17 +154,28 @@ export default {
},
// 查看银行卡详情
- viewCardDetail(card) {
- uni.navigateTo({
- url: `/pages/more/detail?id=${card.id}`
- })
+ viewCardDetail(cards) {
+ this.currentCard = cards
+ this.$refs.cardPopup.open()
+ },
+
+ // 关闭弹窗
+ closePopup() {
+ this.$refs.cardPopup.close()
+ },
+
+ // 格式化卡号显示
+ formatCardNumber(number) {
+ if (!number) return ''
+ // 每4位加一个空格
+ return number.replace(/(\d{4})(?=\d)/g, '$1 ')
},
// 长按解绑
onLongPress(card) {
uni.showModal({
- title: '解绑银行卡',
- content: `确定要解绑${card.bankName}尾号${card.cardNumber.slice(-4)}的银行卡吗?`,
+ title: this.$t('bank.unbindtips'),
+ content: this.$t('bank.certainunbind')+`${card.bankName}`+this.$t('bank.endfour')+`${card.cardNumber.slice(-4)}`+this.$t('bank.card'),
success: (res) => {
if (res.confirm) {
this.unbindCard(card.id)
@@ -128,14 +186,14 @@ export default {
// 解绑银行卡
unbindCard(cardId) {
- uni.showLoading({ title: '处理中...' })
+ uni.showLoading({ title: this.$t('bank.unbinding') })
// 模拟API请求
setTimeout(() => {
this.cards = this.cards.filter(card => card.id !== cardId)
uni.hideLoading()
uni.showToast({
- title: '解绑成功',
+ title: this.$t('bank.unbindSuccess'),
icon: 'success'
})
}, 1000)
@@ -169,6 +227,7 @@ export default {
width: 40rpx;
height: 40rpx;
filter: invert(1);
+ margin-right: 40rpx;
}
}
@@ -178,6 +237,7 @@ export default {
color: #333;
flex: 1;
text-align: center;
+ margin-right: 20rpx;
}
.right-placeholder {
@@ -281,4 +341,68 @@ export default {
color: #999;
margin-top: 30rpx;
}
+
+/* 弹窗样式 */
+.popup-content {
+ width: 600rpx;
+ background-color: #fff;
+ border-radius: 20rpx;
+ padding: 40rpx;
+ box-sizing: border-box;
+
+ .popup-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 40rpx;
+
+ .popup-title {
+ font-size: 36rpx;
+ font-weight: bold;
+ color: #333;
+ }
+
+ .close-btn {
+ width: 50rpx;
+ height: 50rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ image {
+ width: 30rpx;
+ height: 30rpx;
+ }
+ }
+ }
+
+ .card-info {
+ .info-item {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 30rpx;
+
+ .info-label {
+ font-size: 28rpx;
+ color: #999;
+ }
+
+ .info-value {
+ font-size: 28rpx;
+ color: #333;
+ font-weight: 500;
+ }
+ }
+ }
+
+ .confirm-btn {
+ margin-top: 50rpx;
+ background-color: #2979FF;
+ color: #fff;
+ border-radius: 50rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 32rpx;
+ }
+}
\ No newline at end of file
diff --git a/src/pages/more/bankCardDetail.vue b/src/pages/more/bankCardDetail.vue
deleted file mode 100644
index fd557d8..0000000
--- a/src/pages/more/bankCardDetail.vue
+++ /dev/null
@@ -1,292 +0,0 @@
-
-
-
-
-
-
-
- {{$t('bank.cardDetail')}}
-
-
-
-
-
-
-
- {{card.bankName}}
-
-
- {{card.cardType}}
-
-
- {{formatCardNumber(card.cardNumber)}}
-
-
-
-
-
-
- {{$t('bank.cardperson')}}
- {{card.cardHolder}}
-
-
- {{$t('bank.cardphone')}}
- {{card.phone}}
-
-
- {{ $t('bank.bindtime') }}
- {{card.bindTime}}
-
-
-
-
-
- {{$t(bank.unbindcard)}}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/pages/more/changepwd.vue b/src/pages/more/changepwd.vue
new file mode 100644
index 0000000..e523f31
--- /dev/null
+++ b/src/pages/more/changepwd.vue
@@ -0,0 +1,379 @@
+
+
+
+
+
+
+ {{ $t('changepwd.changepwdtitle') }}
+
+
+
+
+
+
+ {{ $t('changepwd.changeloginPassword') }}
+
+
+ {{ $t('changepwd.changetransactionPassword') }}
+
+
+
+
+
+
+ {{$t('changepwd.oldLoginPwd')}}
+
+
+
+
+ {{$t('changepwd.newLoginPwd')}}
+
+
+
+
+ {{$t('changepwd.confirmLoginPwd')}}
+
+
+
+
+
+
+
+
+
+ {{$t('changepwd.oldTransactionPwd')}}
+
+
+
+
+ {{$t('changepwd.newTransactionPwd')}}
+
+
+
+
+ {{$t('changepwd.confirmTransactionPwd')}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/more/index.vue b/src/pages/more/index.vue
index 19203e7..cbbdd19 100644
--- a/src/pages/more/index.vue
+++ b/src/pages/more/index.vue
@@ -34,7 +34,7 @@
-