Commit eb2bfb4c authored by malin's avatar malin

t

parent 858f875f
...@@ -154,7 +154,6 @@ export default { ...@@ -154,7 +154,6 @@ export default {
}, },
mounted() { mounted() {
location.reload();
this.babyInfo = JSON.parse(utils.getCookie("babyInfo")); // 将宝宝信息解析出来 this.babyInfo = JSON.parse(utils.getCookie("babyInfo")); // 将宝宝信息解析出来
this._queryOrder(); // 查询是否支付成功 this._queryOrder(); // 查询是否支付成功
...@@ -215,19 +214,23 @@ export default { ...@@ -215,19 +214,23 @@ export default {
this.testInfo = JSON.stringify(params); this.testInfo = JSON.stringify(params);
API.API_gatewayQueryOrder(params).then((res) => { API.API_gatewayQueryOrder(params).then((res) => {
let status = res.result.data.status; let status = res.result.data.status;
let timer = setInterval(() => { if (status == 200) {
this.countdown += 1; return;
if (status == 200) { } else {
clearInterval(timer); // 支付不成功
} else { // if () {
// 支付不成功 // return location.reload();
if (this.countdown < 4) { // } else {
return this._queryOrder(); // this.$router.push({ path: "/pay", query: this.babyInfo });
} else { // }
this.$router.push({ path: "/pay", query: this.babyInfo }); setTimeout(() => {
if (this.countdown == 1) {
return;
} }
} this.countdown += 1;
}, 1000); this._queryOrder();
}, 3000);
}
}); });
}, },
......
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