...
|
...
|
@@ -135,6 +135,26 @@ const _getShopCategory = (shopId, channel) => { |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取店铺下面的所有品牌
|
|
|
* @param {int} shopId 店铺id
|
|
|
*/
|
|
|
const getShopBrands = (shopId) => {
|
|
|
return api.get('', {
|
|
|
method: 'app.shops.getShopsBrands',
|
|
|
shop_id: shopId
|
|
|
}).then((result) => {
|
|
|
if (result && result.code === 200) {
|
|
|
result = camelCase(result.data);
|
|
|
return result[0].brandId;
|
|
|
} else {
|
|
|
logger.error('gGet all the brands under the shop return code is not 200');
|
|
|
return {};
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 组织店铺页面数据
|
|
|
* @param {array} data 接口返回的店铺页所需数据
|
|
|
* @param {int} shopId 店铺id
|
...
|
...
|
@@ -623,27 +643,6 @@ const getShopIntro = (shopId) => { |
|
|
});
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取店铺下面的所有品牌
|
|
|
* @param {int} shopId 店铺id
|
|
|
*/
|
|
|
const getShopBrands = (shopId) => {
|
|
|
return api.get('', {
|
|
|
method: 'app.shops.getShopsBrands',
|
|
|
shop_id: shopId
|
|
|
}).then((result) => {
|
|
|
if (result && result.code === 200) {
|
|
|
result = camelCase(result.data);
|
|
|
return result[0].brandId;
|
|
|
} else {
|
|
|
logger.error('gGet all the brands under the shop return code is not 200');
|
|
|
return {};
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
getBaseShopData,
|
|
|
getShopData,
|
...
|
...
|
|