Browse Source

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

master
liaoxinyu 2 weeks ago
parent
commit
dc0fc88c4e
  1. 3
      src/i18n/en.json
  2. 3
      src/i18n/tw.json
  3. 29
      src/views/profile/certification.vue

3
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",

3
src/i18n/tw.json

@ -787,7 +787,8 @@
"clickToVerify1": "已完成",
"tips1": "初級認證:要選取現金,您需要完成高級認證。",
"tips2": "高級認證:最高5000USDT 24小時提款限額。 如需更多取款金額,請聯系客服",
"tips3": "恭喜您,高級認證已通過!"
"tips3": "恭喜您,高級認證已通過!",
"date1": "請輸入日期"
},
"setting": {
"smsVer": "簡訊驗證",

29
src/views/profile/certification.vue

@ -32,13 +32,21 @@
</div>
<div class="form-group col-md-6">
<label>{{$t('profile.dateOfBirth')}}YYYY-MM-DD*</label>
<el-date-picker
<!-- <el-date-picker
required
v-model="form.birthday"
type="date"
:placeholder="$t('profile.selectDate')"
:picker-options="pickerOptions"
></el-date-picker>
></el-date-picker> -->
<input
type="text"
required
v-model="form.birthday"
@input="formatDateInput"
class="form-control"
:placeholder="$t('profile.date1')"
/>
</div>
</div>
<div class="form-row">
@ -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()

Loading…
Cancel
Save