|
|
|
@@ -5,12 +5,12 @@ Page({ |
|
|
|
data: { |
|
|
|
token: '', |
|
|
|
userInfo: null, |
|
|
|
paramsid: ''// 邀请人ID |
|
|
|
shareid: ''// 邀请人ID |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
console.log(option.id) |
|
|
|
this.setData({ |
|
|
|
paramsid: option.id |
|
|
|
shareid: option.id |
|
|
|
}) |
|
|
|
this.loginGettoken() |
|
|
|
}, |
|
|
|
@@ -29,7 +29,7 @@ Page({ |
|
|
|
if (res.data.code == 0) { |
|
|
|
let data = res.data.data |
|
|
|
// gameVersion为指定发版,和后台是否保持一致,方便提审通过,后续只需更改1为2,3,4,5... |
|
|
|
if(data.miniType==0&&data.gameVersion==2){ |
|
|
|
if(data.miniType==0&&data.gameVersion==3){ |
|
|
|
getApp().globalData.gameurl = data.linkUrl |
|
|
|
that.tabindex(data.linkUrl) |
|
|
|
}else{ |
|
|
|
@@ -73,12 +73,12 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
tabindex(url) { |
|
|
|
let id = 0 |
|
|
|
let openid = 0 |
|
|
|
if(this.data.userInfo.phone){ |
|
|
|
id = this.data.userInfo.id |
|
|
|
openid = this.data.userInfo.openid |
|
|
|
} |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/out/index?index=1&userid=' + id+ '&gameid=1&type=1&url='+url |
|
|
|
url: '/pages/out/index?index=1&openid=' + openid+ '&gameid=1&type=1&url='+url |
|
|
|
}) |
|
|
|
}, |
|
|
|
saoma() { |
|
|
|
@@ -107,8 +107,8 @@ Page({ |
|
|
|
token: res1.data.access_token, |
|
|
|
userInfo: res1.data.user_info |
|
|
|
}) |
|
|
|
if(that.data.paramsid){ // 有ID则是通过分享链接进来的 |
|
|
|
that.inviteFun(that.data.paramsid) |
|
|
|
if(that.data.shareid){ // 有ID则是通过分享链接进来的 |
|
|
|
that.inviteFun(that.data.shareid) |
|
|
|
} |
|
|
|
getApp().globalData.token = res1.data.access_token |
|
|
|
getApp().globalData.userInfo = res1.data.user_info |
|
|
|
|