diff --git a/src/assets/js/utils/request.js b/src/assets/js/utils/request.js index 7d9abbf31..e0d36926a 100644 --- a/src/assets/js/utils/request.js +++ b/src/assets/js/utils/request.js @@ -31,8 +31,8 @@ service.interceptors.request.use( }) } - // config.headers['token'] = window.localStorage.getItem('token') - config.headers['token'] = `507e5ff426364e95b22cd4c1e22f427f` + config.headers['token'] = window.localStorage.getItem('token') + // config.headers['token'] = `507e5ff426364e95b22cd4c1e22f427f` return config }, error => { diff --git a/src/views/ebiz/my/UserInfo.vue b/src/views/ebiz/my/UserInfo.vue index 8e37c3da5..b5c1ad880 100644 --- a/src/views/ebiz/my/UserInfo.vue +++ b/src/views/ebiz/my/UserInfo.vue @@ -53,6 +53,7 @@ export default { if (res.result == 0) { this.userInfo = res // document.title = this.userInfo.name + '(' + this.userInfo.jobNo + ')' + console.log('-----代理人证件类型:',this.userInfo.cardType) obj.idType.some(item => { if (item.id == res.cardType) { res.cardType = item.text diff --git a/src/views/ebiz/sale/PayMent.vue b/src/views/ebiz/sale/PayMent.vue index cbc346f6c..81d32bc5f 100644 --- a/src/views/ebiz/sale/PayMent.vue +++ b/src/views/ebiz/sale/PayMent.vue @@ -25,9 +25,43 @@ - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -51,7 +85,45 @@ export default { src: this.$assetsUrl + 'images/cardImg.png', // 核保数据 underWriteData: {}, - srcImg: '' + srcImg: '', + payParam: { + TransSource: '', // 对接系统 + TransDate: '', // 请求日期 + TransTime: '', // 请求时间 + TransSeq: '', // 时间戳 + Version: '', // 版本号 + RdSeq: '', // 指令流水号 + PaymentCode: '', // 业务唯一号 + PayType: '', // 交易类型 + SettleMode: '', // 支付方式 + ApplyEntity: '', // 业务发生机构 + Cur: '', // 币种 + OurAmount: '', // 金额 + FixUser: '', // 实名认证标识 + Insurer: '', // 对接系统 + CertType: '', // 证件类型 + CertNum: '', // 证件号码 + OppBank: '', // 交易方银行 + OppAct: '', // 交易方账号 + OppActName: '', // 交易方名称 + CellPhone: '', // 手机号码 + ExpireDate: '', // 订单失效时间 + Purpose: '', // 用途 + Memo: '', // 备注 + Description: '', // 描述 + SourceNotecode: '', // 外部系统业务单据号 + ReturnURL: '', // 页面跳转同步通知地址 + NotifyURL: '', // 后台通知地址 + SaleChannel: '', // 销售渠道 + ReqReserved1: '', // 备用字段1 + ReqReserved2: '', // 备用字段2 + ReqReserved3: '', // 备用字段3 + ReqReserved4: '', // 备用字段4 + ReqReserved5: '', // 备用字段5 + S3Sign: '', // 验签信息 + tradeState: '' // 状态 + }, + gotPayParam: false // 是否已正确获取支付参数 } }, mounted() { @@ -81,6 +153,25 @@ export default { if (res.result == '0') { // 1成 4支付中 2支付失败 8转批扣 + // 支付参数大小写转换 + let keyMap = {} + for (let key in this.payParam) { + keyMap[key.toLowerCase()] = key + } + let paramKey + for (let rKey in res.brPayReturnData) { + if (keyMap.hasOwnProperty(rKey.toLowerCase())) { + paramKey = keyMap[rKey.toLowerCase()] + this.payParam[paramKey] = res.brPayReturnData[rKey] + } + } + console.log('----支付参数:this.payParam:', JSON.stringify(this.payParam)) + this.gotPayParam = true + this.$forceUpdate() + this.$nextTick(()=>{ + this.$refs.payForm.submit()// 表单提交,发起支付,跳至收银台 + }) + window.localStorage.setItem('resMessage', res.resultMessage) window.localStorage.setItem('payStatus', res.payStatus) diff --git a/src/views/ebiz/sale/SignatureOfElectronic.vue b/src/views/ebiz/sale/SignatureOfElectronic.vue index a983b3a21..5f134ab9b 100644 --- a/src/views/ebiz/sale/SignatureOfElectronic.vue +++ b/src/views/ebiz/sale/SignatureOfElectronic.vue @@ -39,6 +39,7 @@ {{ appntSign.signStatus == '0' ? '未签名' : '已签名' }} +
{{signResult}}
被保人/监护人签名: @@ -73,6 +74,7 @@ export default { let isWeixin = this.$utils.device().isWeixin //判断环境 return { + signResult:'', pdfh5: null, pdfUrl: '', src: location.origin + '/pdfjs/web/viewer.html?file=', @@ -96,6 +98,8 @@ export default { insuredSign: {}, // 是投保人还是被保人 0 投保人 1被保人 2 投被同人 signVal: '', + // CA签字位置 + caOffset: '-150',// 投保人签名位置 // 图片路径 url: '', // sign加密码 @@ -391,7 +395,7 @@ export default { if (this.detailJump != '1') { if (this.relationToAppnt == '1') { if (this.isWeixin) { - this.toAirSign('1', '申请日期', '-170') + this.toAirSign('1', '申请日期', this.caOffset) } else { EWebBridge.webCallAppInJs('ca_sign', { //身份证号码 @@ -401,9 +405,13 @@ export default { keyword: '申请日期', pageNo: '1', index: '1', - offset: '-170', + offset: this.caOffset, pos: '3' }).then(data => { + let temp = JSON.parse(data) + console.log('@@@签名返回:',data) + this.signResult = data + console.log(`--签名返回:val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt},CA_state:${temp.state}`) this.$toast.clear() if (JSON.parse(data).state == '1') { this.base64 = decodeURI(JSON.parse(data).sign) @@ -416,7 +424,7 @@ export default { } } else { if (this.isWeixin) { - this.toAirSign('1', '法定监护人', '-170') + this.toAirSign('1', '法定监护人', this.caOffset) } else { EWebBridge.webCallAppInJs('ca_sign', { //身份证号码 @@ -427,9 +435,10 @@ export default { keyword: '法定监护人', pageNo: '1', index: '1', - offset: '-170', + offset: this.caOffset, pos: '3' }).then(data => { + console.log(`--签名返回:val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`,JSON.stringify(data)) this.$toast.clear() if (JSON.parse(data).state == '1') { this.base64 = decodeURI(JSON.parse(data).sign) @@ -480,6 +489,7 @@ export default { offset: '-150', pos: '3' }).then(data => { + console.log(`--签名返回:val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`,JSON.stringify(data)) this.$toast.clear() if (JSON.parse(data).state == '1') { that.base64 = decodeURI(JSON.parse(data).sign) @@ -507,6 +517,7 @@ export default { offset: '0', pos: '3' }).then(data => { + console.log(`--签名返回:val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`,JSON.stringify(data)) this.$toast.clear() if (JSON.parse(data).state == '1') { that.base64 = decodeURI(JSON.parse(data).sign) @@ -536,6 +547,7 @@ export default { async created() { let that = this + that.detailJump = window.localStorage.getItem('detailJump') that.signVal = window.localStorage.getItem('sign-val')