Browse Source

大屏扫码跳转修改

tags/安徽版C.4.1.6最终版
刘晖 6 years ago
parent
commit
9e095a3fdb
1 changed files with 29 additions and 6 deletions
  1. +29
    -6
      pages/index/index.js

+ 29
- 6
pages/index/index.js View File

@@ -28,13 +28,16 @@ Page({
}) })
console.log(this.data.newArr) console.log(this.data.newArr)
if (this.data.newArr[0]=='JC'){ 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]; 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) console.log(options.couponChannelId)
@@ -78,6 +81,26 @@ Page({
}) })
return; 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) { if (options&&options.couponChannelId && !options.cuserId) {
wx.redirectTo({ wx.redirectTo({
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`, url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`,


Loading…
Cancel
Save