From 9e095a3fdbef16831ce46c45c1e40b07c70735b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=96?= Date: Thu, 21 Mar 2019 10:21:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=89=AB=E7=A0=81=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 3373dcc..c29241f 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -28,13 +28,16 @@ Page({ }) console.log(this.data.newArr) if (this.data.newArr[0]=='JC'){ + /** + * 来自大屏跳转券详情 + */ + options.couponChannelId = this.data.newArr[1]; + }else if (this.data.newArr[0] == 'JG'){ + /** + * 来自大屏跳转拼团详情 + */ options.couponChannelId = this.data.newArr[1]; - } else if (this.data.newArr[0] == 'JH'){ - - } else if (this.data.newArr[0] == 'JB'){ - - } else if (this.data.newArr[0] == 'JG'){ - + options.path='daping' } } console.log(options.couponChannelId) @@ -78,6 +81,26 @@ Page({ }) return; } + /** + * 来自大屏的跳转拼团券详情 + */ + if (options && options.couponChannelId && options.path== 'daping'){ + /** + * 主要是为了拿couponId + */ + Http.get({ + url: config.api.couponDetail, + data: { + couponChannelId: couponChannelId + } + }).then(res => { + let data = res.data; + wx.redirectTo({ + url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${options.couponChannelId}&couponId=${data.couponId}` + }) + return; + }); + } if (options&&options.couponChannelId && !options.cuserId) { wx.redirectTo({ url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`,