| @@ -51,7 +51,8 @@ Page({ | |||||
| orderGroupId: '', | orderGroupId: '', | ||||
| merchantVoList: [], | merchantVoList: [], | ||||
| goHomeUrl: "", | 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 => { | }).then(res => { | ||||
| wx.stopPullDownRefresh(); | wx.stopPullDownRefresh(); | ||||
| let data = res.data; | 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) { | if (res && res.data && res.data.detailPicture) { | ||||
| that.setData({ | that.setData({ | ||||
| detailPicture: JSON.parse(res.data.detailPicture) | detailPicture: JSON.parse(res.data.detailPicture) | ||||