mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 02:16:44 +08:00
fix(saleFlowProImprove): 修复投保人信息图片路径处理逻辑
- 修正了证件正反面图片路径的判断条件 - 增加了开发环境与生产环境的路径适配处理 - 完善了 mediaDTOS 数据的初始化与赋值逻辑 - 移除了无效的调试代码注释 - 优化了图片存在状态的判断方式
This commit is contained in:
@@ -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 } }
|
||||
}
|
||||
|
||||
|
||||
@@ -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 : ''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user