...
|
...
|
@@ -80,13 +80,17 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, reqQueryStr |
|
|
if (isApp) {
|
|
|
result.collect = {};
|
|
|
result.collect.isCollected = articleData.isFavor === true;
|
|
|
let originUrl = helpers.urlFormat(articleData.reqPath || '/author/index', null, 'guang'); // 跳转回的链接
|
|
|
let colparam = articleData.colparam || {
|
|
|
urlpath: '',
|
|
|
param: ''
|
|
|
}
|
|
|
let originUrl = helpers.urlFormat(colparam.urlpath || '/author/index', null, 'guang'); // 跳转回的链接
|
|
|
let collectUrl = 'javascript:;'; // 根据用户是否登录做处理的链接
|
|
|
|
|
|
if (!uid) {
|
|
|
let playUrlEncode = originUrl.replace(/\//g, '\\\/');
|
|
|
let playUrlEncode = `${originUrl}${colparam.param}`.replace(/\//g, '\\\/');
|
|
|
|
|
|
collectUrl = `${originUrl}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:${playUrlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`;
|
|
|
collectUrl = `${originUrl}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"${playUrlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`;
|
|
|
}
|
|
|
result.collect.url = collectUrl;
|
|
|
} else { // 点赞
|
...
|
...
|
|