Authored by 沈志敏

fix bug

... ... @@ -47,6 +47,7 @@ const editor = (req, res, next) => {
if (articleListData.data && articleListData.data.list && articleListData.data.list.artList) {
articleListData.data.list.artList.forEach(articleData => {
articleData.reqPath = `${req.path}?id=${id}`;
build.push(guangProcess.formatArticle(articleData, true, isApp, false, uid));
});
res.render('index/list', Object.assign({
... ... @@ -194,11 +195,10 @@ const tag = (req, res, next) => {
gender: req.query.gender || '1,3',
uid: req.user.uid || req.query.uid || 0,
udid: req.sessionID,
type: req.query.type || 0
type: req.query.type || 0,
path: req.path
};
responseData.pageHeader.navTitle = param.tag || '标签';
... ...
... ... @@ -290,6 +290,10 @@ const getTagEditor = (param) => {
let infoList = result[0].data.list.artList;
infoList.forEach(val => {
val.reqPath = param.path;
if (param.tag) {
val.reqPath = `${val.reqPath}?query=${param.tag}`;
}
inf.push(guangProcess.formatArticle(val, true, param.isApp, true));
});
... ...
... ... @@ -80,7 +80,7 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, reqQueryStr
if (isApp) {
result.collect = {};
result.collect.isCollected = articleData.isFavor === true;
let originUrl = helpers.urlFormat('/author/index', null, 'guang'); // 跳转回的链接
let originUrl = helpers.urlFormat(articleData.reqPath || '/author/index', null, 'guang'); // 跳转回的链接
let collectUrl = 'javascript:;'; // 根据用户是否登录做处理的链接
if (!uid) {
... ...