...
|
...
|
@@ -7,11 +7,17 @@ |
|
|
|
|
|
const newsaleModel = require('../models/newsale');
|
|
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
|
|
|
let yhchannels = {
|
|
|
'1,3': 1,
|
|
|
'2,3': 2
|
|
|
};
|
|
|
|
|
|
let channels = {
|
|
|
boys: '1,3',
|
|
|
girl: '2,3',
|
|
|
kids: '1,2,3',
|
|
|
lifestyle: '1,2,3'
|
|
|
boys: 1,
|
|
|
girls: 2,
|
|
|
kids: 3,
|
|
|
lifestyle: 4
|
|
|
};
|
|
|
|
|
|
const index = (req, res, next) => {
|
...
|
...
|
@@ -56,10 +62,10 @@ const selectHotrank = (req, res, next) => { |
|
|
let limit = 50;
|
|
|
let page = req.query.page || 1;
|
|
|
let notab = req.query.notab || 0;
|
|
|
let yhChannel = req.query.yh_channel || 1;
|
|
|
let gender = req.query.gender || req.cookies._Channel && channels[req.cookies._Channel] || '1,3';
|
|
|
let yhChannel = (req.query.gender && yhchannels[req.query.gender]) ||
|
|
|
(req.cookies._Channel && channels[req.cookies._Channel]) || 1;
|
|
|
|
|
|
newsaleModel.selectHotrank(yhChannel, gender, sort, tab_id, limit, page, notab).then((result) => {
|
|
|
newsaleModel.selectHotrank(yhChannel, sort, tab_id, limit, page, notab).then((result) => {
|
|
|
|
|
|
res.render('newsale/hotlist', {
|
|
|
layout: false,
|
...
|
...
|
|