...
|
...
|
@@ -5,11 +5,14 @@ |
|
|
* Time: 13:51
|
|
|
*/
|
|
|
'use strict';
|
|
|
const path = require('path');
|
|
|
const api = global.yoho.API;
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const brandApi = require('./brand-api');
|
|
|
const logger = global.yoho.logger;
|
|
|
const _ = require('lodash');
|
|
|
const processProductList = require(path.join(global.utils, '/beautify/product')).processProductList;
|
|
|
const camelCase = global.yoho.camelCase;
|
|
|
|
|
|
/**
|
|
|
* 处理品牌一览品牌列表数据
|
...
|
...
|
@@ -111,13 +114,18 @@ const getBrandData = params => { |
|
|
const getBrandShopGoodsData = params => {
|
|
|
let finalResult = {};
|
|
|
|
|
|
/* TODO 获取店铺商品暂时没有接口 */
|
|
|
return api.all([brandApi.getBrandShopGoodsOriginData(params)]).then(result => {
|
|
|
if (result[0].code === 200) {
|
|
|
return finalResult;
|
|
|
Object.assign(finalResult, {
|
|
|
data: {
|
|
|
productList: processProductList(result[0].data.productList)
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
logger.error('getBrandShopGoodsOriginData api code no 200');
|
|
|
}
|
|
|
|
|
|
return camelCase(finalResult);
|
|
|
});
|
|
|
};
|
|
|
|
...
|
...
|
@@ -127,8 +135,6 @@ const getBrandShopGoodsData = params => { |
|
|
* @returns {*|Promise.<TResult>}
|
|
|
*/
|
|
|
const collectShopData = params => {
|
|
|
|
|
|
/* TODO 收藏店铺接口返回状态处理 */
|
|
|
return api.all([brandApi.collectShopOriginData(params)]).then(result => {
|
|
|
return result[0];
|
|
|
});
|
...
|
...
|
|