Commit aacc56d3 authored by malin's avatar malin

t

parent 91137107
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
this.baseInfo = n ? n : ["name", "name"]; this.baseInfo = n ? n : ["name", "name"];
this._queryOrder(); this._queryOrder();
this._fetchInfo(); // this._fetchInfo();
}, },
methods: { methods: {
...@@ -114,21 +114,21 @@ export default { ...@@ -114,21 +114,21 @@ export default {
orderId: orderId, orderId: orderId,
}; };
API.API_fetchInfo(params).then((res) => { API.API_fetchInfo(params).then((res) => {
if (res.status != 200) { // if (res.status != 200) {
setTimeout(() => { // setTimeout(() => {
this.counter += 1; // this.counter += 1;
if (this.counter >= 80) { // if (this.counter >= 80) {
return; // return;
} else { // } else {
this.is_result = false; // this.is_result = false;
return this._fetchInfo(); // return this._fetchInfo();
} // }
}, 1000); // }, 1000);
return; // return;
} else { // } else {
this.result = res.result.data; this.result = res.result.data;
this.is_result = true; // this.is_result = true;
} // }
}); });
}, },
...@@ -147,10 +147,13 @@ export default { ...@@ -147,10 +147,13 @@ export default {
}; };
API.API_gatewayQueryOrder(params).then((res) => { API.API_gatewayQueryOrder(params).then((res) => {
let status = res.result.data.status; let status = res.result.data.status;
if (this.is_result == true) { // if (this.is_result == true) {
return; // return;
} // }
this.is_result = false;
if (status == 200) { if (status == 200) {
this._fetchInfo();
this.is_result = true;
return; return;
} else { } else {
// 支付不成功 // 支付不成功
...@@ -160,7 +163,7 @@ export default { ...@@ -160,7 +163,7 @@ export default {
} }
this.countdown += 1; this.countdown += 1;
this._queryOrder(); this._queryOrder();
}, 1000); }, 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