...
|
...
|
@@ -4,17 +4,18 @@ |
|
|
* @date: 2016/7/28
|
|
|
*/
|
|
|
|
|
|
|
|
|
'use strict';
|
|
|
const mRoot = '../models';
|
|
|
const utils = '../../../utils';
|
|
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
const searchProcess = require(`${utils}/search-process`);
|
|
|
const newModel = require(`${mRoot}/new`);
|
|
|
const _ = require('lodash');
|
|
|
const helpers = global.yoho.helpers;
|
|
|
|
|
|
// 新品到着
|
|
|
const newGoods = (req, res, next) => {
|
|
|
let channel = req.query.channel || 'boys';
|
|
|
let channel = req.yoho.channel;
|
|
|
|
|
|
newModel.getNewFocus(channel).then((result) => {
|
|
|
res.render('new/new', {
|
...
|
...
|
@@ -27,7 +28,7 @@ const newGoods = (req, res, next) => { |
|
|
headerBanner: result,
|
|
|
brand: '0',
|
|
|
sort: '0',
|
|
|
gender: '',
|
|
|
gender: req.query.gender ? req.query.gender : searchProcess.getGenderByChannel(channel),
|
|
|
channel: channel,
|
|
|
price: '0',
|
|
|
size: '0',
|
...
|
...
|
@@ -40,7 +41,7 @@ const newGoods = (req, res, next) => { |
|
|
};
|
|
|
|
|
|
const selectNewSale = (req, res, next) => {
|
|
|
let params = Object.assign({}, req.query);
|
|
|
let params = _.assign({}, req.query);
|
|
|
|
|
|
newModel.getSearchData(params).then((result) => {
|
|
|
res.render('search/page', {
|
...
|
...
|
|