...
|
...
|
@@ -14,7 +14,6 @@ const brandModel = require(`${mRoot}/brand-list`); |
|
|
let channels = {
|
|
|
boys: 1,
|
|
|
girl: 2,
|
|
|
kids: 3,
|
|
|
lifestyle: 4
|
|
|
};
|
|
|
|
...
|
...
|
@@ -34,31 +33,32 @@ const index = (req, res, next) => { |
|
|
// }),
|
|
|
// title: '潮流优选',
|
|
|
width750: true,
|
|
|
categoryTab: true,
|
|
|
categoryTab: categoryTab === 'category' ? true : false,
|
|
|
channel: result.channel,
|
|
|
brandList: result.brandList
|
|
|
})
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
// const brandList = (req, res, next) => {
|
|
|
// let code = '7317a4701a1d3ddc8d93a5df77a63b75';
|
|
|
const brandList = (req, res, next) => {
|
|
|
let code;
|
|
|
let gender = req.query.gender || req.cookies._Channel && channels[req.cookies._Channel] || 1;
|
|
|
|
|
|
if (parseInt(gender) === 1) {
|
|
|
code = '7317a4701a1d3ddc8d93a5df77a63b75';
|
|
|
} else {
|
|
|
code = '84313c4b293a1c0aea985aa16a42a6b5';
|
|
|
}
|
|
|
|
|
|
// brandModel.getResourcesData(code).then(result => {
|
|
|
// res.render('brand/brand', {
|
|
|
// module: 'guang',
|
|
|
// page: 'brand-list',
|
|
|
// pageHeader: headerModel.setNav({
|
|
|
// navTitle: '潮流优选'
|
|
|
// }),
|
|
|
// title: '潮流优选',
|
|
|
// width750: true,
|
|
|
// categoryTab: true,
|
|
|
// channel: result
|
|
|
// })
|
|
|
// }).catch(next);
|
|
|
// };
|
|
|
brandModel.brandListData(code, gender).then(result => {
|
|
|
res.render('brand/brand-list', {
|
|
|
layout: false,
|
|
|
brandList: result.brandList
|
|
|
})
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
index
|
|
|
index,
|
|
|
brandList
|
|
|
}; |
...
|
...
|
|