diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index 3a227bf..c1edabc 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -6,12 +6,16 @@ Page({ canIUse: wx.canIUse("button.open-type.getPhoneNumber"), couponChannelId: "", couponId: "", - path:null + path:null, + paramData:null }, onLoad: function (options) { if(options.path=='index'){ this.path = options.path } + this.setData({ + paramData: options + }) var that = this; console.log(options); if (options.couponChannelId && options.couponId) { @@ -57,8 +61,8 @@ Page({ console.log("这是从立即支付传回来的值 因为用户没有授权手机号"); app.globalData.phone = res.data.phone; if (that.path == 'index') { - wx.reLaunch({ - url: "/pages/game/index" + wx.redirectTo({ + url: "/pages/game/index?url=" + that.data.paramData.url + "&id=" + that.data.paramData.id + "&gameId=" + that.data.paramData.gameId, }) } else { wx.showToast({ diff --git a/pages/index/index.js b/pages/index/index.js index ed0b6a8..a9c6000 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -53,7 +53,7 @@ Page({ * */ wx.redirectTo({ - url: "/pages/getphoneInfo/index?path=index" + url: "/pages/getphoneInfo/index?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, }); } else if (err.code == 11006) { // 用户手机已加密