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 : '' } } },