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')}} + + + + + + {{ $t('bank.bankdetail') }} + + + + + + + + {{$t('bank.bankname')}} + {{currentCard.bankName}} + + + + {{$t('bank.banknum')}} + {{formatCardNumber(currentCard.cardNumber)}} + + + + {{$t('bank.cardtype')}} + {{currentCard.cardType}} + + + + {{$t('bank.cardholder')}} + {{currentCard.cardHolder}} + + + + {{$t('bank.bindphone')}} + {{currentCard.phone}} + + + + {{ $t('bank.bindtime') }} + {{currentCard.bindTime}} + + + + + + @@ -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 @@ - - - - - \ 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 @@ + + + + + \ 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 @@ - + {{ $t('more.authentication') }} @@ -48,7 +48,7 @@ - + {{ $t('more.changePassword') }} @@ -200,6 +200,8 @@ export default { uni.showModal({ title: this.$t('common.tip'), content: this.$t('more.confirmLogout'), + cancelText: this.$t('more.cancelLogout'), // 取消按钮的文字 + confirmText: this.$t('more.certainLogout'), // 确认按钮的文字 success: (res) => { if (res.confirm) { uni.showLoading({ diff --git a/src/pages/more/realauth.vue b/src/pages/more/realauth.vue new file mode 100644 index 0000000..9cb1f1f --- /dev/null +++ b/src/pages/more/realauth.vue @@ -0,0 +1,502 @@ + + + + + \ No newline at end of file diff --git a/src/pages/register/register.vue b/src/pages/register/register.vue index 86544a3..1b28b12 100644 --- a/src/pages/register/register.vue +++ b/src/pages/register/register.vue @@ -270,7 +270,7 @@ export default { }, validatePassword() { - const pwdReg = /^(?=.*[A-Za-z])(?=.*\d).{8,}$/ + const pwdReg = /^(?=.*[A-Za-z])(?=.*\d).{6,}$/ if (this.password && !pwdReg.test(this.password)) { this.setError(this.$t('register.errors.invalidPassword')) return false @@ -301,7 +301,7 @@ export default { checkFormValidity() { const idReg = /^\d{5}[0-9X]$/ - const pwdReg = /^(?=.*[A-Za-z])(?=.*\d).{8,}$/ + const pwdReg = /^(?=.*[A-Za-z])(?=.*\d).{6,}$/ const emailReg = /^[^\s@]+@[^\s@]+\.[^\s@]+$/ const isIdValid = this.idCardLast6 && idReg.test(this.idCardLast6) diff --git a/src/static/lang/zh_CN.json b/src/static/lang/zh_CN.json index 39f9c9e..3a413f4 100644 --- a/src/static/lang/zh_CN.json +++ b/src/static/lang/zh_CN.json @@ -48,7 +48,7 @@ "register.emailPlaceholder": "请输入邮箱", "register.errors.emailRequired": "邮箱不能为空", "register.idCardLast6Error": "请输入正确的身份证号码", - "register.errors.invalidPassword": "密码至少8位,必须包含数字和字母", + "register.errors.invalidPassword": "密码至少6位,必须包含数字和字母", "register.errors.emptyPassword": "密码不能为空", "register.errors.confirmPasswordRequired": "请再次输入密码", "register.errors.invalidEmail": "请输入正确的邮箱", @@ -90,6 +90,8 @@ "more.languageChanged":"语言已切换成", "more.close":"关闭", "more.confirmLogout":"确定要退出登录吗?", + "more.cancelLogout":"取消", + "more.certainLogout":"确定", "common.tip":"提示", "common.loggingOut":"正在退出登录...", @@ -124,9 +126,91 @@ "bank.and":"和", "bank.bindcardagreement":"《银行卡绑定协议》", "bank.submit":"提交", + "bank.inputBankcardnum":"请输入银行卡号", + "bank.selectBankcardname":"请选择银行", + "bank.cardpersonnamePlaceholder":"请输入持卡人姓名", + "bank.idCardPlaceholder":"请输入身份证号", + "bank.phonePlaceholder":"请输入预留手机号", + "bank.vericodePlaceholder":"请输入验证码", + "bank.unbindSuccess":"解绑成功", + "bank.getverifycode":"获取验证码", + "bank.inputcorrectphone":"请输入正确的手机号", + "bank.sendingcode":"正在发送...", + "bank.codesent":"验证码已发送", + "bank.inputcorrectcardnum":"请输入正确的银行卡号", + "bank.selectbank":"请选择银行", + "bank.inputcorrectcardpersonname":"请输入正确的持卡人姓名", + "bank.inputcorrectidcardnum":"请输入正确的身份证号", + "bank.inputcorrectcode":"请输入正确的验证码", + "bank.bankdetail":"银行卡详情", + "bank.banknum":"银行卡号", + "bank.cardtype":"银行卡类型", + "bank.cardholder":"持卡人", + "bank.bindphone":"绑定手机号", + "bank.certain":"确定", + "bank.binding":"正在绑定...", + "bank.unbindtips":"确定要解绑吗?", + "bank.unbinding":"正在解绑...", + "bank.certainunbind":"确定要解绑", + "bank.endfour":"后四位为", + "bank.card":"的银行卡吗", "bank.ICBC":"中国工商银行", - "bank.CMB":"招商银行" + "bank.CMB":"招商银行", + "changepwd.changepwdtitle":"修改密码", + "changepwd.changeloginPassword":"修改登录密码", + "changepwd.changetransactionPassword":"修改交易密码", + "changepwd.oldLoginPwd":"原登录密码", + "changepwd.oldLoginPwdPlaceholder":"请输入原登录密码", + "changepwd.newLoginPwd":"新登录密码", + "changepwd.newLoginPwdPlaceholder":"请输入新登录密码", + "changepwd.confirmLoginPwd":"确认登录密码", + "changepwd.confirmLoginPwdPlaceholder":"请再次输入登录密码", + "changepwd.confirmupdate":"确认修改", + + "changepwd.oldTransactionPwd":"原交易密码", + "changepwd.oldTransactionPwdPlaceholder":"请输入原交易密码", + "changepwd.newTransactionPwd":"新交易密码", + "changepwd.newTransactionPwdPlaceholder":"请输入新交易密码", + "changepwd.confirmTransactionPwd":"确认交易密码", + "changepwd.confirmTransactionPwdPlaceholder":"请再次输入新交易密码", + "changepwd.inputtransactionpwd":"请输入交易密码", + "changepwd.pwdlength":"密码长度不能小于6位", + "changepwd.loginpasswordNotMatch":"两次输入的登录密码不一致", + "changepwd.transactionpwdNotMatch":"两次输入的交易密码不一致", + "changepwd.changingPassword":"正在修改密码...", + "changepwd.changeloginpwdSuccess":"修改登录密码成功", + "changepwd.changetransactionpwdSuccess":"修改交易密码成功", + "changepwd.changeFail":"密码修改失败", + "changepwd.requestError":"请求错误", - + //实名认证 + "realauth.realauthtitle":"实名认证", + "realauth.realname":"真实姓名", + "realauth.realnameplaceholder":"请输入真实姓名", + "realauth.IDcardnum":"身份证号码", + "realauth.IDcardnumplaceholder":"请输入身份证号码", + "realauth.IDcardfront":"身份证正面", + "realauth.uploadIDcardfront":"点击上传身份证正面", + "realauth.uploadIDcardfronttips":"需包含国徽面", + "realauth.IDcardback":"身份证反面", + "realauth.uploadIDcardback":"点击上传身份证反面", + "realauth.uploadIDcardbacktips":"需包含个人信息面", + "realauth.handleIDcardphoto":"手持身份证照片", + "realauth.uploadIDcardhandle":"点击上传手持身份证照片", + "realauth.uploadIDcardhandletips":"需清晰可见身份证信息", + "realauth.submitrealauth":"提交认证", + "realauth.submitting":"提交中...", + "realauth.realauthtips":"认证须知:", + "realauth.firsttips":"1. 请确保上传的身份证信息清晰可见", + "realauth.secondtips":"2. 身份证需在有效期内", + "realauth.thirdtips":"3. 信息仅用于实名认证,我们将严格保密", + "realauth.errors.handheldPhoto":"请上传手持身份证照片", + "realauth.errors.idCardBack":"请上传身份证反面", + "realauth.errors.idCardFront":"请上传身份证正面", + "realauth.errors.invalidIdCard":"请输入正确的身份证号码", + "realauth.inputnumber":"请输入身份证号码", + "realauth.inputrealname":"请输入真实姓名", + "realauth.selectpicfailed":"选择图片失败", + "" } \ No newline at end of file