From 2311bb8df8ea79872de6ac550772d8d75f00f61f Mon Sep 17 00:00:00 2001 From: daimenglei <2585309659@qq.com> Date: Wed, 28 May 2025 15:38:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=95=86=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=EF=BC=8C=E8=BA=AB=E4=BB=BD=E8=AF=81=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/agentVerification/index.vue | 83 +++++++++++++++++++ .../business/merchantVerification/index.vue | 8 +- src/views/business/userVerification/index.vue | 8 +- 3 files changed, 94 insertions(+), 5 deletions(-) diff --git a/src/views/business/agentVerification/index.vue b/src/views/business/agentVerification/index.vue index 20fde45..6f8811a 100644 --- a/src/views/business/agentVerification/index.vue +++ b/src/views/business/agentVerification/index.vue @@ -110,6 +110,45 @@ + + + 点击上传 +
只能上传JPG/PNG文件,且不超过5M
+
+
+ + + 点击上传 +
只能上传JPG/PNG文件,且不超过5M
+
+
+ + + 点击上传 +
只能上传JPG/PNG文件,且不超过5M
+
+
@@ -141,6 +180,15 @@ {{auditForm.legalPersonIdCardShow}} + + {{auditForm.idCardFrontImagePath}} + + + {{auditForm.idCardBackImagePath}} + + + {{auditForm.userWithIdCardImagePath}} + {{auditForm.businessLicenseNumber}} @@ -248,6 +296,8 @@ export default { form: {}, //审核参数 auditForm: {}, + // 上传文件列表 + fileList: [], // 表单校验 rules: { agentName: [ @@ -256,6 +306,15 @@ export default { legalPersonName: [ { required: true, message: this.$t('business.agent.agentVerification.legalPersonNameRequired'), trigger: "blur" } ], + idCardFrontImagePath: [ + { required: true, message: this.$t('business.userManager.userVerification.idCardFrontRequired'), trigger: "blur" } + ], + idCardBackImagePath: [ + { required: true, message: this.$t('business.userManager.userVerification.idCardBackRequired'), trigger: "blur" } + ], + userWithIdCardImagePath: [ + { required: true, message: this.$t('business.userManager.userVerification.idCardHoldingRequired'), trigger: "blur" } + ], electronicContract: [ { required: true, message: this.$t('business.agent.agentVerification.electronicContractRequired'), trigger: "blur" } ], @@ -274,6 +333,12 @@ export default { created() { this.getList(); }, + computed: { + // 计算属性:动态生成上传URL + uploadUrl() { + return `${process.env.VUE_APP_BASE_API}/file/upload`; + } + }, methods: { /** 查询商户认证信息列表 */ getList() { @@ -452,6 +517,24 @@ export default { this.buttonLoading = false; }); }) + }, + //身份证正面上传成功 + handleSuccess_idCardFrontImagePath(response) { + if (response.code === 200) { + this.form.idCardFrontImagePath = response.data; // 保存 URL 到表单 + } + }, + //身份证反面上传成功 + handleSuccess_idCardBackImagePath(response) { + if (response.code === 200) { + this.form.idCardBackImagePath = response.data; // 保存 URL 到表单 + } + }, + //身份证手持上传成功 + handleSuccess_userWithIdCardImagePath(response) { + if (response.code === 200) { + this.form.userWithIdCardImagePath = response.data; // 保存 URL 到表单 + } } } }; diff --git a/src/views/business/merchantVerification/index.vue b/src/views/business/merchantVerification/index.vue index 10309c9..5c4f5db 100644 --- a/src/views/business/merchantVerification/index.vue +++ b/src/views/business/merchantVerification/index.vue @@ -284,6 +284,7 @@ export default { form: {}, //审核参数 auditForm: {}, + // 上传文件列表 fileList: [], // 表单校验 rules: { @@ -349,7 +350,9 @@ export default { contactPersonPhone: undefined, contactPersonEmail: undefined, businessLicenseImage: undefined, - legalPersonIdCardImage: undefined, + idCardFrontImagePath: undefined, + idCardBackImagePath: undefined, + userWithIdCardImagePath: undefined, bankAccountNumber: undefined, bankName: undefined, status: undefined, @@ -499,16 +502,19 @@ export default { }); }) }, + //身份证正面上传成功 handleSuccess_idCardFrontImagePath(response) { if (response.code === 200) { this.form.idCardFrontImagePath = response.data; // 保存 URL 到表单 } }, + //身份证反面上传成功 handleSuccess_idCardBackImagePath(response) { if (response.code === 200) { this.form.idCardBackImagePath = response.data; // 保存 URL 到表单 } }, + //身份证手持上传成功 handleSuccess_userWithIdCardImagePath(response) { if (response.code === 200) { this.form.userWithIdCardImagePath = response.data; // 保存 URL 到表单 diff --git a/src/views/business/userVerification/index.vue b/src/views/business/userVerification/index.vue index cabb7ef..0d8dfc5 100644 --- a/src/views/business/userVerification/index.vue +++ b/src/views/business/userVerification/index.vue @@ -124,8 +124,6 @@