Commit a751ed5e authored by malin's avatar malin

test

parent 93aefe04
......@@ -191,7 +191,16 @@ export default {
}
}, 1000);
this._payConfig();
// 监听滚动,当立即支付按钮消失时,将立刻获取按钮固定
// let payBtn = document.querySelector(".pay-btn");
// let top = payBtn.offsetTop + payBtn.clientHeight;
// window.onscroll = () => {
// if (window.pageYOffset >= top) {
// console.log(111);
// }
// };
this._payConfig(); // 获取支付价格
},
computed: {
......@@ -258,8 +267,6 @@ export default {
source: "toutiao",
});
console.log(params);
utils.setCookie("orderId", params.result.data.orderId, 0); // 将orderId添加到cookie中
// 上报 --> 信息收集
......
......@@ -144,6 +144,6 @@
.convert {
width: 3rem;
height: 1rem;
background-color: #b1d6fe;
background-color: #2080f0;
border-radius: 0.2rem;
}
\ No newline at end of file
......@@ -196,7 +196,34 @@ 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 {
// 支付不成功
this.$router.push({
path: "/pay",
query: JSON.parse(utils.getCookie("babyInfo")),
});
}
});
},
// 单双字切换
convertImg(item) {
this.page = 1;
this.words = item.words;
......
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