...
|
...
|
@@ -6,7 +6,6 @@ |
|
|
|
|
|
'use strict';
|
|
|
const mRoot = '../models';
|
|
|
|
|
|
const outlets = require(`${mRoot}/outlets`);
|
|
|
|
|
|
// 开发用模拟数据
|
...
|
...
|
@@ -50,7 +49,7 @@ exports.index = (req, res) => { |
|
|
exports.channel = (req, res) => {
|
|
|
let resData = {
|
|
|
module: 'product',
|
|
|
page: 'outlets',
|
|
|
page: 'outlets'
|
|
|
};
|
|
|
|
|
|
// 首页模拟数据
|
...
|
...
|
@@ -91,3 +90,34 @@ exports.special = (req, res) => { |
|
|
res.render('error', resData);
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 商品列表页
|
|
|
* @param {[type]} req [description]
|
|
|
* @param {[type]} res [description]
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.list = (req, res) => {
|
|
|
let params = Object.assign({
|
|
|
saleType: '4',
|
|
|
order: 's_t_asc,s_s_asc'
|
|
|
}, req.query);
|
|
|
|
|
|
let channel = req.query.channel || req.cookies._Channel || 'boys';
|
|
|
|
|
|
params.uid = req.user.uid || 0;
|
|
|
|
|
|
let responseData = {
|
|
|
module: 'product',
|
|
|
page: 'outlets'
|
|
|
};
|
|
|
|
|
|
outlets.getOutletsCategoryData(params, channel).then((result) => {
|
|
|
responseData.resultShow = JSON.stringify(result, null, 4);
|
|
|
res.render('sale/other', Object.assign(responseData, result));
|
|
|
}).catch(() => {
|
|
|
responseData.pageErr = true;
|
|
|
res.render('error', responseData);
|
|
|
});
|
|
|
|
|
|
}; |
...
|
...
|
|