Authored by zhangxiaoru

sale outlet

@@ -29,10 +29,9 @@ exports.index = (req, res, next) => { @@ -29,10 +29,9 @@ exports.index = (req, res, next) => {
29 navBtn: false 29 navBtn: false
30 }); 30 });
31 31
32 - let categoryId = req.query.category_id || 1107;  
33 - let yhChannel = req.query.yh_channel || yhChannelEmpty || 1;  
34 - let contentcode = req.query.content_code || 'ec5e2b0dee51d5510d224d866fb5c4c0';  
35 - // console.log(yhChannel) 32 + let categoryId = req.query.category_id;
  33 + let yhChannel = req.query.yh_channel || yhChannelEmpty;
  34 + let contentcode = req.query.content_code;
36 35
37 outletModel.getContent(categoryId, yhChannel, contentcode).then(result => { 36 outletModel.getContent(categoryId, yhChannel, contentcode).then(result => {
38 res.render('outlet', Object.assign({ 37 res.render('outlet', Object.assign({
@@ -10,7 +10,7 @@ const contentCodeConfig = require('../../../config/content-code'); @@ -10,7 +10,7 @@ const contentCodeConfig = require('../../../config/content-code');
10 10
11 const _ = require('lodash'); 11 const _ = require('lodash');
12 12
13 -//const camelCase = global.yoho.camelCase; 13 +// const camelCase = global.yoho.camelCase;
14 const log = global.yoho.logger; 14 const log = global.yoho.logger;
15 const serviceApi = global.yoho.ServiceAPI; 15 const serviceApi = global.yoho.ServiceAPI;
16 const api = global.yoho.API; 16 const api = global.yoho.API;
@@ -75,7 +75,8 @@ const _convertNavData = (list) => { @@ -75,7 +75,8 @@ const _convertNavData = (list) => {
75 const formatData = []; 75 const formatData = [];
76 76
77 list = list || []; 77 list = list || [];
78 - //list = camelCase(list); 78 +
  79 + // list = camelCase(list);
79 _.forEach(list, (item) => { 80 _.forEach(list, (item) => {
80 formatData.push({ 81 formatData.push({
81 id: item.id, 82 id: item.id,
@@ -171,7 +172,7 @@ const _getActivityDetail = (id) => { @@ -171,7 +172,7 @@ const _getActivityDetail = (id) => {
171 if (res.code === 200) { 172 if (res.code === 200) {
172 return _convertActicityData(res.data); 173 return _convertActicityData(res.data);
173 } else { 174 } else {
174 - //log.error('the response code of "app.outlets.activityGet" is NOT 200', res); 175 + log.error('the response code of "app.outlets.activityGet" is NOT 200', res);
175 return {}; 176 return {};
176 } 177 }
177 }); 178 });
@@ -209,8 +210,6 @@ const getContent = (categoryId, channel, code) => { @@ -209,8 +210,6 @@ const getContent = (categoryId, channel, code) => {
209 const p = [_getNavData(categoryId), _getOutletResource(channel, code), _getHomeActivity(params)]; 210 const p = [_getNavData(categoryId), _getOutletResource(channel, code), _getHomeActivity(params)];
210 211
211 return Promise.all(p).then(data => { 212 return Promise.all(p).then(data => {
212 - //console.log(data)  
213 -  
214 return { 213 return {
215 nav: data[0] || [], 214 nav: data[0] || [],
216 content: data[1] || [], 215 content: data[1] || [],
@@ -8,7 +8,8 @@ const utils = '../../../utils'; @@ -8,7 +8,8 @@ const utils = '../../../utils';
8 const contentCodeConfig = require('../../../config/content-code'); 8 const contentCodeConfig = require('../../../config/content-code');
9 9
10 const logger = global.yoho.logger; 10 const logger = global.yoho.logger;
11 -//const camelCase = global.yoho.camelCase; 11 +
  12 +// const camelCase = global.yoho.camelCase;
12 const resourcesProcess = require(`${utils}/resources-process`); 13 const resourcesProcess = require(`${utils}/resources-process`);
13 const productProcess = require(`${utils}/product-process`); 14 const productProcess = require(`${utils}/product-process`);
14 const processTime = require(`${utils}/time-process`); 15 const processTime = require(`${utils}/time-process`);
@@ -132,7 +133,8 @@ const _processBreakingSort = (list) => { @@ -132,7 +133,8 @@ const _processBreakingSort = (list) => {
132 const sub = []; 133 const sub = [];
133 134
134 list = list || []; 135 list = list || [];
135 - //list = camelCase(list); 136 +
  137 + // list = camelCase(list);
136 138
137 _.forEach(list, (data, index) => { 139 _.forEach(list, (data, index) => {
138 const allSub = []; 140 const allSub = [];