Browse Source

修改初级认证日期为输入的

master
liaoxinyu 2 weeks ago
parent
commit
960ff13fa1
  1. 1
      i18n/lang/en.json
  2. 1
      i18n/lang/zh-TW.json
  3. 27
      pages/auth/primary.vue
  4. 3
      pages/reg/index.vue

1
i18n/lang/en.json

@ -82,6 +82,7 @@
"service": "Service", "service": "Service",
"toDwon": "Do you want to go to the download page", "toDwon": "Do you want to go to the download page",
"toDwon1": "Do you want to go to the authentication page", "toDwon1": "Do you want to go to the authentication page",
"date1": "Please enter the date.",
"a0": "Please enter the purchase code", "a0": "Please enter the purchase code",
"a1": "Copy succeeded", "a1": "Copy succeeded",
"a2": "Copy failed", "a2": "Copy failed",

1
i18n/lang/zh-TW.json

@ -82,6 +82,7 @@
"service": "客服", "service": "客服",
"toDwon": "是否前往下載頁", "toDwon": "是否前往下載頁",
"toDwon1": "是否前往認證頁", "toDwon1": "是否前往認證頁",
"date1": "請輸入日期",
"a0": "請輸入申購碼", "a0": "請輸入申購碼",
"a1": "複製成功", "a1": "複製成功",
"a2": "複製失敗", "a2": "複製失敗",

27
pages/auth/primary.vue

@ -11,10 +11,11 @@
</view> </view>
<!-- 出生日期 --> <!-- 出生日期 -->
<view class="form-item border-b p-md m-b-md"> <view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.c5')}}</view> <view class="label m-b-xs">{{$t('auth.c5')}}YYYY-MM-DD</view>
<view class="input color-light"> <view class="input color-light">
<uni-datetime-picker type="date" :placeholder="$t('auth.d4')" start="1873-1-01" :end="new Date().toLocaleDateString()" <!-- <uni-datetime-picker type="date" :placeholder="$t('auth.d4')" start="1873-1-01" :end="new Date().toLocaleDateString()"
:clear-icon="false" v-model="form.birthday" @maskClick="maskClick" /> :clear-icon="false" v-model="form.birthday" @maskClick="maskClick" /> -->
<input style="padding: 8px 8px;border-radius: 5px;font-size: 14px;" v-model="form.birthday" @input="formatDateInput" :placeholder="$t('common.date1')"></input>
</view> </view>
</view> </view>
<!-- 证件号类型 --> <!-- 证件号类型 -->
@ -122,6 +123,23 @@ export default {
this.detail = res.data; 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() { getCountryCode() {
Member.getCountryCode() Member.getCountryCode()
@ -276,4 +294,7 @@ export default {
::v-deep uni-input{ ::v-deep uni-input{
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
} }
::v-deep .uni-select__input-placeholder{
font-size: 14px !important;
}
</style> </style>

3
pages/reg/index.vue

@ -125,7 +125,8 @@
<view class="label m-b-xs">{{$t('reg.c6')}}</view> <view class="label m-b-xs">{{$t('reg.c6')}}</view>
<v-input class="color-light" v-model="form.invitationCode" type="password" :placeholder="$t('reg.c7')"></v-input> <v-input class="color-light" v-model="form.invitationCode" type="password" :placeholder="$t('reg.c7')"></v-input>
</view> --> </view> -->
<view class="form-item m-b-md p-b-xs" v-if="showInvite_code"> <view class="form-item m-b-md p-b-xs">
<!-- v-if="showInvite_code" -->
<view class="label m-b-xs color-light">{{$t('reg.c6')}}</view> <view class="label m-b-xs color-light">{{$t('reg.c6')}}</view>
<!-- <v-input class="color-light" :disabled="query.invite_code?true:false" v-model="form.invite_code" :placeholder="`${$t('reg.c7')}(${$t('reg.b4')})`"></v-input> --> <!-- <v-input class="color-light" :disabled="query.invite_code?true:false" v-model="form.invite_code" :placeholder="`${$t('reg.c7')}(${$t('reg.b4')})`"></v-input> -->
<v-input class="color-light" :disabled="query.invite_code?true:false" v-model="form.invite_code" :placeholder="`${$t('reg.c7')}`"></v-input> <v-input class="color-light" :disabled="query.invite_code?true:false" v-model="form.invite_code" :placeholder="`${$t('reg.c7')}`"></v-input>

Loading…
Cancel
Save