|
|
@@ -53,12 +53,17 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
*/ |
|
|
|
onLoad: function(options) { |
|
|
|
this.setData({ |
|
|
|
couponChannelId: options.couponChannelId, |
|
|
|
couponId: options.couponId ? options.couponId:'' |
|
|
|
}) |
|
|
|
if (options && options.couponChannelId) { |
|
|
|
this.getDetail(options.couponChannelId); |
|
|
|
} |
|
|
|
if (options && options.couponId) { |
|
|
|
this.getOneSpell(options.couponId) |
|
|
|
} |
|
|
|
console.log(this.data.couponId) |
|
|
|
this.getUserInfo(); |
|
|
|
}, |
|
|
|
/** |
|
|
@@ -603,14 +608,12 @@ Page({ |
|
|
|
* |
|
|
|
*/ |
|
|
|
wx.redirectTo({ |
|
|
|
url: "/pages/getphoneInfo/index?path=spell&couponChannelId=" + |
|
|
|
that.data.couponChannelId + '&couponId=' + that.data.couponId |
|
|
|
url: `/pages/getphoneInfo/index?path=spell&couponChannelId=${that.data.couponChannelId}&couponId=${that.data.data.couponId}` |
|
|
|
}); |
|
|
|
} else if (err.code == 11006) { |
|
|
|
// 用户手机已加密 |
|
|
|
wx.redirectTo({ |
|
|
|
url: "/pages/phoneinput/phoneinput?path=spell&couponChannelId=" + |
|
|
|
that.data.couponChannelId + '&couponId=' + that.data.couponId |
|
|
|
url: `/pages/phoneinput/phoneinput?path=spell&couponChannelId=${that.data.couponChannelId}&couponId=${that.data.data.couponId}` |
|
|
|
}); |
|
|
|
} else { |
|
|
|
wx.showToast({ |
|
|
@@ -735,6 +738,7 @@ Page({ |
|
|
|
*/ |
|
|
|
onPullDownRefresh: function(e) { |
|
|
|
let that = this; |
|
|
|
console.log(this.data.couponId,222) |
|
|
|
that.getDetail(that.data.couponChannelId); |
|
|
|
if (that.data.couponId) { |
|
|
|
that.getOneSpell(that.data.couponId) |
|
|
@@ -745,7 +749,7 @@ Page({ |
|
|
|
var that = this; |
|
|
|
var shareObj = { |
|
|
|
title: that.data.data.title, |
|
|
|
path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}&spellGroup=spellGroup`, |
|
|
|
path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.data.couponId}&spellGroup=spellGroup`, |
|
|
|
success: function (res) { |
|
|
|
if (res.errMsg == 'shareAppMessage:ok') { } |
|
|
|
}, |
|
|
@@ -756,7 +760,7 @@ Page({ |
|
|
|
// 来自页面内的按钮的转发 |
|
|
|
if (options.from == 'button') { |
|
|
|
var eData = options.target.dataset.id; |
|
|
|
shareObj.path = `/pages/index/index?couponChannelId=${eData}&spellGroup=spellGroup&frommd=JC`; |
|
|
|
shareObj.path = `/pages/index/index?couponChannelId=${eData}&couponId=${that.data.data.couponId}&spellGroup=spellGroup&frommd=JC`; |
|
|
|
} |
|
|
|
// 返回shareObj |
|
|
|
return shareObj; |
|
|
|