mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-21 05:26:44 +08:00
投保流程-签名
This commit is contained in:
@@ -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 => {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -25,9 +25,43 @@
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<!-- <div class="pl20 mt20">
|
||||
<span class="red">注:以上账号仅为本次扣款使用</span>
|
||||
</div> -->
|
||||
<!-- 第三方支付所需表单 -->
|
||||
<form ref="payForm" action="http://10.10.100.84:7003/s3-modules-gateway/embed/gateway.action" method="post">
|
||||
<input name="TransSource" type="text" v-model="payParam.TransSource" />
|
||||
<input name="TransDate" type="text" v-model="payParam.TransDate" />
|
||||
<input name="TransTime" type="text" v-model="payParam.TransTime" />
|
||||
<input name="TransSeq" type="text" v-model="payParam.TransSeq" />
|
||||
<input name="Version" type="text" v-model="payParam.Version" />
|
||||
<input name="RdSeq" type="text" v-model="payParam.RdSeq" />
|
||||
<input name="PaymentCode" type="text" v-model="payParam.PaymentCode" />
|
||||
<input name="PayType" type="text" v-model="payParam.PayType" />
|
||||
<input name="SettleMode" type="text" v-model="payParam.SettleMode" />
|
||||
<input name="ApplyEntity" type="text" v-model="payParam.ApplyEntity" />
|
||||
<input name="Cur" type="text" v-model="payParam.Cur" />
|
||||
<input name="OurAmount" type="text" v-model="payParam.OurAmount" />
|
||||
<input name="FixUser" type="text" v-model="payParam.FixUser" />
|
||||
<input name="Insurer" type="text" v-model="payParam.Insurer" />
|
||||
<input name="CertType" type="text" v-model="payParam.CertType" />
|
||||
<input name="CertNum" type="text" v-model="payParam.CertNum" />
|
||||
<input name="OppBank" type="text" v-model="payParam.OppBank" />
|
||||
<input name="OppAct" type="text" v-model="payParam.OppAct" />
|
||||
<input name="OppActName" type="text" v-model="payParam.OppActName" />
|
||||
<input name="CellPhone" type="text" v-model="payParam.CellPhone" />
|
||||
<input name="ExpireDate" type="text" v-model="payParam.ExpireDate" />
|
||||
<input name="Purpose" type="text" v-model="payParam.Purpose" />
|
||||
<input name="Memo" type="text" v-model="payParam.Memo" />
|
||||
<input name="Description" type="text" v-model="payParam.Description" />
|
||||
<input name="SourceNotecode" type="text" v-model="payParam.SourceNotecode" />
|
||||
<input name="ReturnURL" type="text" v-model="payParam.ReturnURL" />
|
||||
<input name="NotifyURL" type="text" v-model="payParam.NotifyURL" />
|
||||
<input name="SaleChannel" type="text" v-model="payParam.SaleChannel" />
|
||||
<input name="ReqReserved1" type="text" v-model="payParam.ReqReserved1" />
|
||||
<input name="ReqReserved2" type="text" v-model="payParam.ReqReserved2" />
|
||||
<input name="ReqReserved3" type="text" v-model="payParam.ReqReserved3" />
|
||||
<input name="ReqReserved4" type="text" v-model="payParam.ReqReserved4" />
|
||||
<input name="ReqReserved5" type="text" v-model="payParam.ReqReserved5" />
|
||||
<input name="S3Sign" type="text" v-model="payParam.S3Sign" />
|
||||
</form>
|
||||
</div>
|
||||
<!-- <van-button class="m-btn fr" type="danger" @click="submit">确定</van-button>
|
||||
<van-button class="m-btn fr green" @click="reset">重置</van-button> -->
|
||||
@@ -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)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
{{ appntSign.signStatus == '0' ? '未签名' : '已签名' }}
|
||||
</van-button>
|
||||
</div>
|
||||
<div>{{signResult}}</div>
|
||||
</div>
|
||||
<div class="pt25 pl30 flex align-items-c" v-if="relationToAppnt != '1'">
|
||||
<span class="mr10">被保人/监护人签名:</span>
|
||||
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user