...
|
...
|
@@ -43,6 +43,12 @@ const praiseArticle = (req, res, next) => { |
|
|
* 资讯文章收藏 (APP里显示收藏)
|
|
|
*/
|
|
|
const collectArticle = (req, res, next) => {
|
|
|
let allowOrigin = _.get(req, 'headers.origin', null) ?
|
|
|
req.headers.origin : req.protocol + '://' + req.headers.host;
|
|
|
|
|
|
res.setHeader('Access-Control-Allow-Origin', allowOrigin);
|
|
|
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
|
|
|
|
|
let result = {
|
|
|
code: 400,
|
|
|
message: '您未登录,无法收藏或者取消收藏。请先登录!',
|
...
|
...
|
|