Merge branch 'feature/GFRS-1036【待确定】微信支付-卡单微信支付' into dev

This commit is contained in:
tian.guangyuan
2020-05-08 15:44:44 +08:00

View File

@@ -33,7 +33,7 @@
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
<!-- 银行卡支付结束 --> <!-- 银行卡支付结束 -->
<van-cell-group> <van-cell-group v-if="radio != '3'">
<van-field <van-field
v-model="underWriteData.name" v-model="underWriteData.name"
label="姓名" label="姓名"
@@ -601,63 +601,87 @@ export default {
}, },
// 点击支付 // 点击支付
async payMent(flag) { async payMent(flag) {
let data = { if(this.radio == ''){
orderDTO: { let data = {
orderInfoDTO: { orderDTO: {
orderNo: window.localStorage.getItem('orderNo') orderInfoDTO: {
}, orderNo: window.localStorage.getItem('orderNo')
orderAccountDTO: { },
accountType: '0', orderAccountDTO: {
accountName: this.underWriteData.name, accountType: '0',
bankName: this.bankListName, accountName: this.underWriteData.name,
bankCode: this.underWriteData.bankName, bankName: this.bankListName,
cardBookType: '1', bankCode: this.underWriteData.bankName,
cardBookCode: this.underWriteData.bankCode, cardBookType: '1',
isAutoPay: '0', cardBookCode: this.underWriteData.bankCode,
isAutoRenewal: '1' isAutoPay: '0',
isAutoRenewal: '1'
}
} }
} }
}
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
/*
支付之前要先保存银行账户信息
*/
let res = await saveOrUpdateAccount(data)
// .then(res => {
console.log('res', res)
this.$toast.clear()
if (res.result == '0') {
this.$toast.loading({ this.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……'
}) })
/*
支付之前要先保存银行账户信息
*/
let res = await saveOrUpdateAccount(data)
// .then(res => {
console.log('res', res)
this.$toast.clear()
if (res.result == '0') {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (!flag) {
let rs = await this.underWrite()
if (rs.result != '0') {
this.$toast.clear()
return this.$toast(rs.resultMessage)
}
if (rs.uwResult != '02') {
return this.$toast(rs.message)
}
}
this.acceptInsurance()
} else {
this.$toast(res.resultMessage)
this.isLoading = false
}
// })
}else{
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (!flag) { if (!flag) {
let rs = await this.underWrite() let rs = await this.underWrite()
if (rs.result != '0') { if (rs.result != '0') {
this.$toast.clear() this.$toast.clear()
return this.$toast(rs.resultMessage) return this.$toast(rs.resultMessage)
} }
if (rs.uwResult != '02') { if (rs.uwResult != '02') {
return this.$toast(rs.message) return this.$toast(rs.message)
} }
} }
this.acceptInsurance() this.acceptInsurance()
} else {
this.$toast(res.resultMessage)
this.isLoading = false
} }
// })
}, },
// 选择微信支付校验身份证类型 // 选择微信支付校验身份证类型
vxVerify() { vxVerify() {
@@ -685,13 +709,7 @@ export default {
localStorage.bankCode = this.underWriteData.bankCode localStorage.bankCode = this.underWriteData.bankCode
localStorage.bankListName = this.bankListName localStorage.bankListName = this.bankListName
console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name) console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name)
EWebBridge.webCallAppInJs('bridge', { let url = location.origin +
flag: 'share',
extra: {
title: `国富人寿卡单投保(${shareName})付款`,
content: '付款进行',
url:
location.origin +
'/#/cardList/pay?orderNo=' + '/#/cardList/pay?orderNo=' +
localStorage.orderNo + localStorage.orderNo +
'&token=' + '&token=' +
@@ -703,7 +721,14 @@ export default {
'&bankCode=' + '&bankCode=' +
this.underWriteData.bankCode + this.underWriteData.bankCode +
'&bankListName=' + '&bankListName=' +
this.bankListName, this.bankListName
console.log(url);
EWebBridge.webCallAppInJs('bridge', {
flag: 'share',
extra: {
title: `国富人寿卡单投保(${shareName})付款`,
content: '付款进行',
url: url,
img: this.$assetsUrl + 'images/logo.png' img: this.$assetsUrl + 'images/logo.png'
} }
}) })