Authored by 肖亚东

资讯接口更换

@@ -81,7 +81,7 @@ Page({ @@ -81,7 +81,7 @@ Page({
81 type: 1, 81 type: 1,
82 }; 82 };
83 83
84 - GET(ACTIVITY_HOST + '/api/yohood/getNewsList', param) 84 + GET(YOHOOD_HOST + '/default/H5LoadNews', param)
85 .then(json => { 85 .then(json => {
86 if (json) { 86 if (json) {
87 var list = []; 87 var list = [];
@@ -77,25 +77,53 @@ Page({ @@ -77,25 +77,53 @@ Page({
77 }, 77 },
78 //资讯详情 78 //资讯详情
79 _getArticleExec: function() { 79 _getArticleExec: function() {
80 - let that = this;  
81 - return guangUtil._getArticle({  
82 - article_id: this.data.options.id  
83 - }, GET, ACTIVITY_HOST).then(data => { 80 + let that = this;
  81 + let param = {
  82 + id: this.data.options.id
  83 + }
  84 + GET(YOHOOD_HOST + '/mobileapi/getNewsDetail', param)
  85 + .then(json => {
  86 +
  87 + if (json && json.code == 200) {
  88 + let data = json.data;
  89 + wx.setNavigationBarTitle({title: data.title || '活动详情'});
  90 + var article = data.content0;
84 91
85 - wx.setNavigationBarTitle({title: data.title || '文章详情'});  
86 - var article = data.content0; 92 + WxParse.wxParse('replyTemArray', 'html', article, that, 0);
  93 + let replyTemArray = that.data.replyTemArray;
87 94
88 - WxParse.wxParse('replyTemArray', 'html', article, that, 0);  
89 - let replyTemArray = this.data.replyTemArray; 95 + console.log(replyTemArray);
90 96
91 - that.setData({  
92 - articleInfo: data,  
93 - replyTemArray,  
94 - }); 97 + that.setData({
  98 + articleInfo: data,
  99 + replyTemArray,
  100 + });
  101 + }
  102 + })
  103 + .catch(error => {
95 104
96 - return data;  
97 - }); 105 + })
98 }, 106 },
  107 + // _getArticleExec: function() {
  108 + // let that = this;
  109 + // return guangUtil._getArticle({
  110 + // article_id: this.data.options.id
  111 + // }, GET, ACTIVITY_HOST).then(data => {
  112 +
  113 + // wx.setNavigationBarTitle({title: data.title || '文章详情'});
  114 + // var article = data.content0;
  115 +
  116 + // WxParse.wxParse('replyTemArray', 'html', article, that, 0);
  117 + // let replyTemArray = this.data.replyTemArray;
  118 +
  119 + // that.setData({
  120 + // articleInfo: data,
  121 + // replyTemArray,
  122 + // });
  123 +
  124 + // return data;
  125 + // });
  126 + // },
99 127
100 //活动详情 128 //活动详情
101 _getActivityDetailExec: function() { 129 _getActivityDetailExec: function() {