Commit eb2bfb4c authored by malin's avatar malin

t

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