Authored by zhangxiaoru

editorial

... ... @@ -13,16 +13,16 @@ const brand = require('../models/brand');
* @param res
*/
const index = (req, res, next) => {
let channel = req.cookies._Channel || '301';
let channel = req.cookies._Channel || 'men';
let contentCode = '';
let name = '';
let link = '';
if (channel === '302') {
if (channel === 'women') {
contentCode = '527079e6c46d0f125eb46b835968971b';
name = 'WOMEN首页';
link = 'http://www.yohoblk.com/women';
} else if (channel === '303') {
} else if (channel === 'lifestyle') {
contentCode = '94b5ed607b6d565ffc29c2c04be121dc';
name = 'LIFT STYLE首页';
link = 'http://www.yohoblk.com/lifestyle';
... ...
... ... @@ -20,16 +20,16 @@ const index = (req, res, next) => {
let limit = req.query.limit || 20;
let appType = 1;
let udid = md5(req.ip);
let channel = req.cookies._Channel || '301';
let channel = req.cookies._Channel || 'men';
let gender = '';
let name = '';
let link = '';
if (channel === '301') {
if (channel === 'men') {
gender = '1,3';
name = 'MEN首页';
link = 'http://www.yohoblk.com';
} else if (channel === '302') {
} else if (channel === 'women') {
gender = '2,3';
name = 'WOMEN首页';
link = 'http://www.yohoblk.com/women';
... ... @@ -85,17 +85,17 @@ const list = (req, res) => {
let tag = req.query.query;
let authorId = req.query.authorId;
let udid = md5(req.ip);
let channel = req.cookies._Channel || '301';
let channel = req.cookies._Channel || 'men';
let gender = '';
let name = '';
let link = '';
let appType = 1;
if (channel === '301') {
if (channel === 'men') {
gender = '1,3';
name = 'MEN首页';
link = 'http://www.yohoblk.com';
} else if (channel === '302') {
} else if (channel === 'women') {
gender = '2,3';
name = 'WOMEN首页';
link = 'http://www.yohoblk.com/women';
... ... @@ -156,14 +156,14 @@ const detail = (req, res, next) => {
let appType = 1;
let uid = req.user.uid;
let udid = md5(req.ip);
let channel = req.cookies._Channel || '301';
let channel = req.cookies._Channel || 'men';
let name = '';
let link = '';
if (channel === '301') {
if (channel === 'men') {
name = 'MEN首页';
link = 'http://www.yohoblk.com';
} else if (channel === '302') {
} else if (channel === 'women') {
name = 'WOMEN首页';
link = 'http://www.yohoblk.com/women';
} else {
... ...
... ... @@ -196,10 +196,10 @@ const favorite = {
editorialList: data.data
};
_.forEach(retData.editorialList, function(val){
_.forEach(retData.editorialList, function(val) {
val.publishTime = val.publishTime.replace(/年|月/g, '/');
val.publishTime = val.publishTime.replace(/日/g, '');
})
});
retData.total = data.total;
... ...