From afa75b9cda4ba4c46dd791d0c242a292c91a0a9d Mon Sep 17 00:00:00 2001 From: hz Date: Thu, 27 Nov 2025 10:58:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(saleFlowProImprove):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=8A=95=E4=BF=9D=E4=BA=BA=E4=BF=A1=E6=81=AF=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正了证件正反面图片路径的判断条件 - 增加了开发环境与生产环境的路径适配处理 - 完善了 mediaDTOS 数据的初始化与赋值逻辑 - 移除了无效的调试代码注释 - 优化了图片存在状态的判断方式 --- .../ebiz/saleFlowProImprove/InsuredInfo.vue | 2 +- .../ebiz/saleFlowProImprove/InsuredPerson.vue | 23 +++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/views/ebiz/saleFlowProImprove/InsuredInfo.vue b/src/views/ebiz/saleFlowProImprove/InsuredInfo.vue index d6db506d5..c81de45ca 100644 --- a/src/views/ebiz/saleFlowProImprove/InsuredInfo.vue +++ b/src/views/ebiz/saleFlowProImprove/InsuredInfo.vue @@ -1984,7 +1984,7 @@ export default { const isDev = process.env.NODE_ENV === 'development' - if (!applicantBack || !applicantFront || !applicantBack.rgssUrl || !applicantFront.regssUrl) { + if (!applicantBack || !applicantFront || !applicantBack.rgssUrl || !applicantFront.rgssUrl) { return { frontID: { exist: false }, backID: { exist: false } } } diff --git a/src/views/ebiz/saleFlowProImprove/InsuredPerson.vue b/src/views/ebiz/saleFlowProImprove/InsuredPerson.vue index 35561e63c..8958077ad 100644 --- a/src/views/ebiz/saleFlowProImprove/InsuredPerson.vue +++ b/src/views/ebiz/saleFlowProImprove/InsuredPerson.vue @@ -606,7 +606,8 @@ export default { manageComCode: '', //代理人管理机构 52贵州 45广西 areaValue: '', //代理人管理机构--省级编号 renovate: '', //是否展示风险测评 - branchType: '' + branchType: '', + mediaDTOS: void 0 } }, created() { @@ -756,10 +757,10 @@ export default { this.specilFlag = '1' } // ------------------------专为惠企写死--end---------------// - this.mediaDTOS = res.orderDTO.mediaDTOS } else { return this.$toast(res.resultMessage) } + this.mediaDTOS = res.orderDTO.mediaDTOS }) } else { localStorage.setItem('salePageFlag', this.salePageFlag) @@ -2005,7 +2006,6 @@ export default { } }, getRelatedData(val, from) { - // debugger if (this.userInfo.idType != '1' && this.userInfo.idType != '2') { return } @@ -2151,17 +2151,26 @@ export default { if (!Array.isArray(this.mediaDTOS) || !this.mediaDTOS.length) return const applicantImage = this.mediaDTOS.filter(dto => dto.subBusinessType === subBusinessType.insured) const [applicantFront, applicantBack] = applicantImage.toSorted((dto1, dto2) => dto1.imageInfoType.localeCompare(dto2.imageInfoType)) + const isDev = process.env.NODE_ENV === 'development' + + if (!applicantBack || !applicantFront || !applicantBack.rgssUrl || !applicantFront.rgssUrl) { + return { frontID: { exist: false }, backID: { exist: false } } + } + + const base = isDev ? 'https://iagentsales-test2.e-guofu.com/' : '' + const frontRgssUrl = isDev ? base + applicantFront.rgssUrl.replace('/opt/ebiz/static', '') : applicantFront.rgssUrl + const backRgssUrl = isDev ? base + applicantBack.rgssUrl.replace('/opt/ebiz/static', '') : applicantBack.rgssUrl return { frontID: { - exist: this.mediaDTOS ? false : false, + exist: !!this.mediaDTOS, imageBase64: '', - imagePath: this.mediaDTOS ? applicantFront.rgssUrl : '' + imagePath: this.mediaDTOS ? frontRgssUrl : '' }, backID: { - exist: this.mediaDTOS ? false : false, + exist: !!this.mediaDTOS, imageBase64: '', - imagePath: this.mediaDTOS ? applicantBack.rgssUrl : '' + imagePath: this.mediaDTOS ? backRgssUrl : '' } } },