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}`,