mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 19:06:43 +08:00
Merge branch 'dev' of http://112.124.100.131/GFRS/ebiz-h5 into dev
This commit is contained in:
@@ -172,6 +172,7 @@ service.interceptors.request.use(
|
|||||||
let u = navigator.userAgent;
|
let u = navigator.userAgent;
|
||||||
let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //判断是否是 android终端
|
let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //判断是否是 android终端
|
||||||
if(isAndroid){
|
if(isAndroid){
|
||||||
|
console.log(window.Android.getToken(),'Android获取token')
|
||||||
CacheUtils.setLocItem('token', JSON.parse(window.Android.getToken()))
|
CacheUtils.setLocItem('token', JSON.parse(window.Android.getToken()))
|
||||||
}else{
|
}else{
|
||||||
const res = await EWebBridge.webCallAppInJs('getToken')
|
const res = await EWebBridge.webCallAppInJs('getToken')
|
||||||
|
|||||||
@@ -158,7 +158,8 @@ export default {
|
|||||||
gotPayParam: false, // 是否已正确获取支付参数,
|
gotPayParam: false, // 是否已正确获取支付参数,
|
||||||
payStatus: '', // 接口返回的支付状态
|
payStatus: '', // 接口返回的支付状态
|
||||||
isWeixin, // 是否为微信环境
|
isWeixin, // 是否为微信环境
|
||||||
isLoading: false // 分享到微信后的页面loading
|
isLoading: false, // 分享到微信后的页面loading
|
||||||
|
isShare:'' //0是点击分享 1是点击支付
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -193,13 +194,26 @@ export default {
|
|||||||
console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
|
console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
|
||||||
} else {
|
} else {
|
||||||
let token = this.$route.query.token
|
let token = this.$route.query.token
|
||||||
|
this.orderNo = this.$route.query.orderNo
|
||||||
let orderNo = this.$route.query.orderNo
|
let orderNo = this.$route.query.orderNo
|
||||||
localStorage.token = token
|
localStorage.token = token
|
||||||
localStorage.orderNo = orderNo
|
localStorage.orderNo = orderNo
|
||||||
this.payMent()
|
this.payMentWx(orderNo) //直接调支付
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async payMentWx(orderNo){
|
||||||
|
const res = await payFlag({ orderNo: orderNo })
|
||||||
|
console.dir(res)
|
||||||
|
if (res.content.payFlag == 'Y') {
|
||||||
|
this.getAcceptInsurance()
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$router.push({ path: '/sale/payResultFail' })
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
getAcceptInsurance() {
|
getAcceptInsurance() {
|
||||||
let that = this
|
let that = this
|
||||||
let data = {
|
let data = {
|
||||||
@@ -263,6 +277,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// signFlag 是否完成签约
|
// signFlag 是否完成签约
|
||||||
|
this.isShare = 1
|
||||||
let signFlag = await this.checkBankCardSign()
|
let signFlag = await this.checkBankCardSign()
|
||||||
if (signFlag) {
|
if (signFlag) {
|
||||||
const res = await payFlag({ orderNo: this.orderNo })
|
const res = await payFlag({ orderNo: this.orderNo })
|
||||||
@@ -324,6 +339,7 @@ export default {
|
|||||||
}
|
}
|
||||||
let mobile = res.orderDTO.appntDTO.mobile
|
let mobile = res.orderDTO.appntDTO.mobile
|
||||||
this.encyCustomerMobile = mobile.slice(0, 3) + '****' + mobile.slice(-4)
|
this.encyCustomerMobile = mobile.slice(0, 3) + '****' + mobile.slice(-4)
|
||||||
|
console.log(this.encyCustomerMobil,'手机号2')
|
||||||
} else {
|
} else {
|
||||||
let underWriteData = {
|
let underWriteData = {
|
||||||
accountName: '',
|
accountName: '',
|
||||||
@@ -376,6 +392,9 @@ export default {
|
|||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
this.$toast.clear()
|
this.$toast.clear()
|
||||||
let riskDTOLst = res.orderDTO.insuredDTOs[0].riskDTOLst[0];
|
let riskDTOLst = res.orderDTO.insuredDTOs[0].riskDTOLst[0];
|
||||||
|
let mobile = res.orderDTO.appntDTO.mobile
|
||||||
|
this.encyCustomerMobile = mobile.slice(0, 3) + '****' + mobile.slice(-4)
|
||||||
|
console.log(this.encyCustomerMobil,'手机号1')
|
||||||
// 判断是否为长期险 短期险不校验签约
|
// 判断是否为长期险 短期险不校验签约
|
||||||
if ((riskDTOLst.insuYearFlag == 'Y' && riskDTOLst.insuYear > 1) || riskDTOLst.insuYearFlag == 'A') {
|
if ((riskDTOLst.insuYearFlag == 'Y' && riskDTOLst.insuYear > 1) || riskDTOLst.insuYearFlag == 'A') {
|
||||||
this.$CacheUtils.setLocItem('isLongInsuranceFlag', "Y");
|
this.$CacheUtils.setLocItem('isLongInsuranceFlag', "Y");
|
||||||
@@ -402,6 +421,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async share() {
|
async share() {
|
||||||
// signFlag 是否完成签约
|
// signFlag 是否完成签约
|
||||||
|
this.isShare = 0
|
||||||
let signFlag = await this.checkBankCardSign()
|
let signFlag = await this.checkBankCardSign()
|
||||||
if (signFlag) {
|
if (signFlag) {
|
||||||
let shareName = this.underWriteData.appntName
|
let shareName = this.underWriteData.appntName
|
||||||
@@ -577,6 +597,12 @@ export default {
|
|||||||
},
|
},
|
||||||
// 验证码弹框--签约确认
|
// 验证码弹框--签约确认
|
||||||
authConfirm(){
|
authConfirm(){
|
||||||
|
this.$toast.loading({
|
||||||
|
duration: 0, // 持续展示 toast
|
||||||
|
forbidClick: true, // 禁用背景点击
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
let data = {
|
let data = {
|
||||||
rdSeq:this.rdSeq,
|
rdSeq:this.rdSeq,
|
||||||
verfyCode:this.verfyCode,
|
verfyCode:this.verfyCode,
|
||||||
@@ -594,8 +620,24 @@ export default {
|
|||||||
this.verfyCode = ''
|
this.verfyCode = ''
|
||||||
let data = res.content
|
let data = res.content
|
||||||
if (data.result == '0') {
|
if (data.result == '0') {
|
||||||
this.getAcceptInsurance()
|
this.$toast.clear()
|
||||||
|
this.show = false
|
||||||
|
if(this.isShare == 1){
|
||||||
|
this.getAcceptInsurance()
|
||||||
|
}else if(this.isShare == 0){
|
||||||
|
let shareName = this.underWriteData.appntName
|
||||||
|
EWebBridge.webCallAppInJs('bridge', {
|
||||||
|
flag: 'share',
|
||||||
|
extra: {
|
||||||
|
title: `国富人寿电子投保单(${shareName})付款`,
|
||||||
|
content: '付款进行',
|
||||||
|
url: location.origin + '/#/sale/payMent?orderNo=' + localStorage.orderNo + '&token=' + localStorage.token,
|
||||||
|
img: this.$assetsUrl + 'images/logo.png'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
|
this.$toast.clear()
|
||||||
// 签约失败
|
// 签约失败
|
||||||
const info = '亲,您当前银行卡账户续期签约失败,\n原因:' + data.resultMessage
|
const info = '亲,您当前银行卡账户续期签约失败,\n原因:' + data.resultMessage
|
||||||
Dialog.confirm({
|
Dialog.confirm({
|
||||||
|
|||||||
Reference in New Issue
Block a user