Commit 56c2291e authored by 袁玲利's avatar 袁玲利

游戏排行榜问题修复

parent bef2d569
...@@ -175,17 +175,15 @@ export default { ...@@ -175,17 +175,15 @@ export default {
// 小程序游戏统计接口 // 小程序游戏统计接口
async GameStatistics() { async GameStatistics() {
$.ajax({ $.ajax({
url: url: gHost + "/wechat/svweapp/GameStatistics",
gHost +
"/wechat/svweapp/GameStatistics",
type: "post", type: "post",
dataType: "json", dataType: "json",
contentType: "application/x-www-form-urlencoded", contentType: "application/x-www-form-urlencoded",
data: this.params, data: this.params,
success: function (res) { success: function (res) {
if (res.code == 10000) { if (res.code == 10000) {
console.log(res) console.log(res);
return return;
} }
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
...@@ -231,10 +229,12 @@ export default { ...@@ -231,10 +229,12 @@ export default {
// 这里可以添加游戏启动逻辑,比如跳转到游戏页面,或打开游戏等 // 这里可以添加游戏启动逻辑,比如跳转到游戏页面,或打开游戏等
}, },
}, },
onUnload() { beforeDestroy() {
this.params.behavior = "viewPage"; this.params.behavior = "viewPage";
this.params.data = "closePage"; this.params.data = "closePage";
this.GameStatistics(); this.GameStatistics();
},
destroyed() {
if (this.timer !== null) { if (this.timer !== null) {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
......
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