...
|
...
|
@@ -105,7 +105,7 @@ exports.collocation = (req, res) => { |
|
|
isStarDetailPage: true,
|
|
|
page: 'collocation'
|
|
|
}, processPublicData(req, '星潮教室'), {
|
|
|
headTab: headTab
|
|
|
headTab: pageHeadTab
|
|
|
}));
|
|
|
};
|
|
|
|
...
|
...
|
@@ -138,12 +138,20 @@ exports.collocationList = (req, res) => { |
|
|
exports.setFavorite = (req, res) => {
|
|
|
let params = req.body;
|
|
|
let uid = req.user.uid || 0;
|
|
|
let isApp = req.query.appVersion || false;
|
|
|
let url = '/guang/star/collocation';
|
|
|
let urlEncode = '';
|
|
|
|
|
|
starModel.setFavorite(params, uid).then((result) => {
|
|
|
if (result.code === 401) {
|
|
|
result.data = helpers.urlFormat('/signin.html', {
|
|
|
refer: req.get('Referer') || '/guang/star/collocation'
|
|
|
});
|
|
|
if (!isApp) {
|
|
|
result.data = helpers.urlFormat('/signin.html', {
|
|
|
refer: req.get('Referer') || url
|
|
|
});
|
|
|
} else {
|
|
|
urlEncode = '\\/guang\\/star\\/collocation';
|
|
|
result.data = `${url}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"${urlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`; // eslint-disable-line
|
|
|
}
|
|
|
}
|
|
|
res.json(result);
|
|
|
});
|
...
|
...
|
@@ -176,7 +184,7 @@ exports.detailList = (req, res) => { |
|
|
layout: false,
|
|
|
params: params,
|
|
|
list: result,
|
|
|
isApp: req.query.app_version || false
|
|
|
isApp: req.query.appVersion || false
|
|
|
}));
|
|
|
});
|
|
|
}; |
...
|
...
|
|