Commit 990ee231 authored by 袁玲利's avatar 袁玲利

Merge branch 'v_req_11.2' into develop

parents 510f2e22 d03faeeb
......@@ -617,7 +617,7 @@
"path": "pages/gameOrder/gameOrder",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "游戏排行榜",
"navigationBarTitleText": "为你推荐",
"enablePullDownRefresh": false
}
......
......@@ -114,19 +114,6 @@ export default {
};
},
mounted() {
const that = this;
// 监听返回
this.pushHistory();
window.addEventListener(
"popstate",
function (e) {
// 为了避免只调用一次
that.pushHistory("title1");
// 自定义方法, 直接关闭网页或返回小程序上一页
that.goBack();
},
false
);
this.games.sort(() => 0.5 - Math.random());
this.params.userid = this.getQueryParams("userId");
this.params.sessionid = this.getQueryParams("sessionid");
......@@ -136,23 +123,10 @@ export default {
this.init();
},
methods: {
// 添加一条 history 实体作为替代原来的 history 实体
pushHistory(str = "title", url = "#") {
const state = {
title: str,
url,
};
window.history.pushState(state, state.title, state.url);
},
goBack() {
console.log('游戏排行榜的物理返回按钮')
wx.miniProgram.postMessage({ data: { behavior: 'back'} })
},
init() {
const self = this;
this.timer = setInterval(() => {
this.second += 1;
console.log(this.second, "xxxxxxxxx");
if (this.second == 5) {
self.params.behavior = "duration";
self.params.data = "5s";
......@@ -254,8 +228,9 @@ export default {
},
},
onHide() {
this.params.behavior = "viewPage";
this.params.data = "closePage";
console.log('2222')
this.params.behavior = "closePage";
this.params.data = "gameOrder";
this.GameStatistics();
if (this.timer !== null) {
clearInterval(this.timer);
......
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