diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 0d17cc0..79c8c58 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -4,6 +4,8 @@ var app = getApp(); const Http = require("../../../utils/HttpBasics"); const util = require("../../../utils/util"); const imgurl = require("../../../utils/imgurl"); +var ttParse = require('../../freeBannerDetail/ttParse/wxParse.js'); + Page({ data: { priceAndStockObj: {}, //存放价格和库存 @@ -602,23 +604,31 @@ Page({ } }, + getHtml(couponChannelId) { + const that = this Http.get({ url: config.api.couponHtmlDetail, data: { - couponChannelId: couponChannelId + couponChannelId: couponChannelId, + mallTenantId: this.data.mallTenantId || '' } }).then(res => { - console.log(res) if (res.code == 200 && res.data.html) { + const curHtml = decodeURI(res.data.html) this.setData({ - curHtml: decodeURI(res.data.html) + curHtml, }) + + console.log(curHtml, 'curHtml') + + var temp = ttParse.wxParse('article', 'html', curHtml, that, 5); + app.globalData.curHtml = this.data.curHtml; - console.log(app.globalData.curHtml) } }) }, + getSupId(id) { Http.get({ url: config.api.getSpuid, diff --git a/pages/coupon/detail/index.ttml b/pages/coupon/detail/index.ttml index e1d5c50..f4b1360 100644 --- a/pages/coupon/detail/index.ttml +++ b/pages/coupon/detail/index.ttml @@ -181,9 +181,12 @@ • {{data.private_room=="false"?'不可以使用':'可以使用'}}包间 使用规则 - {{data.remark}} - - + {{ data.remark }} + + + +