| | |
| | | </div> |
| | | <div class="bank_name"> |
| | | <div class="lefts"> |
| | | <span>{{ $t("有效號碼") + ":" }}</span> |
| | | <span>{{ $t("电话号码") + ":" }}</span> |
| | | </div> |
| | | <div class="rights"> |
| | | <input |
| | | v-if="showBtn" |
| | | type="text" |
| | | placeholder="Please enter your Valid number" |
| | | placeholder="Please enter your telephone number" |
| | | v-model="form.vaildNumber" |
| | | /> |
| | | <input |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | checkImageFormat(url) { |
| | | const img = new Image(); |
| | | img.onload = function() { |
| | | console.log('图片加载成功,格式正确'); |
| | | }; |
| | | img.onerror = function() { |
| | | console.log('图片加载失败,格式不支持'); |
| | | }; |
| | | img.src = url; |
| | | }, |
| | | handleAvatarSuccess(res, file) { |
| | | this.imgStatus = false; |
| | | this.form.img1key = res.data.url; |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; |
| | | if (!isJpgOrPng) { |
| | | this.$message.error('只能上传 JPG 或 PNG 格式的图片!'); |
| | | } |
| | | return isJpgOrPng; |
| | | this.imgStatus = true; |
| | | }, |
| | | handleError() { |
| | |
| | | this.form.img2key = res.data.url; // URL.createObjectURL(file.raw); |
| | | }, |
| | | beforeAvatarUpload2(file) { |
| | | const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; |
| | | if (!isJpgOrPng) { |
| | | this.$message.error('Only images in JPG or PNG format can be uploaded!'); |
| | | } |
| | | return isJpgOrPng; |
| | | this.imgStatus2 = true; |
| | | const isLt10M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt10M) { |
| | |
| | | // 实名认证弹框 |
| | | if (isNull(this.form.name)) { |
| | | Toast(this.$t("hj207")); |
| | | } else if (isNull(this.form.idCard) || this.form.idCard.length != 12) { |
| | | Toast(this.$t("限制长度为12位数")); |
| | | } else if (isNull(this.form.vaildNumber) || this.form.vaildNumber.length != 10) { |
| | | Toast(this.$t("限制长度为10位数")); |
| | | } else if (!this.form.img1key) { |
| | | } else if (isNull(this.form.idCard)) { |
| | | Toast(this.$t("hj208")); |
| | | } else if (!this.form.img1key) { |
| | | Toast(this.$t("hj209")); |
| | | } else if (!this.form.img2key) { |
| | | Toast(this.$t("hj209")); |