feat(KYC页面): 联系方式限制字数,去除首尾空格

This commit is contained in:
hzj 2026-03-20 18:09:45 +08:00
parent 208368ae28
commit 8c39e58c7c

View File

@ -23,6 +23,8 @@
type="text"
v-model="applyInfo.contactNumber"
:placeholder="t('enter_contact_number')"
maxlength="50"
@blur="handleContactNumberInput"
style="width: 100%; border: none; outline: none"
/>
</div>
@ -269,19 +271,25 @@ const resImgUrls = ref([]) //用于提交申请的图片数组
const updateStatus = ref(false) //
const applyInfo = ref({
id: '', //ID
contactNumber: '', //
category: 'CARD', //
otherDescription: '', //
passportFrontUrl: '', //
id: '', // ID
contactNumber: '', //
category: 'CARD', //
otherDescription: '', //
passportFrontUrl: '', //
passportBackUrl: 'meaningless',
})
//
const checkStatus = computed(() => {
return applyInfo.value.contactNumber != '' && resImgUrls.value.length > 0
const contactNumber = applyInfo.value.contactNumber.trim()
return contactNumber.length <= 50 && contactNumber != '' && resImgUrls.value.length > 0
})
//
const handleContactNumberInput = (event) => {
applyInfo.value.contactNumber = event.target.value.trim()
}
//
const onClickImagePicker = async () => {
try {