Commit 26a39595 authored by malin's avatar malin

t

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