Commit 26a39595 authored by malin's avatar malin

t

parent 146d4d77
...@@ -269,8 +269,6 @@ export default { ...@@ -269,8 +269,6 @@ export default {
utils.setCookie("orderId", params.result.data.orderId, 0); // 将orderId添加到cookie中 utils.setCookie("orderId", params.result.data.orderId, 0); // 将orderId添加到cookie中
// this._queryOrder();
// 上报 --> 信息收集 // 上报 --> 信息收集
API.API_h5Logs({ API.API_h5Logs({
outTradeNo: params.result.data.orderId, outTradeNo: params.result.data.orderId,
...@@ -300,32 +298,6 @@ export default { ...@@ -300,32 +298,6 @@ export default {
}); });
}, },
_queryOrder() {
let orderId = utils.getCookie("orderId");
let h5LogsObj = JSON.parse(decodeURI(utils.getCookie("h5LogsObj")));
let params = {
outTradeNo: orderId,
payPlatform: 1,
payType: 2,
wxType: "H5Page",
// pkg: h5LogsObj.pkg
pkg: "com.h5game.bbqm",
};
API.API_gatewayQueryOrder(params).then((res) => {
let status = res.result.data.status;
if (status == 200) {
// 支付成功
return;
} else if (status == 500) {
// 支付不成功
this.$router.push({
path: "/pay",
query: this.babyInfo,
});
}
});
},
// 倒计时 // 倒计时
showtime(endTime) { showtime(endTime) {
let nowTime = new Date().getTime(); let nowTime = new Date().getTime();
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
} }
.name-list>div:nth-child(2n-1) { .name-list>div:nth-child(2n-1) {
border-right: 1px dashed #7EBBFF; border-right: 1px solid #7EBBFF;
} }
.img5 { .img5 {
......
...@@ -156,7 +156,9 @@ export default { ...@@ -156,7 +156,9 @@ export default {
mounted() { mounted() {
this.babyInfo = JSON.parse(utils.getCookie("babyInfo")); // 将宝宝信息解析出来 this.babyInfo = JSON.parse(utils.getCookie("babyInfo")); // 将宝宝信息解析出来
this._queryOrder(); // 查询是否支付成功 setTimeout(() => {
this._queryOrder(); // 查询是否支付成功
}, 1000);
this.getBabyInfo(); this.getBabyInfo();
this._fetchName(); this._fetchName();
}, },
...@@ -218,18 +220,13 @@ export default { ...@@ -218,18 +220,13 @@ export default {
return; return;
} else { } else {
// 支付不成功 // 支付不成功
// if () {
// return location.reload();
// } else {
// this.$router.push({ path: "/pay", query: this.babyInfo });
// }
setTimeout(() => { setTimeout(() => {
if (this.countdown == 1) { if (this.countdown == 1) {
return this.$router.push({ path: "/pay", query: this.babyInfo }); return this.$router.push({ path: "/pay", query: this.babyInfo });
} }
this.countdown += 1; this.countdown += 1;
this._queryOrder(); this._queryOrder();
}, 3000); }, 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