brand.js
1.56 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
/**
* 品牌一览
* @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 = '';
if (channel === 'women') {
contentCode = '527079e6c46d0f125eb46b835968971b';
name = 'WOMEN首页';
link = 'http://www.yohoblk.com/women';
} else if (channel === 'lifestyle') {
contentCode = '94b5ed607b6d565ffc29c2c04be121dc';
name = 'LIFT STYLE首页';
link = 'http://www.yohoblk.com/lifestyle';
} else {
contentCode = '81886aaa5e82e3741bc1ba1e04ec7706';
name = 'MEN首页';
link = 'http://www.yohoblk.com';
}
let appType = 1;
brand.getListData(contentCode, channel, appType).then((result) => {
res.display('index', {
module: 'brand',
page: 'index',
title: '品牌',
brand: {
nav: [
{
link: link,
pathTitle: '首页',
name: name
},
{
link: '',
pathTitle: '品牌',
name: 'Brand品牌'
}
],
tabs: result.tabs,
category: result.category
}
});
}).catch(next);
};
module.exports = {
index // 品牌一览
};