diff --git a/pages/spellGroup/mySpellGroup/index.js b/pages/spellGroup/mySpellGroup/index.js index 04f9e1d..4c4ba6a 100644 --- a/pages/spellGroup/mySpellGroup/index.js +++ b/pages/spellGroup/mySpellGroup/index.js @@ -51,7 +51,8 @@ Page({ orderGroupId: '', merchantVoList: [], goHomeUrl: "", - mallList: '' + mallList: '', + contentType: '' }, /** @@ -433,6 +434,26 @@ Page({ } }); }, + + getHtml(couponChannelId) { + Http.get({ + url: config.api.couponHtmlDetail, + data: { + couponChannelId: couponChannelId + } + }).then(res => { + console.log(res) + if (res.code == 200 && res.data.html) { + this.setData({ + curHtml: decodeURI(res.data.html), + type: res.data.type + }) + app.globalData.curHtml = this.data.curHtml; + console.log(app.globalData.curHtml) + } + }) + }, + /** * 获取券详情信息 */ @@ -446,6 +467,13 @@ Page({ }).then(res => { wx.stopPullDownRefresh(); let data = res.data; + if (res.data.contentType != undefined && res.data.contentType == 1) { + //获取图文展示详情html + this.setData({ + contentType: res.data.contentType + }) + this.getHtml(couponChannelId); + } if (res && res.data && res.data.detailPicture) { that.setData({ detailPicture: JSON.parse(res.data.detailPicture)