From 16be1adcbcc2f37d9942acaf0bdf2a44ffbf3090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=B7=E6=B4=8B=E4=B9=8B=E5=A3=B0?= Date: Tue, 30 Oct 2018 13:40:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=9B=BA=E5=AE=9A=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E5=85=A5=E5=8F=A3=E6=89=8B=E6=9C=BA=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E8=BF=94=E5=9B=9E=E6=B8=B8=E6=88=8F=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8F=82=E6=95=B0=E6=94=B9=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/getphoneInfo/index.js | 10 +++++++--- pages/index/index.js | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) 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) { // 用户手机已加密