diff --git a/app.json b/app.json index a3f7e52..21171b1 100644 --- a/app.json +++ b/app.json @@ -34,5 +34,5 @@ "uploadFile": 10000, "downloadFile": 10000 }, - "debug":true + "debug":false } \ No newline at end of file diff --git a/pages/detail/detail.js b/pages/detail/detail.js index 834136f..7f6b37c 100644 --- a/pages/detail/detail.js +++ b/pages/detail/detail.js @@ -20,7 +20,7 @@ Page({ newsid:"", title:"", imgsrc:"", - wxParseData:"", + article:"", comments:0, popularity:0, long_comments:0, @@ -68,15 +68,19 @@ Page({ }, success: function(res) { console.log(res.data) - + console.log(res.data.body) // //html解析 // var str = util.coder(res.data.body); + + var article = res.data.body; + WxParse.wxParse('article', 'html', article, _this,0); + + // wxParseData: WxParse('html', res.data.body)//使用WxParse组件解析html markdow解析将html替换成md _this.setData({ newsid:res.data.id, title:res.data.title, - imgsrc:res.data.image, - wxParseData:WxParse('html',res.data.body)//使用WxParse组件解析html markdow解析将html替换成md + imgsrc:res.data.image }) diff --git a/pages/detail/detail.json b/pages/detail/detail.json index 049c270..eeccea4 100644 --- a/pages/detail/detail.json +++ b/pages/detail/detail.json @@ -1,3 +1,3 @@ { - "navigationBarTitleText": "知乎日报详情" + "navigationBarTitleText": "日报详情" } \ No newline at end of file diff --git a/pages/detail/detail.wxml b/pages/detail/detail.wxml index 7032148..d3c1fbe 100644 --- a/pages/detail/detail.wxml +++ b/pages/detail/detail.wxml @@ -5,18 +5,34 @@ - - + - -