Authored by zhangxiaoru

editorial

@@ -13,16 +13,16 @@ const brand = require('../models/brand'); @@ -13,16 +13,16 @@ const brand = require('../models/brand');
13 * @param res 13 * @param res
14 */ 14 */
15 const index = (req, res, next) => { 15 const index = (req, res, next) => {
16 - let channel = req.cookies._Channel || '301'; 16 + let channel = req.cookies._Channel || 'men';
17 let contentCode = ''; 17 let contentCode = '';
18 let name = ''; 18 let name = '';
19 let link = ''; 19 let link = '';
20 20
21 - if (channel === '302') { 21 + if (channel === 'women') {
22 contentCode = '527079e6c46d0f125eb46b835968971b'; 22 contentCode = '527079e6c46d0f125eb46b835968971b';
23 name = 'WOMEN首页'; 23 name = 'WOMEN首页';
24 link = 'http://www.yohoblk.com/women'; 24 link = 'http://www.yohoblk.com/women';
25 - } else if (channel === '303') { 25 + } else if (channel === 'lifestyle') {
26 contentCode = '94b5ed607b6d565ffc29c2c04be121dc'; 26 contentCode = '94b5ed607b6d565ffc29c2c04be121dc';
27 name = 'LIFT STYLE首页'; 27 name = 'LIFT STYLE首页';
28 link = 'http://www.yohoblk.com/lifestyle'; 28 link = 'http://www.yohoblk.com/lifestyle';
@@ -20,16 +20,16 @@ const index = (req, res, next) => { @@ -20,16 +20,16 @@ const index = (req, res, next) => {
20 let limit = req.query.limit || 20; 20 let limit = req.query.limit || 20;
21 let appType = 1; 21 let appType = 1;
22 let udid = md5(req.ip); 22 let udid = md5(req.ip);
23 - let channel = req.cookies._Channel || '301'; 23 + let channel = req.cookies._Channel || 'men';
24 let gender = ''; 24 let gender = '';
25 let name = ''; 25 let name = '';
26 let link = ''; 26 let link = '';
27 27
28 - if (channel === '301') { 28 + if (channel === 'men') {
29 gender = '1,3'; 29 gender = '1,3';
30 name = 'MEN首页'; 30 name = 'MEN首页';
31 link = 'http://www.yohoblk.com'; 31 link = 'http://www.yohoblk.com';
32 - } else if (channel === '302') { 32 + } else if (channel === 'women') {
33 gender = '2,3'; 33 gender = '2,3';
34 name = 'WOMEN首页'; 34 name = 'WOMEN首页';
35 link = 'http://www.yohoblk.com/women'; 35 link = 'http://www.yohoblk.com/women';
@@ -85,17 +85,17 @@ const list = (req, res) => { @@ -85,17 +85,17 @@ const list = (req, res) => {
85 let tag = req.query.query; 85 let tag = req.query.query;
86 let authorId = req.query.authorId; 86 let authorId = req.query.authorId;
87 let udid = md5(req.ip); 87 let udid = md5(req.ip);
88 - let channel = req.cookies._Channel || '301'; 88 + let channel = req.cookies._Channel || 'men';
89 let gender = ''; 89 let gender = '';
90 let name = ''; 90 let name = '';
91 let link = ''; 91 let link = '';
92 let appType = 1; 92 let appType = 1;
93 93
94 - if (channel === '301') { 94 + if (channel === 'men') {
95 gender = '1,3'; 95 gender = '1,3';
96 name = 'MEN首页'; 96 name = 'MEN首页';
97 link = 'http://www.yohoblk.com'; 97 link = 'http://www.yohoblk.com';
98 - } else if (channel === '302') { 98 + } else if (channel === 'women') {
99 gender = '2,3'; 99 gender = '2,3';
100 name = 'WOMEN首页'; 100 name = 'WOMEN首页';
101 link = 'http://www.yohoblk.com/women'; 101 link = 'http://www.yohoblk.com/women';
@@ -156,14 +156,14 @@ const detail = (req, res, next) => { @@ -156,14 +156,14 @@ const detail = (req, res, next) => {
156 let appType = 1; 156 let appType = 1;
157 let uid = req.user.uid; 157 let uid = req.user.uid;
158 let udid = md5(req.ip); 158 let udid = md5(req.ip);
159 - let channel = req.cookies._Channel || '301'; 159 + let channel = req.cookies._Channel || 'men';
160 let name = ''; 160 let name = '';
161 let link = ''; 161 let link = '';
162 162
163 - if (channel === '301') { 163 + if (channel === 'men') {
164 name = 'MEN首页'; 164 name = 'MEN首页';
165 link = 'http://www.yohoblk.com'; 165 link = 'http://www.yohoblk.com';
166 - } else if (channel === '302') { 166 + } else if (channel === 'women') {
167 name = 'WOMEN首页'; 167 name = 'WOMEN首页';
168 link = 'http://www.yohoblk.com/women'; 168 link = 'http://www.yohoblk.com/women';
169 } else { 169 } else {
@@ -196,10 +196,10 @@ const favorite = { @@ -196,10 +196,10 @@ const favorite = {
196 editorialList: data.data 196 editorialList: data.data
197 }; 197 };
198 198
199 - _.forEach(retData.editorialList, function(val){ 199 + _.forEach(retData.editorialList, function(val) {
200 val.publishTime = val.publishTime.replace(/年|月/g, '/'); 200 val.publishTime = val.publishTime.replace(/年|月/g, '/');
201 val.publishTime = val.publishTime.replace(/日/g, ''); 201 val.publishTime = val.publishTime.replace(/日/g, '');
202 - }) 202 + });
203 203
204 204
205 retData.total = data.total; 205 retData.total = data.total;