Commit c52cd9c4 authored by 郭志伟's avatar 郭志伟

fix: #MANGO-9:问题联调

parent 4b79f53d
......@@ -230,10 +230,10 @@ export default {
this.generateOrder();
}
},
updateRemain(isBuy = false) {
updateRemain() {
let historyRemain = localStorage.get("historyRemain");
if (historyRemain && +historyRemain > 100) {
isBuy && historyRemain--;
historyRemain--;
} else {
historyRemain = Math.floor(Math.random() * (200 - 100) + 100);
}
......@@ -244,20 +244,17 @@ export default {
const res = await create();
if (res) {
this.consultantOrderNo = res.consultantOrderNo;
this.updateRemain(true);
this.updateRemain();
this.goPay();
}
},
async goPay() {
const res = await goPay({ tradeType: this.tradeType });
if (res) {
payByWay(this.tradeType, res.payInfo).then(res => {
if (res === "ok") {
setTimeout(() => {
// this.$router.push("/consultant/success");
this.$parent.getOrderInfo();
}, 2000);
}
payByWay(this.tradeType, res.payInfo).then(() => {
setTimeout(() => {
this.$parent.getOrderInfo();
}, 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