...
|
...
|
@@ -17,7 +17,7 @@ const list = { |
|
|
// 列表页
|
|
|
index: (req, res, next) => {
|
|
|
let q = req.query;
|
|
|
let channel = req.cookies._Channel || 'men';
|
|
|
let channel = req.cookies._Channel || req.query._Channel || 'men';
|
|
|
|
|
|
q.page = parseInt(q.page || 1, 10);
|
|
|
q.order = q.order || 's_n_desc';
|
...
|
...
|
@@ -69,9 +69,11 @@ const list = { |
|
|
// 新品到着
|
|
|
newPage: (req, res, next) => {
|
|
|
let q = req.query;
|
|
|
let channel = req.cookies._Channel || req.query._Channel || 'men';
|
|
|
|
|
|
q.page = parseInt(q.page || 1, 10);
|
|
|
q.order = q.order || 's_n_desc';
|
|
|
q.channel = channel;
|
|
|
|
|
|
let retData = {
|
|
|
module: 'product',
|
...
|
...
|
@@ -79,7 +81,8 @@ const list = { |
|
|
title: '新品'
|
|
|
};
|
|
|
|
|
|
Promise.all([Resouces.newProductBanner(), Search.queryAllSort(), Search.queryNewProduct(q)]).then(result => {
|
|
|
Promise.all([Resouces.newProductBanner(channel), Search.queryAllSort(),
|
|
|
Search.queryNewProduct(q)]).then(result => {
|
|
|
let banner = result[0];
|
|
|
let sortData = camelCase(result[1]);
|
|
|
let listData = result[2];
|
...
|
...
|
|