...
|
...
|
@@ -9,6 +9,7 @@ |
|
|
const moment = require('moment');
|
|
|
const md5 = require('md5');
|
|
|
const requestIp = require('request-ip');
|
|
|
const _ = require('lodash');
|
|
|
const helpers = global.yoho.helpers;
|
|
|
|
|
|
/* COOKIE标识访问的是男生频道 */
|
...
|
...
|
@@ -57,13 +58,18 @@ const getUdid = (req) => { |
|
|
*/
|
|
|
const getArticleUrl = (url, id) => {
|
|
|
|
|
|
/* 格式由url:{url:'aaa'} 更改为 url: 'aaa'
|
|
|
try {
|
|
|
let urlObj = JSON.parse(url);
|
|
|
|
|
|
if (urlObj && urlObj['url']) {
|
|
|
return urlObj['url'];
|
|
|
}
|
|
|
} catch (e) {}
|
|
|
} catch (e) {}*/
|
|
|
|
|
|
if(_.isString(url) && _.trim(url) !== '') {
|
|
|
return url;
|
|
|
}
|
|
|
|
|
|
return helpers.urlFormat(`/detail/${id}.html`, null, 'guang');
|
|
|
};
|
...
|
...
|
|