| @@ -21,7 +21,8 @@ App({ | |||||
| }, | }, | ||||
| globalData: { | globalData: { | ||||
| userInfo: null, | userInfo: null, | ||||
| token: '' | |||||
| token: '', | |||||
| gameurl: ''// 游戏链接 | |||||
| }, | }, | ||||
| //登录-获取token | //登录-获取token | ||||
| loginGettoken(){ | loginGettoken(){ | ||||
| @@ -29,6 +29,8 @@ Page({ | |||||
| if (res.data.code == 0) { | if (res.data.code == 0) { | ||||
| let data = res.data.data | let data = res.data.data | ||||
| if(data.miniType==0){ | if(data.miniType==0){ | ||||
| getApp().globalData.gameurl=data.linkUrl | |||||
| console.log(getApp().globalData.gameurl) | |||||
| that.tabindex(data.linkUrl) | that.tabindex(data.linkUrl) | ||||
| }else{ | }else{ | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| @@ -83,7 +83,7 @@ Page({ | |||||
| }, | }, | ||||
| leave(){ | leave(){ | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/out/index?index=1&userid='+ this.data.userid+'&gameid=1'+'&type=2', | |||||
| url: '/pages/out/index?index=1&userid='+ this.data.userid+'&gameid=1'+'&type=2&url=' + getApp().globalData.gameurl, | |||||
| }) | }) | ||||
| }, | }, | ||||
| // 绑定用户头像信息 | // 绑定用户头像信息 | ||||
| @@ -18,7 +18,7 @@ Page({ | |||||
| let userInfo = getApp().globalData.userInfo | let userInfo = getApp().globalData.userInfo | ||||
| console.log(userInfo) | console.log(userInfo) | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/out/index?index=1&userid=${userInfo.id}&gameid=1&type=2`, | |||||
| url: `/pages/out/index?index=1&userid=${userInfo.id}&gameid=1&type=2&url=`+ getApp().globalData.gameurl | |||||
| }) | }) | ||||
| }, | }, | ||||
| /** | /** | ||||