...
|
...
|
@@ -84,9 +84,9 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, reqQueryStr |
|
|
let collectUrl = 'javascript:;'; // 根据用户是否登录做处理的链接
|
|
|
|
|
|
if (!uid) {
|
|
|
let playUrlEncode = originUrl.replace(/\//g, '\\/');
|
|
|
let playUrlEncode = originUrl.replace(/\//g, '\\\/');
|
|
|
|
|
|
collectUrl = `${originUrl}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"${playUrlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`;
|
|
|
collectUrl = `${originUrl}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:${playUrlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`;
|
|
|
}
|
|
|
result.collect.url = collectUrl;
|
|
|
} else { // 点赞
|
...
|
...
|
@@ -110,7 +110,7 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, reqQueryStr |
|
|
// 编辑人员 app跳转url处理 20160601
|
|
|
let isLogin = uid ? true : false;
|
|
|
|
|
|
articleData.author.url = `${helpers.https(articleData.author.url)}&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"${articleData.author.author_id}"},"share":"","id":${articleData.author.author_id},"type":0,"islogin":"${isLogin}","url":"https:${helpers.urlFormat('/author/index', {uid: uid}, 'guang')}"}}&uid=${uid}`;
|
|
|
articleData.author.url = `${helpers.https(articleData.author.url)}&openby:yohobuy={"action":"go.h5","params":{"param":{},"share":"","id":${articleData.author.author_id},"type":0,"islogin":"${isLogin}","url":"${articleData.author.url}"}}`;
|
|
|
result.author = articleData.author;
|
|
|
if (result.author.avatar) {
|
|
|
result.author.avatar = result.author.avatar.replace('http://', '//');
|
...
|
...
|
@@ -282,8 +282,8 @@ const formatProduct = (productData, showTags, showNew, showSale, width, height, |
|
|
if (showTags) {
|
|
|
result.tags = {
|
|
|
is_new: showNew && productData.is_new === 'Y', // 新品
|
|
|
is_discount: showSale && productData.is_discount === 'Y', // 在售
|
|
|
is_limited: productData.is_limited && productData.is_limited === 'Y', // 限量
|
|
|
is_discount: showSale && productData.is_discount === 'Y', // 在售
|
|
|
is_limited: productData.is_limited && productData.is_limited === 'Y', // 限量
|
|
|
is_yohood: productData.is_yohood && productData.is_yohood === 'Y', // YOHOOD
|
|
|
midYear: productData.midear && productData.midear === 'Y', // 年中
|
|
|
yearEnd: productData.yearnd && productData.yearnd === 'Y', // 年末
|
...
|
...
|
@@ -294,7 +294,7 @@ const formatProduct = (productData, showTags, showNew, showSale, width, height, |
|
|
if (result.is_soon_sold_out && result.tags.is_discount) {
|
|
|
result.tags.is_new = false;
|
|
|
} else if (result.tags.is_discount &&
|
|
|
(result.tags.is_new || result.tags.is_limited || result.tags.is_yohood || result.tags.is_advance)// 打折与其它组合则隐藏打折
|
|
|
(result.tags.is_new || result.tags.is_limited || result.tags.is_yohood || result.tags.is_advance) // 打折与其它组合则隐藏打折
|
|
|
) {
|
|
|
result.tags.is_discount = false;
|
|
|
} else if (result.tags.is_yohood && result.tags.is_new) { // YOHOOD和新品组合显示YOHOOD
|
...
|
...
|
@@ -312,4 +312,4 @@ module.exports = { |
|
|
getFilterUrl,
|
|
|
formatProduct,
|
|
|
getProductIcon
|
|
|
}; |
|
|
}; |
|
|
\ No newline at end of file |
...
|
...
|
|