From b862f0740cf0ffb6b7b1b9e7dc1f8efefa28fe86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=B7=E6=B4=8B=E4=B9=8B=E5=A3=B0?= Date: Fri, 19 Oct 2018 11:11:12 +0800 Subject: [PATCH] ff --- pages/game/index.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pages/game/index.js b/pages/game/index.js index 26d7a6c..fdba2ce 100644 --- a/pages/game/index.js +++ b/pages/game/index.js @@ -12,12 +12,12 @@ Page({ onShareAppMessage: function (res) { let _this=this; return { - title: '自定义转发标题', + title: '富茂小游戏', path: 'pages/game/index', success: function (res) { // 转发成功 _this.setData({ - url: "https://game.youlane.cn/luckCard/index.html?token=" + app.globalData.token +'&forwardIf=true', + url: "https://game.youlane.cn/luckCard/index.html" + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id, // url: "http://10.11.195.31:8080/luckCard/?token=" + app.globalData.token + '&forwardIf=true' }); }, @@ -31,6 +31,16 @@ Page({ } } }, + onShow: function () { + // console.log(app.globalData.havePlayEd) + app.globalData.havePlayEd=true + let num = wx.getStorageSync('couponNum'); + if (num == 'couponNum') { + wx.showTabBarRedDot({ + index: 2 + }) + }; + }, onLoad(options) { console.log(options,999999999) if (options.share){ @@ -46,8 +56,8 @@ Page({ // console.log(res.data, 333); // }) this.setData({ - // url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id, - url: "http://10.11.195.31:8080/luckCard/" + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id, + url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id, + // url: "http://10.11.195.31:8080/luckCard/" + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id, }); } }