Commit 2deef894 authored by FE-安焕焕's avatar FE-安焕焕 👣

修改支付中页面参数

parent cf807bfc
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
*/ */
import qs from 'qs'; import qs from 'qs';
import cookies from '@/service/cookieStorage.service';
import localStorage from '@/service/localStorage.service';
import { isApp as isXyqb } from '@/service/validation.service'; import { isApp as isXyqb } from '@/service/validation.service';
/** /**
* payByWeixinJsapi * payByWeixinJsapi
...@@ -57,11 +59,13 @@ function payByWeixinH5(info) { ...@@ -57,11 +59,13 @@ function payByWeixinH5(info) {
if (!info.params) { if (!info.params) {
info.params = {}; info.params = {};
} }
const vccToken = localStorage.get('vccToken');
const orderNo = cookies.get('orderNo')?.orderNo;
info.params.isXyqb = isXyqb ? 1 : 0; info.params.isXyqb = isXyqb ? 1 : 0;
info.params.isWxH5 = 1; info.params.isWxH5 = 1;
const currentPath = encodeURIComponent( const currentPath = encodeURIComponent(
window.location.origin + window.location.origin +
'/payWaiting' + `/payWaiting?vccToken=${vccToken}&orderNo=${orderNo}` +
qs.stringify(info.params, { encode: true, addQueryPrefix: true }) qs.stringify(info.params, { encode: true, addQueryPrefix: true })
); );
// window.location.href = `${info.url}&redirect_url=${currentPath}`; // window.location.href = `${info.url}&redirect_url=${currentPath}`;
......
...@@ -128,6 +128,7 @@ import { ...@@ -128,6 +128,7 @@ import {
kaGetNextUrl kaGetNextUrl
} from '@/api/pay.api.js'; } from '@/api/pay.api.js';
const VCC_CHANNEL = localStorage.get('vccChannel'); const VCC_CHANNEL = localStorage.get('vccChannel');
let Current_Url = null;
export default { export default {
components: { components: {
crPayCard, crPayCard,
...@@ -207,6 +208,8 @@ export default { ...@@ -207,6 +208,8 @@ export default {
mounted() { mounted() {
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 });
const vccToken = localStorage.get('vccToken');
Current_Url = `${window.location.origin}/payWaiting?vccToken=${vccToken}&orderNo=${this.orderNo}`;
this.queryPayInfo(); this.queryPayInfo();
this.getCouponList(this.orderNo); this.getCouponList(this.orderNo);
}, },
...@@ -406,8 +409,8 @@ export default { ...@@ -406,8 +409,8 @@ export default {
} }
const paramsData = { const paramsData = {
...params, ...params,
quitUrl: `${window.location.origin}/payWaiting`, quitUrl: Current_Url,
returnUrl: `${window.location.origin}/payWaiting`, returnUrl: Current_Url,
ocrAuth: { ocrAuth: {
isH5: true isH5: true
}, },
......
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