...
|
...
|
@@ -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;
|
...
|
...
|
|