...
|
...
|
@@ -79,11 +79,11 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, top) => { |
|
|
if (!articleData.id) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
let result = {
|
|
|
id: articleData.id,
|
|
|
showTags: showTag,
|
|
|
img: articleData.src ? helpers.image(articleData.src, 640, 640) : '',
|
|
|
url: isApp ? `//m.yohobuy.com/guang/info/${articleData.id}.html?openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${articleData.id}"},"shareparam":{"id":"${articleData.id}"},"share":"/guang/api/v1/share/guang","id":${articleData.id},"type":1,"url":"http://m.yohobuy.com/guang/info/${articleData.id}.html","islogin":"N"}}` : `//m.yohobuy.com/guang/info/${articleData.id}.html`, //eslint-disable-line
|
|
|
title: articleData.title,
|
|
|
text: articleData.intro,
|
|
|
publishTime: articleData.publish_time,
|
...
|
...
|
@@ -91,6 +91,20 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, top) => { |
|
|
pageView: articleData.views_num
|
|
|
};
|
|
|
|
|
|
if (isApp) {
|
|
|
if (articleData.url.indexOf('guang.m.yohobuy.com') < 0) {
|
|
|
result.url = `${helpers.https(articleData.url)}?openby:yohobuy={"url":"${articleData.url}","islogin":"N"}}`;
|
|
|
} else {
|
|
|
result.url = `//m.yohobuy.com/guang/info/${articleData.id}.html?openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${articleData.id}"},"shareparam":{"id":"${articleData.id}"},"share":"/guang/api/v1/share/guang","id":${articleData.id},"type":1,"url":"http://m.yohobuy.com/guang/info/${articleData.id}.html","islogin":"N"}}`;
|
|
|
}
|
|
|
} else {
|
|
|
if (articleData.url.indexOf('guang.m.yohobuy.com') < 0) {
|
|
|
result.url = articleData.url;
|
|
|
} else {
|
|
|
result.url = `//m.yohobuy.com/guang/info/${articleData.id}.html`;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (result.url.includes('feature.yoho.cn') ||
|
|
|
result.url.includes('cdn.yoho.cn')) {
|
|
|
result.url = transHttpsUrl(result.url);
|
...
|
...
|
|