Authored by ccbikai

明星 分享链接

@@ -105,6 +105,9 @@ const processIndexData = (list) => { @@ -105,6 +105,9 @@ const processIndexData = (list) => {
105 return formatData; 105 return formatData;
106 }; 106 };
107 107
  108 +const processShareUrl = (post) => {
  109 + return `${post.share.url}&openby:yohobuy={"action":"go.share","params":{"pic":"${helpers.image(post.src, 640, 640)}","title":"${post.title}","url":"${post.share.url}","content":"潮流资讯,新鲜贩售,YOHO!Buy有货【逛】不停"}}`; // eslint-disable-line
  110 +};
108 111
109 /** 112 /**
110 * 明星专题列表数据处理 113 * 明星专题列表数据处理
@@ -119,6 +122,9 @@ const processDetailData = (list) => { @@ -119,6 +122,9 @@ const processDetailData = (list) => {
119 122
120 _.forEach(list, (data) => { 123 _.forEach(list, (data) => {
121 data.publishTime = helpers.dateFormat('MM月DD日 hh:mm', data.publishTime); 124 data.publishTime = helpers.dateFormat('MM月DD日 hh:mm', data.publishTime);
  125 + if (data.share && data.share.url) {
  126 + data.share.url = processShareUrl(data);
  127 + }
122 formatData.push(data); 128 formatData.push(data);
123 }); 129 });
124 130
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <span class="see"><i class="iconfont see-ico">&#xe602;</i>{{viewsNum}}</span> 13 <span class="see"><i class="iconfont see-ico">&#xe602;</i>{{viewsNum}}</span>
14 <span class="collection"><i class="iconfont collected-ico {{#isCollected}} collected {{/isCollected}}">&#xe605;</i></span> 14 <span class="collection"><i class="iconfont collected-ico {{#isCollected}} collected {{/isCollected}}">&#xe605;</i></span>
15 15
16 - {{#if isApp}} 16 + {{#if ../isApp}}
17 {{#if share.url}} 17 {{#if share.url}}
18 <a href="{{share.url}}" class="iconfont forward">&#xe600;</a> 18 <a href="{{share.url}}" class="iconfont forward">&#xe600;</a>
19 {{/if}} 19 {{/if}}