Commit 4e95058d authored by malin's avatar malin

t

parent 67188bfc
...@@ -111,16 +111,10 @@ ...@@ -111,16 +111,10 @@
换一批 换一批
</div> </div>
</div> </div>
<div class="fc-9 fs-28"> <div class="fc-9 fs-28">一共有200个起名推荐,请翻页查看</div>
一共有200个起名推荐,请翻页查看{{ orderId }}
</div>
</div> </div>
</div> </div>
</div> </div>
<div>{{ testInfo }}</div>
<div>testSuccess:{{ testSuccess }}</div>
<div>testUnSuccess:{{ testUnSuccess }}</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -155,10 +149,7 @@ export default { ...@@ -155,10 +149,7 @@ export default {
words: 3, words: 3,
page: 1, page: 1,
counter: 1, counter: 1,
orderId: "", countdown: 0,
testInfo: "",
testSuccess: "",
testUnSuccess: "",
}; };
}, },
...@@ -211,7 +202,6 @@ export default { ...@@ -211,7 +202,6 @@ export default {
// 网络请求,当支付失败时,跳转到支付页面 // 网络请求,当支付失败时,跳转到支付页面
_queryOrder() { _queryOrder() {
let orderId = utils.getCookie("orderId"); let orderId = utils.getCookie("orderId");
this.orderId = orderId;
let h5LogsObj = JSON.parse(decodeURI(utils.getCookie("h5LogsObj"))); let h5LogsObj = JSON.parse(decodeURI(utils.getCookie("h5LogsObj")));
let params = { let params = {
outTradeNo: orderId, outTradeNo: orderId,
...@@ -224,13 +214,18 @@ export default { ...@@ -224,13 +214,18 @@ 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;
if (status != 200) { let timer = setInterval(() => {
// 支付不成功 this.countdown += 1;
// this.$router.push({ path: "/pay", query: this.babyInfo }); if (status == 200) {
this.testUnSuccess = status; clearInterval(timer);
} else { } else {
this.testSuccess = status; // 支付不成功
} if (this.countdown < 4) {
this._queryOrder();
}
this.$router.push({ path: "/pay", query: this.babyInfo });
}
}, 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