From dc0fc88c4eb6fff9229f85c6d4af45ca7b6939f6 Mon Sep 17 00:00:00 2001 From: liaoxinyu Date: Tue, 2 Jun 2026 11:40:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E7=BA=A7=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E6=97=A5=E6=9C=9F=E4=B8=BA=E8=BE=93=E5=85=A5=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/en.json | 3 ++- src/i18n/tw.json | 3 ++- src/views/profile/certification.vue | 29 +++++++++++++++++++++++++++-- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/i18n/en.json b/src/i18n/en.json index 6232546..ba7ea36 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -845,7 +845,8 @@ "clickToVerify1": "Completed", "tips1": "Primary Certification: To withdraw cash,you need to complete advanced certification.", "tips2": "Advanced Certification: Up to 500k USDT 24-hour withdrawal limit. For more withdrawal amount,please contact customer service", - "tips3": "Congratulations, you have passed the advanced certification!" + "tips3": "Congratulations, you have passed the advanced certification!", + "date1": "Please enter the date." }, "setting": { "smsVer": "SMS Verification", diff --git a/src/i18n/tw.json b/src/i18n/tw.json index 948f216..de90e83 100644 --- a/src/i18n/tw.json +++ b/src/i18n/tw.json @@ -787,7 +787,8 @@ "clickToVerify1": "已完成", "tips1": "初級認證:要選取現金,您需要完成高級認證。", "tips2": "高級認證:最高5000USDT 24小時提款限額。 如需更多取款金額,請聯系客服", - "tips3": "恭喜您,高級認證已通過!" + "tips3": "恭喜您,高級認證已通過!", + "date1": "請輸入日期" }, "setting": { "smsVer": "簡訊驗證", diff --git a/src/views/profile/certification.vue b/src/views/profile/certification.vue index 091b5a6..685fb05 100644 --- a/src/views/profile/certification.vue +++ b/src/views/profile/certification.vue @@ -32,13 +32,21 @@
- + > --> +
@@ -330,6 +338,23 @@ export default { } }, methods: { + formatDateInput(e) { + let value = e.target.value; + // 1. 移除非数字和横线 + value = value.replace(/[^\d-]/g, ''); + // 2. 自动添加横线(4位年份后加横线,7位后加横线) + if (/^\d{4}$/.test(value)) { + value = value + '-'; + } else if (/^\d{4}-\d{2}$/.test(value)) { + value = value + '-'; + } + // 3. 限制长度不超过10 + if (value.length > 10) value = value.slice(0, 10); + // 4. 更新模型(避免光标跳动问题,可使用 nextTick) + this.$nextTick(() => { + this.form.birthday = value; + }); + }, // 获取实名信息 getAuthInfo() { Profile.getAuthInfo()