Commit 8107f5b5 by 高淑倩

二维码优惠券

parent f5ffc2b2
...@@ -45,7 +45,12 @@ wxService.page({ ...@@ -45,7 +45,12 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log('--------', options)
this.setData({
id: options.id
},()=>{
this.getCouponDetail(this.data.id)
})
}, },
closeDialog() { closeDialog() {
this.setData({ this.setData({
...@@ -87,12 +92,7 @@ wxService.page({ ...@@ -87,12 +92,7 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
console.log('--------', this.options)
this.setData({
id: '638467647583031296'
},()=>{
this.getCouponDetail(this.data.id)
})
}, },
getCouponDetail(id){ getCouponDetail(id){
wx.showLoading({ wx.showLoading({
......
...@@ -266,6 +266,10 @@ class WXService extends Http { ...@@ -266,6 +266,10 @@ class WXService extends Http {
getTentacleContentByTentacleId(id) { getTentacleContentByTentacleId(id) {
this.post('/marketing/tentacleContent/queryTentacleContentById', { id: id }).then((res) => { this.post('/marketing/tentacleContent/queryTentacleContentById', { id: id }).then((res) => {
let data = res.data.data let data = res.data.data
if(!data){
return ;
}
let TENTACLE_CONTENT = { let TENTACLE_CONTENT = {
id: data.id, id: data.id,
tentacleType: data.type, tentacleType: data.type,
...@@ -597,6 +601,7 @@ class WXService extends Http { ...@@ -597,6 +601,7 @@ class WXService extends Http {
let idParam = decodeURIComponent(item['scene']).split('&')[0]; let idParam = decodeURIComponent(item['scene']).split('&')[0];
let shareId = idParam && idParam.split('=')[1] || 0 let shareId = idParam && idParam.split('=')[1] || 0
item['id'] = Integer.digit(shareId, 64, 10) item['id'] = Integer.digit(shareId, 64, 10)
// console.log(item['id'])
id = item['id']; id = item['id'];
} }
...@@ -607,6 +612,8 @@ class WXService extends Http { ...@@ -607,6 +612,8 @@ class WXService extends Http {
_self.getTentacleContentByTentacleId(id); _self.getTentacleContentByTentacleId(id);
} }
// console.log('args ----',args)
config.onLoad && config.onLoad.apply(page, args); config.onLoad && config.onLoad.apply(page, args);
}, },
onShow: function (...args) { onShow: function (...args) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment