diff --git a/i18n/lang/en.json b/i18n/lang/en.json
index 07ffd49..5e98e6a 100644
--- a/i18n/lang/en.json
+++ b/i18n/lang/en.json
@@ -82,6 +82,7 @@
"service": "Service",
"toDwon": "Do you want to go to the download page",
"toDwon1": "Do you want to go to the authentication page",
+ "date1": "Please enter the date.",
"a0": "Please enter the purchase code",
"a1": "Copy succeeded",
"a2": "Copy failed",
diff --git a/i18n/lang/zh-TW.json b/i18n/lang/zh-TW.json
index cde85f5..8d3003f 100644
--- a/i18n/lang/zh-TW.json
+++ b/i18n/lang/zh-TW.json
@@ -82,6 +82,7 @@
"service": "客服",
"toDwon": "是否前往下載頁",
"toDwon1": "是否前往認證頁",
+ "date1": "請輸入日期",
"a0": "請輸入申購碼",
"a1": "複製成功",
"a2": "複製失敗",
diff --git a/pages/auth/primary.vue b/pages/auth/primary.vue
index 98f0c7a..75278fe 100644
--- a/pages/auth/primary.vue
+++ b/pages/auth/primary.vue
@@ -11,10 +11,11 @@
- {{$t('auth.c5')}}
+ {{$t('auth.c5')}}(YYYY-MM-DD)
-
+
+
@@ -122,6 +123,23 @@ export default {
this.detail = res.data;
});
},
+ 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;
+ });
+ },
// 获取区号
getCountryCode() {
Member.getCountryCode()
@@ -276,4 +294,7 @@ export default {
::v-deep uni-input{
border: 1px solid #e5e5e5;
}
+::v-deep .uni-select__input-placeholder{
+ font-size: 14px !important;
+}
\ No newline at end of file
diff --git a/pages/reg/index.vue b/pages/reg/index.vue
index 434fdf7..91a310d 100644
--- a/pages/reg/index.vue
+++ b/pages/reg/index.vue
@@ -125,7 +125,8 @@
{{$t('reg.c6')}}
-->
-
+
+
{{$t('reg.c6')}}