Commit fe5f07f8 authored by FE-安焕焕's avatar FE-安焕焕 👣

Ocr成功后的处理

parent 219ef121
......@@ -125,6 +125,7 @@ import {
queryPayInfo,
kaGetNextUrl
} from '@/api/pay.api.js';
import Cookies from '@/service/cookieStorage.service';
const VCC_CHANNEL = localStorage.get('vccChannel');
let Current_Url = null;
export default {
......@@ -144,6 +145,7 @@ export default {
error: '',
random: '',
orderNo: '',
payInfo: {},
success: false,
payType: null,
isReady: false,
......@@ -207,7 +209,11 @@ export default {
this.orderNo = this.$route.query.orderNo || cookies.get('orderNo')?.orderNo;
cookies.set('orderNo', { orderNo: this.orderNo });
if (this.$route?.query?.ocrflag || cookies.get('ocrflag')) {
this.pay(cookies.get('paramsData'), 'ocr');
this.payInfo = cookies.get('info') || {};
cookies.remove('ocrflag');
cookies.remove('info');
// 先支付再查询信息
this.pay(this.payInfo?.paramsData, 'ocr', cookies.get('ocrflag'));
}
const vccToken = localStorage.get('vccToken');
Current_Url = `${window.location.origin}/payWaiting?vccToken=${vccToken}&orderNo=${this.orderNo}`;
......@@ -219,7 +225,7 @@ export default {
async queryPayInfo() {
const [data, error] = await queryPayInfo({ orderNo: this.orderNo });
if (error && codeArr.indexOf(error?.response?.businessCode) < 0) {
this.payResult('Fail');
// this.payResult('Fail');
return;
}
this.isReady = true;
......@@ -297,6 +303,12 @@ export default {
this.creditPayInfo = displayInfo.creditPayInfo || {};
displayInfo.periodSeconds = displayInfo.periodSeconds * 1000;
this.getBtnStatus(this.isRiskLimit());
if (this.payInfo.payType) {
this.selectedCoupon = this.payInfo.selectedCoupon;
this.changePayType(this.payInfo.payType, this.payInfo.mergePayPretreatmentInfo);
this.isShowProtocol && (this.isCheckAgreement = true);
this.setAmount();
}
},
isRiskLimit() {
const { accountStatus, riskManagementAmt } = this.creditPayInfo;
......@@ -375,7 +387,7 @@ export default {
return;
}
this.error = '';
if (this.isShowProtocol && !this.isCheckAgreement && !isOcr) {
if (this.isShowProtocol && !this.isCheckAgreement) {
this.$toast('请仔细阅读并同意相关协议');
return;
}
......@@ -464,7 +476,13 @@ export default {
return;
} else if (creditPayStatus === FACE_VERIFICATION_CODE_PAY) {
/* 人脸鉴权 */
cookies.set('paramsData', paramsData);
cookies.set('info', {
paramsData,
payType: this.payType,
selectedCoupon: this.selectedCoupon,
isCheckAgreement: this.isCheckAgreement,
mergePayPretreatmentId: this.mergePayPretreatmentId
});
this.goOcr();
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment