Commit c8e4b7bb authored by 袁玲利's avatar 袁玲利

游戏排行榜传参表单格式

parent 48e52309
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
mounted() { mounted() {
this.games.sort(() => 0.5 - Math.random()); this.games.sort(() => 0.5 - Math.random());
this.params.userId = this.getQueryParams("userId"); this.params.userId = this.getQueryParams("userId");
this.params.sessionid = this.getQueryParams("sessionid") this.params.sessionid = this.getQueryParams("sessionid");
this.params.behavior = "viewPage"; this.params.behavior = "viewPage";
this.params.data = "gameOrder"; this.params.data = "gameOrder";
this.GameStatistics(); this.GameStatistics();
...@@ -174,25 +174,57 @@ export default { ...@@ -174,25 +174,57 @@ export default {
}, },
// 小程序游戏统计接口 // 小程序游戏统计接口
async GameStatistics() { async GameStatistics() {
try { $.ajax({
let url = gHost + "/wechat/svweapp/GameStatistics"; url:
let data = await this.$http.post( gHost +
{ "/report-push/student-consumer-report/queryPatriarchByStudent",
url: url, type: "get",
}, dataType: "json",
this.params contentType: "application/x-www-form-urlencoded",
); data: {
if (data.code != 10000) { phone: getQueryParams("phone"),
schoolId: getQueryParams("schoolId"),
userId: getQueryParams("userId"),
sessionid: getQueryParams("sessionid"),
wechattype: 1,
},
success: function (res) {
if (res.code == 10000) {
this_.consumerNameArr = res.obj.map((element) => element.name);
this_.consumerInfo = res.obj;
this_.specifiedConsumerInfo =
this_.consumerInfo[this_.consumerNameIndex];
}
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.message, title: res.message,
}); });
return; return;
} },
} catch (e) { error: function (error) {
console.log(e); reject(error);
} },
});
// try {
// let url = gHost + "/wechat/svweapp/GameStatistics";
// let data = await this.$http.post(
// {
// url: url,
// },
// this.params
// );
// if (data.code != 10000) {
// uni.showToast({
// icon: "none",
// mask: true,
// title: data.message,
// });
// return;
// }
// } catch (e) {
// console.log(e);
// }
}, },
launchGame(game) { launchGame(game) {
// uni.navigateToMiniProgram({ // uni.navigateToMiniProgram({
......
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