Commit 810a33bf authored by 郭志伟's avatar 郭志伟

fix: 顾问支付完成回传测试

parent 825c2290
......@@ -112,7 +112,7 @@ export default {
remain: 0,
price: [0.99, 199],
consultantOrderNo: "",
openId: localStorage.get("openId"),
openId: localStorage.get("openId") || undefined,
isPayWait: false,
tradeType: isXyqb ? "MWEB" : isWeixinBrower ? "JSAPI" : "MWEB",
serviceList: [
......@@ -269,15 +269,24 @@ export default {
}, 1000);
};
try {
const res = await goPay({ tradeType: this.tradeType, openId: this.openId });
let { tradeType, openId } = this;
if (!openId) {
openId = undefined;
}
const _param = {
tradeType,
openId,
channelId: isXyqb ? 2 : isWeixinBrower ? 1 : undefined
};
const res = await goPay(_param);
if (res) {
let payInfo = "";
if (res.payInfo && res.payInfo.payUrl) {
payInfo = {
url: res.payInfo.payUrl,
params: {
tradeType: this.tradeType,
openId: this.openId,
tradeType,
openId,
isConsultant: 1,
state: 1
}
......@@ -293,14 +302,14 @@ export default {
payInfo = {
url: res.payUrl,
params: {
tradeType: this.tradeType,
tradeType,
isConsultant: 1,
openId: this.openId,
openId,
state: 1
}
};
}
payByWay(this.tradeType, payInfo)
payByWay(tradeType, payInfo)
.then(() => {
getOrderInfo();
})
......
......@@ -64,6 +64,7 @@ export default {
...mapActions["setIsLoading"],
// 1-待支付,3-支付成功,4-问卷收集完成,方案配置中,5-方案配置完成, -1 -支付失败订单关闭,-2 -支付超过1小时订单关闭,-3 -订单关闭
async getOrderInfo(checkPayState = false) {
console.log(checkPayState);
if (!this.isLogin) return;
this.showQuestion = false;
const res = await getCulOrder();
......
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