Authored by 郭成尧

Merge branch 'hotfix/errorlog' of git.yoho.cn:fe/yohobuywap-node into hotfix/errorlog

... ... @@ -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,
... ...
... ... @@ -40,10 +40,9 @@ const getHotRank = (codeKey) => {
});
};
const selectHotrank = (yhChannel, gender, sort, tabId, limit, page, notab) => {
const selectHotrank = (yhChannel, sort, tabId, limit, page, notab) => {
let param = {
method: 'app.search.top',
gender: gender,
yh_channel: yhChannel,
page: page,
limit: limit
... ...
let $ = require('yoho-jquery'),
Swiper = require('yoho-swiper'),
lazyLoad = require('yoho-jquery-lazyload'),
loading = require('plugin/loading');
loading = require('plugin/loading'),
qs = require('yoho-qs');
let page = 1,
winH,
... ... @@ -34,7 +35,8 @@ function hotrank(pageIndex, sortIndex, tabId, noTab) {
data: {
page: pageIndex,
tab_id: tabId,
notab: noTab
notab: noTab,
gender: qs.gender
},
success: function(data) {
if (data === ' ') {
... ...