From 4967324d87e5ca452c4db154fd4089a0aaf972bc Mon Sep 17 00:00:00 2001 From: "liu.xiaofeng@ebiz-digits.com" Date: Thu, 29 Jun 2023 13:43:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E4=B9=A6=E5=B7=B2=E9=80=89?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E4=BC=A0=E5=8F=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/index.js | 46 +++++++++++----------- src/views/ebiz/common/CalculatePremium.vue | 26 +++++++----- src/views/ebiz/common/SelectedProduct.vue | 6 +-- 3 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/config/index.js b/src/config/index.js index 1d80d7f05..38278bb06 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -27,29 +27,29 @@ function getSearchString (key) { } return obj[key] } -let apiVersion = 'v2' -var ua = window.navigator.userAgent.toLowerCase() -//通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信 -if (localStorage.getItem('apiVersion')) { - apiVersion = localStorage.getItem('apiVersion') -} else { - if (ua.match(/MicroMessenger/i) == 'micromessenger') { - //report/reportList数据报表页面在浏览器可以打开了,但在微信或企业微信中打开不了,接口请求不需要token - if (window.location.href.indexOf('apiVersion') > 0) { - apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时,为v2 - } else { - apiVersion = 'v3' - } - } else { - // 在app - if (navigator.userAgent.indexOf('JZG_') > 0) { - apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2' - } - } - window.localStorage.setItem('apiVersion', apiVersion) -} -// 可以多个接口域名,按需添加 -console.log('环境:', process.env.VUE_APP_FLAG) +let apiVersion = 'v1' +// var ua = window.navigator.userAgent.toLowerCase() +// //通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信 +// if (localStorage.getItem('apiVersion')) { +// apiVersion = localStorage.getItem('apiVersion') +// } else { +// if (ua.match(/MicroMessenger/i) == 'micromessenger') { +// //report/reportList数据报表页面在浏览器可以打开了,但在微信或企业微信中打开不了,接口请求不需要token +// if (window.location.href.indexOf('apiVersion') > 0) { +// apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时,为v2 +// } else { +// apiVersion = 'v3' +// } +// } else { +// // 在app +// if (navigator.userAgent.indexOf('JZG_') > 0) { +// apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2' +// } +// } +// window.localStorage.setItem('apiVersion', apiVersion) +// } +// // 可以多个接口域名,按需添加 +// console.log('环境:', process.env.VUE_APP_FLAG) switch (process.env.VUE_APP_FLAG) { case 'dev': apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/' + apiVersion // 国富api ///api/v1 diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 55b5af9ab..151bd2d95 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -690,7 +690,7 @@ export default { this.cvalidateFlag = this.activeType && this.isFrom != 'proposal' //构建提交数据、渲染险种 - if(this.$route.query.insuanceId && this.isFrom == 'proposal'){ + if(this.$route.query.insuanceIdInfo && this.isFrom == 'proposal'){ // 获取试算记录详情 let serialNo = '' if (this.$route.query.orderNo) { @@ -699,9 +699,16 @@ export default { if (this.$route.query.proposalOrderNo) { serialNo = this.$route.query.proposalOrderNo } + let thismyinsuanceIdInfo = JSON.parse(this.$route.query.insuanceIdInfo) + let insuanceId = '' + thismyinsuanceIdInfo.forEach(item=>{ + if(item.isMainRisk == 0){ + insuanceId = item.insuanceId + } + }) await getTrialRecordInfo({ serialNo:serialNo, - mainRiskId:this.$route.query.insuanceId + mainRiskId:insuanceId }).then(res => { if (res.result == '0') { this.chooseProducts = JSON.parse(res.content.trialJsonStr) @@ -2702,16 +2709,17 @@ export default { let [mainRiskCode, riskDTOLst] = ['', []] let rollInResult = '' //校验预计转入保费结果 this.chooseProducts.forEach((item, index) => { - console.log(item) if (localStorage.trialList != '') { if (item.isMainRisk == 0) { mainRiskCode = item.productCode } - // this.trialInfos.map(trial=>{ - // trial.duty.map(dutylist=> { - // dutylist.dutyname - // }) - // }) + let thismyinsuanceIdInfo = JSON.parse(this.$route.query.insuanceIdInfo) + let insuanceId = '' + thismyinsuanceIdInfo.forEach(item01=>{ + if(item01.isMainRisk == item.productCode){ + insuanceId = item01.insuanceId + } + }) let riskItem = { isMainRisk: item.isMainRisk, riskName: item.riskName, @@ -2722,7 +2730,7 @@ export default { standPrem: this.trialList[index] && this.trialList[index].standPrem, predictTransferPrem: item.predictTransferPrem, thirdInsuraceNo: this.policyNo, - insuanceId:this.$route.query.insuanceId //编辑时,添加主险id + insuanceId:insuanceId //编辑时,添加主险id // mult: this.mult } if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') { diff --git a/src/views/ebiz/common/SelectedProduct.vue b/src/views/ebiz/common/SelectedProduct.vue index 6ff0d7c35..4dd028fcb 100644 --- a/src/views/ebiz/common/SelectedProduct.vue +++ b/src/views/ebiz/common/SelectedProduct.vue @@ -23,7 +23,7 @@
- + 编辑 删除
@@ -437,9 +437,9 @@ export default { let isProposal = localStorage.isFrom == 'proposal' ? true : false let thismyurl = '' if (this.$route.query.orderNo) { - thismyurl = '/common/calculatePremium/?orderNo=' + this.$route.query.orderNo + '&insuanceId='+insuanceId + thismyurl = '/common/calculatePremium/?orderNo=' + this.$route.query.orderNo + '&insuanceIdInfo='+JSON.stringify(insuanceIdInfo) } else if (this.$route.query.proposalOrderNo) { - thismyurl = '/common/calculatePremium?proposalOrderNo=' + this.$route.query.proposalOrderNo + '&insuanceId='+insuanceId + thismyurl = '/common/calculatePremium?proposalOrderNo=' + this.$route.query.proposalOrderNo + '&insuanceIdInfo='+JSON.stringify(insuanceIdInfo) } if (isProposal) { this.$jump({