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

Ocr成功后的处理

parent 219ef121
...@@ -125,6 +125,7 @@ import { ...@@ -125,6 +125,7 @@ import {
queryPayInfo, queryPayInfo,
kaGetNextUrl kaGetNextUrl
} from '@/api/pay.api.js'; } from '@/api/pay.api.js';
import Cookies from '@/service/cookieStorage.service';
const VCC_CHANNEL = localStorage.get('vccChannel'); const VCC_CHANNEL = localStorage.get('vccChannel');
let Current_Url = null; let Current_Url = null;
export default { export default {
...@@ -144,6 +145,7 @@ export default { ...@@ -144,6 +145,7 @@ export default {
error: '', error: '',
random: '', random: '',
orderNo: '', orderNo: '',
payInfo: {},
success: false, success: false,
payType: null, payType: null,
isReady: false, isReady: false,
...@@ -207,7 +209,11 @@ export default { ...@@ -207,7 +209,11 @@ export default {
this.orderNo = this.$route.query.orderNo || cookies.get('orderNo')?.orderNo; this.orderNo = this.$route.query.orderNo || cookies.get('orderNo')?.orderNo;
cookies.set('orderNo', { orderNo: this.orderNo }); cookies.set('orderNo', { orderNo: this.orderNo });
if (this.$route?.query?.ocrflag || cookies.get('ocrflag')) { 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'); const vccToken = localStorage.get('vccToken');
Current_Url = `${window.location.origin}/payWaiting?vccToken=${vccToken}&orderNo=${this.orderNo}`; Current_Url = `${window.location.origin}/payWaiting?vccToken=${vccToken}&orderNo=${this.orderNo}`;
...@@ -219,7 +225,7 @@ export default { ...@@ -219,7 +225,7 @@ export default {
async queryPayInfo() { async queryPayInfo() {
const [data, error] = await queryPayInfo({ orderNo: this.orderNo }); const [data, error] = await queryPayInfo({ orderNo: this.orderNo });
if (error && codeArr.indexOf(error?.response?.businessCode) < 0) { if (error && codeArr.indexOf(error?.response?.businessCode) < 0) {
this.payResult('Fail'); // this.payResult('Fail');
return; return;
} }
this.isReady = true; this.isReady = true;
...@@ -297,6 +303,12 @@ export default { ...@@ -297,6 +303,12 @@ export default {
this.creditPayInfo = displayInfo.creditPayInfo || {}; this.creditPayInfo = displayInfo.creditPayInfo || {};
displayInfo.periodSeconds = displayInfo.periodSeconds * 1000; displayInfo.periodSeconds = displayInfo.periodSeconds * 1000;
this.getBtnStatus(this.isRiskLimit()); 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() { isRiskLimit() {
const { accountStatus, riskManagementAmt } = this.creditPayInfo; const { accountStatus, riskManagementAmt } = this.creditPayInfo;
...@@ -375,7 +387,7 @@ export default { ...@@ -375,7 +387,7 @@ export default {
return; return;
} }
this.error = ''; this.error = '';
if (this.isShowProtocol && !this.isCheckAgreement && !isOcr) { if (this.isShowProtocol && !this.isCheckAgreement) {
this.$toast('请仔细阅读并同意相关协议'); this.$toast('请仔细阅读并同意相关协议');
return; return;
} }
...@@ -464,7 +476,13 @@ export default { ...@@ -464,7 +476,13 @@ export default {
return; return;
} else if (creditPayStatus === FACE_VERIFICATION_CODE_PAY) { } 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(); 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