Commit f2ac096c authored by malin's avatar malin

r

parent d15b7930
......@@ -100,8 +100,8 @@ export default {
const n = JSON.parse(utils.getCookie("baseInfo"));
this.baseInfo = n ? n : ["name", "name"];
this._queryOrder();
// this._fetchInfo();
// this._queryOrder();
this._fetchInfo();
},
methods: {
......@@ -114,31 +114,20 @@ export default {
orderId: orderId,
};
API.API_fetchInfo(params).then((res) => {
// if (res.status != 200) {
// setTimeout(() => {
// this.counter += 1;
// if (this.counter >= 80) {
// return;
// } else {
// this.is_result = false;
// return this._fetchInfo();
// }
// }, 1000);
// return;
// } else {
this.result = res.result.data;
// this.is_result = true;
// }
if (res.result.data == null) {
if (res.status != 200) {
setTimeout(() => {
this.counter += 1;
if (this.counter >= 80) {
return;
} else {
this.is_result = false;
return this._fetchInfo();
}
}, 1000);
return;
} else {
this.result = res.result.data;
this.is_result = true;
}
});
},
......@@ -158,24 +147,20 @@ export default {
};
API.API_gatewayQueryOrder(params).then((res) => {
let status = res.result.data.status;
// if (this.is_result == true) {
// return;
// }
this.is_result = false;
if (this.is_result == true) {
return;
}
if (status == 200) {
this._fetchInfo();
this.is_result = true;
return;
} else {
// 支付不成功
setTimeout(() => {
if (this.countdown > 1) {
if (this.countdown == 1) {
return this.$router.push({ path: "/pay", query: this.baseInfo });
} else {
this.countdown += 1;
this._queryOrder();
}
}, 1000);
this.countdown += 1;
this._queryOrder();
}, 2000);
}
});
},
......
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