Authored by 王水玲

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

... ... @@ -55,7 +55,7 @@ exports.intro = (req, res) => {
};
/**
* 为你优选 待处理
* 为你优选
* @param {[type]} req [description]
* @param {[type]} res [description]
* @return {[type]} [description]
... ... @@ -66,11 +66,9 @@ exports.preference = (req, res) => {
yhchannel: req.params.yhchannel,
brandId: req.params.brandId
}).then((result) => {
res.send(result);
// res.render('preference', {
// result: result,
// devEnv: true
// });
res.render('detail/preference', {
result: result,
devEnv: true
});
});
};
... ...
... ... @@ -2,35 +2,19 @@
* @Author: Targaryen
* @Date: 2016-05-18 11:42:11
* @Last Modified by: Targaryen
* @Last Modified time: 2016-05-18 17:38:19
* @Last Modified time: 2016-05-30 13:48:17
*/
'use strict';
const library = '../../../library';
const utils = '../../../utils';
const API = require(`${library}/api`).API;
const sign = require(`${library}/sign`);
const _ = require('lodash');
// const helpers = require(`${library}/helpers`);
// const _ = require('lodash');
// const log = require(`${library}/logger`);
const productProcess = require(`${utils}/product-process`);
var api = new API();
/**
* 处理偏好信息
* @param {Object} origin [description]
* @return {Object} [description]
*/
const getPreference = (origin) => {
var dest = origin;
return dest;
};
module.exports = (data) => {
var finalResult;
... ... @@ -40,8 +24,9 @@ module.exports = (data) => {
yhchannel: data.yhchannel,
brandId: data.brandId
})).then(result => {
if (!_.isEmpty(result)) {
finalResult = getPreference(result);
if (!_.isEmpty(result) && result.code === 200) {
// 为你优选数据处理,接口没有数据,待处理,待验证
finalResult = productProcess.processProductList(result.data);
}
return finalResult;
... ...
... ... @@ -13,7 +13,7 @@ module.exports = {
port: 6001,
siteUrl: 'http://m.yohobuy.com',
domains: {
api: 'http://testapi.yoho.cn:28078/', // http://192.168.102.205:8080/gateway http://testapi.yoho.cn:28078/
api: 'http://testapi.yoho.cn:28078/', // http://192.168.102.205:8080/gateway
service: 'http://testservice.yoho.cn:28077/'
},
useOneapm: false,
... ...
... ... @@ -15,6 +15,7 @@ camelCaseObject = (obj) => {
obj[k] = camelCase(obj[k]);
if (/[_-]/.test(k)) {
obj[_.camelCase(k)] = obj[k];
delete obj[k];
}
});
return obj;
... ...