Commit 3152c554 authored by 郭志伟's avatar 郭志伟

fix: 顾问H5

parent db23622a
...@@ -257,7 +257,34 @@ export default { ...@@ -257,7 +257,34 @@ export default {
try { try {
const res = await goPay({ tradeType: this.tradeType, openId: this.openId }); const res = await goPay({ tradeType: this.tradeType, openId: this.openId });
if (res) { if (res) {
payByWay(this.tradeType, res.payInfo).then(() => { let payInfo = "";
if (res.payInfo && res.payInfo.payUrl) {
payInfo = {
url: res.payInfo.payUrl,
params: {
tradeType: this.tradeType,
openId: this.openId,
state: 1
}
};
} else if (
this.tradeType === "JSAPI" &&
!res.payUrl &&
res.payInfo &&
!res.payInfo.payUrl
) {
payInfo = res.payInfo;
} else {
payInfo = {
url: res.payUrl,
params: {
tradeType: this.tradeType,
openId: this.openId,
state: 1
}
};
}
payByWay(this.tradeType, payInfo).then(() => {
setTimeout(() => { setTimeout(() => {
this.$parent.getOrderInfo(true); this.$parent.getOrderInfo(true);
}, 1000); }, 1000);
......
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