brand.js
1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* 品牌一览
* @author: zxr
* @date: 2016/07/13
*/
'use strict';
const brand = require('../models/brand');
/**
* 品牌一览数据
* @param req
* @param res
*/
const index = (req, res, next) => {
let channel = req.cookies._Channel || 'men';
let contentCode = '';
let name = '';
let link = '';
let gender = '';
if (channel === 'women') {
contentCode = '527079e6c46d0f125eb46b835968971b';
name = 'WOMEN首页';
link = '//www.yohoblk.com/women';
channel = 302;
gender = '2,3';
} else if (channel === 'lifestyle') {
contentCode = '94b5ed607b6d565ffc29c2c04be121dc';
name = 'LIFT STYLE首页';
link = '//www.yohoblk.com/lifestyle';
channel = 303;
gender = '1,2,3';
} else {
contentCode = '81886aaa5e82e3741bc1ba1e04ec7706';
name = 'MEN首页';
link = '//www.yohoblk.com';
channel = 301;
gender = '1,3';
}
let appType = 1;
brand.getListData(contentCode, channel, gender, appType).then((result) => {
res.display('index', {
module: 'brand',
page: 'index',
title: '品牌',
brand: {
nav: [
{
link: link,
pathTitle: '首页',
name: name
},
{
link: '',
pathTitle: '品牌',
name: 'Brand品牌'
}
],
gender: gender,
tabs: result.tabs,
category: result.category
}
});
}).catch(next);
};
module.exports = {
index // 品牌一览
};