mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-21 17:06:43 +08:00
【fix】将dev环境的卡单支付强制更新为 卡单微信支付分支 的代码
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<van-field :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount} 元`" readonly label="支付金额" />
|
||||
</van-cell-group>
|
||||
<!-- 银行卡支付开始 -->
|
||||
<div class="money">
|
||||
<!-- <div class="money">
|
||||
<div>
|
||||
<img src="../../../assets/images/u10280.png" alt style="margin-top:-5px;margin-right:10px;" />
|
||||
<span class="oi">银行卡支付</span>
|
||||
@@ -14,7 +14,24 @@
|
||||
<div class="i mr20">
|
||||
<van-radio-group v-model="radio" class="flex justify-content-fe"><van-radio name="1"></van-radio></van-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<van-cell-group class="flex align-items-c">
|
||||
<img :src="src" class="pl10" />
|
||||
<van-cell title="银行卡支付" clickable>
|
||||
<!-- <van-checkbox v-model="checked" class="flex justify-content-fe"></van-checkbox> -->
|
||||
<van-radio-group v-model="radio" class="flex justify-content-fe">
|
||||
<van-radio name=""></van-radio>
|
||||
</van-radio-group>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group class="flex align-items-c">
|
||||
<img :src="vxSrc" class="vximg" />
|
||||
<van-cell title="微信支付" clickable>
|
||||
<van-radio-group v-model="radio" class="flex justify-content-fe">
|
||||
<van-radio name="3" @click="vxVerify"></van-radio>
|
||||
</van-radio-group>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<!-- 银行卡支付结束 -->
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
@@ -123,6 +140,10 @@
|
||||
<input name="S3Sign" type="hidden" v-model="payParam.S3Sign" />
|
||||
</form>
|
||||
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="pay" v-no-more-click="1000">支付</van-button></div>
|
||||
<div class="bg-white bottom-btn" v-if="radio == '3' && !isWeixin">
|
||||
<van-button type="danger" style="width: 50vw;height: 13vw" @click="pay" v-no-more-click="1000">支付</van-button>
|
||||
<van-button type="danger" style="width: 50vw;height: 13vw" @click="share" v-no-more-click="1000">分享</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 银行卡扫描按钮 -->
|
||||
<van-popup v-model="isScan" style="height:100vh" position="bottom">
|
||||
@@ -134,6 +155,8 @@
|
||||
<van-cell v-for="item in bankList" :key="item.code" :title="item.bankName" class="text-center" @click="clickList(item.bankName, item.code)" />
|
||||
</van-list>
|
||||
</van-popup>
|
||||
<!-- 分享到微信的页面loading -->
|
||||
<Loading :isLoading="isLoading"></Loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -146,6 +169,7 @@ Vue.use(Button)
|
||||
import { acceptInsurance, getBankList, underWrite, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||
import { saveOrUpdateAccount, getPayTemp } from '@/api/ebiz/cardList/cardList.js'
|
||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||||
import Loading from '@/components/ebiz/Loading'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
name: 'pay',
|
||||
@@ -157,10 +181,16 @@ export default {
|
||||
[List.name]: List,
|
||||
[Cell.name]: Cell,
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio
|
||||
[Radio.name]: Radio,
|
||||
Loading
|
||||
},
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
// 银行卡支付图片地址
|
||||
src: this.$assetsUrl + 'images/cardImg.png',
|
||||
// 微信支付图片地址
|
||||
vxSrc: this.$assetsUrl + 'images/vxImg.png',
|
||||
// trialList: JSON.parse(localStorage.trialList),
|
||||
// 核保数据
|
||||
orderStatus: '',
|
||||
@@ -171,7 +201,7 @@ export default {
|
||||
bankCode: '', //银行卡号
|
||||
bankName: '' //开户银行
|
||||
},
|
||||
radio: '1',
|
||||
radio: '',
|
||||
result: [],
|
||||
isScan: false, //是否显示证件扫描组件
|
||||
isClear: false, //是否清空
|
||||
@@ -419,21 +449,32 @@ export default {
|
||||
this.underWriteData = {
|
||||
appntName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName,
|
||||
name: res.orderDTO.appntDTO.name,
|
||||
bankCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
||||
bankName: res.orderDTO.orderAccountDTO.bankCode,
|
||||
cardBookCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
||||
// bankName: res.orderDTO.orderAccountDTO.bankCode,
|
||||
// bankCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
||||
// cardBookCode: res.orderDTO.orderAccountDTO.cardBookCode,
|
||||
idType: res.orderDTO.appntDTO.idType,
|
||||
orderAmount: res.orderDTO.orderInfoDTO.orderAmount,
|
||||
orderNo: res.orderDTO.orderAccountDTO.orderNo,
|
||||
result: '',
|
||||
resultMessage: '交易处理成功',
|
||||
uwResult: '02'
|
||||
}
|
||||
this.bankListName = res.orderDTO.orderAccountDTO.bankName
|
||||
// window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData))
|
||||
// this.bankListName = res.orderDTO.orderAccountDTO.bankName
|
||||
this.underWriteData.bankCode =
|
||||
res.orderDTO.orderAccountDTO.cardBookCode !== null ? res.orderDTO.orderAccountDTO.cardBookCode : this.$route.query.bankCode
|
||||
this.underWriteData.bankName = res.orderDTO.orderAccountDTO.bankCode !== null ? res.orderDTO.orderAccountDTO.bankCode : this.$route.query.bankName
|
||||
this.underWriteData.cardBookCode =
|
||||
res.orderDTO.orderAccountDTO.cardBookCode !== null ? res.orderDTO.orderAccountDTO.cardBookCode : this.$route.query.bankCode
|
||||
this.bankListName = res.orderDTO.orderAccountDTO.bankName !== null ? res.orderDTO.orderAccountDTO.bankName : this.$route.query.bankListName
|
||||
|
||||
if (this.isWeixin) {
|
||||
this.pay()
|
||||
}
|
||||
} else {
|
||||
this.underWriteData = {
|
||||
accountName: '',
|
||||
appntName: '',
|
||||
idType: '',
|
||||
bankCode: '',
|
||||
bankName: '',
|
||||
cardBookCode: '',
|
||||
@@ -485,7 +526,6 @@ export default {
|
||||
console.log(this.$validator)
|
||||
return this.$toast(this.$validator.errors.all()[0])
|
||||
}
|
||||
|
||||
switch (this.orderStatus) {
|
||||
case '56':
|
||||
case '57':
|
||||
@@ -506,7 +546,8 @@ export default {
|
||||
acceptInsurance() {
|
||||
let data = {
|
||||
orderNo: window.localStorage.getItem('orderNo'),
|
||||
cardOrder: 'cardOrder'
|
||||
cardOrder: 'cardOrder',
|
||||
payType: this.radio
|
||||
}
|
||||
acceptInsurance(data).then(res => {
|
||||
console.log('----取支付参数结果:', JSON.stringify(res))
|
||||
@@ -549,7 +590,11 @@ export default {
|
||||
}, 100)
|
||||
})
|
||||
} else {
|
||||
if (!this.isWeixin) {
|
||||
this.$toast.clear()
|
||||
} else {
|
||||
this.isLoading = false
|
||||
}
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
@@ -610,8 +655,58 @@ export default {
|
||||
this.acceptInsurance()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
this.isLoading = false
|
||||
}
|
||||
// })
|
||||
},
|
||||
// 选择微信支付校验身份证类型
|
||||
vxVerify() {
|
||||
if (this.underWriteData.idType != '1') {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
message: '证件类型不是身份证,无法使用微信支付',
|
||||
showCancelButton: false
|
||||
})
|
||||
.then(() => {
|
||||
this.radio = ''
|
||||
})
|
||||
}
|
||||
},
|
||||
async share() {
|
||||
let valid = await this.$validator.validate()
|
||||
console.log(valid)
|
||||
if (true !== valid) {
|
||||
console.log(this.$validator)
|
||||
return this.$toast(this.$validator.errors.all()[0])
|
||||
}
|
||||
let shareName = this.underWriteData.name
|
||||
localStorage.name = this.underWriteData.name
|
||||
localStorage.bankName = this.underWriteData.bankName
|
||||
localStorage.bankCode = this.underWriteData.bankCode
|
||||
localStorage.bankListName = this.bankListName
|
||||
console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name)
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: `国富人寿卡单投保(${shareName})付款`,
|
||||
content: '付款进行',
|
||||
url:
|
||||
location.origin +
|
||||
'/#/cardList/pay?orderNo=' +
|
||||
localStorage.orderNo +
|
||||
'&token=' +
|
||||
localStorage.token +
|
||||
'&name=' +
|
||||
localStorage.name +
|
||||
'&bankName=' +
|
||||
localStorage.bankName +
|
||||
'&bankCode=' +
|
||||
localStorage.bankCode +
|
||||
'&bankListName=' +
|
||||
localStorage.bankListName,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -622,36 +717,12 @@ export default {
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.oi {
|
||||
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
color: #666666;
|
||||
}
|
||||
.money {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
z-index: 100;
|
||||
background: white;
|
||||
height: 40px;
|
||||
overflow: hidden;
|
||||
> div:nth-of-type(1) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width: 33px;
|
||||
height: 32px;
|
||||
}
|
||||
span {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.vximg {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
padding-left: 13px;
|
||||
padding-right: 3px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user