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 @@