...
|
...
|
@@ -23,16 +23,20 @@ const index = (req, res, next) => { |
|
|
let channel = req.cookies._Channel || 'women';
|
|
|
let gender = '';
|
|
|
let name = '';
|
|
|
let link = '';
|
|
|
|
|
|
if (channel === 'men') {
|
|
|
gender = '1,3';
|
|
|
name = 'MEN首页';
|
|
|
link = 'http://www.yohoblk.com';
|
|
|
} else if (channel === 'women') {
|
|
|
gender = '2,3';
|
|
|
name = 'WOMEN首页';
|
|
|
link = 'http://www.yohoblk.com/women';
|
|
|
} else {
|
|
|
gender = '3,3';
|
|
|
name = ' LIFESTYLE首页';
|
|
|
name = 'LIFESTYLE首页';
|
|
|
link = 'http://www.yohoblk.com/lifestyle';
|
|
|
}
|
|
|
|
|
|
editorialModel.getIndexData(pageNum, limit, appType, udid, gender).then((result) => {
|
...
|
...
|
@@ -44,7 +48,7 @@ const index = (req, res, next) => { |
|
|
editorial: {
|
|
|
nav: [
|
|
|
{
|
|
|
link: '/editorial?type=0',
|
|
|
link: link,
|
|
|
pathTitle: '首页',
|
|
|
name: name
|
|
|
},
|
...
|
...
|
@@ -84,16 +88,20 @@ const list = (req, res) => { |
|
|
let channel = req.cookies._Channel || 'men';
|
|
|
let gender = '';
|
|
|
let name = '';
|
|
|
let link = '';
|
|
|
|
|
|
if (channel === 'men') {
|
|
|
gender = '1,3';
|
|
|
name = 'MEN首页';
|
|
|
link = 'http://www.yohoblk.com';
|
|
|
} else if (channel === 'women') {
|
|
|
gender = '2,3';
|
|
|
name = 'WOMEN首页';
|
|
|
link = 'http://www.yohoblk.com/women';
|
|
|
} else {
|
|
|
gender = '3,3';
|
|
|
name = ' LIFESTYLE首页';
|
|
|
name = 'LIFESTYLE首页';
|
|
|
link = 'http://www.yohoblk.com/lifestyle';
|
|
|
}
|
|
|
|
|
|
editorialModel.getListData(pageNum, limit, tag, authorId, udid, gender).then((result) => {
|
...
|
...
|
@@ -105,12 +113,12 @@ const list = (req, res) => { |
|
|
editorialList: {
|
|
|
nav: [
|
|
|
{
|
|
|
link: '/editorial?type=0',
|
|
|
link: link,
|
|
|
pathTitle: '首页',
|
|
|
name: name
|
|
|
},
|
|
|
{
|
|
|
link: '/editorial?type=1',
|
|
|
link: 'http://www.yohoblk.com/editorial',
|
|
|
pathTitle: '资讯',
|
|
|
name: '资讯'
|
|
|
},
|
...
|
...
|
@@ -145,21 +153,37 @@ const list = (req, res) => { |
|
|
const detail = (req, res, next) => {
|
|
|
let id = req.params.id;
|
|
|
let appType = 1;
|
|
|
let uid = req.user.uid;
|
|
|
let udid = md5(req.ip);
|
|
|
let channel = req.cookies._Channel || 'men';
|
|
|
let name = '';
|
|
|
let link = '';
|
|
|
|
|
|
if (channel === 'men') {
|
|
|
name = 'MEN首页';
|
|
|
link = 'http://www.yohoblk.com';
|
|
|
} else if (channel === 'women') {
|
|
|
name = 'WOMEN首页';
|
|
|
link = 'http://www.yohoblk.com/women';
|
|
|
} else {
|
|
|
name = 'LIFESTYLE首页';
|
|
|
link = 'http://www.yohoblk.com/lifestyle';
|
|
|
}
|
|
|
|
|
|
editorialModel.getDetailData(id, appType).then((result) => {
|
|
|
editorialModel.getDetailData(id, uid, udid, appType).then((result) => {
|
|
|
res.display('detail', {
|
|
|
module: 'editorial',
|
|
|
page: 'detail',
|
|
|
title: '资讯详情',
|
|
|
title: result.head.title,
|
|
|
editorialDetail: {
|
|
|
nav: [
|
|
|
{
|
|
|
link: '#',
|
|
|
link: link,
|
|
|
pathTitle: '首页',
|
|
|
name: 'MEN首页'
|
|
|
name: name
|
|
|
},
|
|
|
{
|
|
|
link: '/editorial?type=1',
|
|
|
link: 'http://www.yohoblk.com/editorial',
|
|
|
pathTitle: '资讯',
|
|
|
name: '资讯'
|
|
|
},
|
...
|
...
|
|