Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -29,7 +29,7 @@ module.exports = {
return api.get('', {
method: 'app.brand.newBrandList',
yh_channel: yhChannel[params.channel].channel
});
}, {code: 200, cache: true});
},
/**
... ... @@ -39,6 +39,6 @@ module.exports = {
getCateListData(params) {
return api.get('', Object.assign(params, {
method: 'app.sort.get'
}));
}, {code: 200, cache: true}));
}
};
... ...
... ... @@ -55,10 +55,10 @@ const getBrandListData = params => {
let finalResult = {};
return brandApi.getBrandListOriginData(params).then(result => {
if (result.code === 200 && result.data) {
if (result.data) {
Object.assign(finalResult, handleBrandList(result.data.all_list));
} else {
logger.error('getBrandListOriginData api code no 200 or data is null');
logger.error('getBrandListOriginData api data is null');
}
return finalResult;
... ... @@ -72,11 +72,7 @@ const getBrandListData = params => {
*/
const getCateListData = params => {
return brandApi.getCateListData(params).then(result => {
if (result.code === 200) {
return camelCase(result);
} else {
logger.error('getCateListData api code no 200 or data is null');
}
return camelCase(result);
});
};
... ...
... ... @@ -5,3 +5,13 @@
</div>
{{/ suggestSub}}
</div>
<style>
html,
body {
height: 100%;
}
.main-wrap {
height: 100%;
}
</style>
... ...
... ... @@ -30,7 +30,7 @@ module.exports = {
return api.get('', {
method: 'web.brand.byDomain',
domain: params.domain
});
}, {code: 200, cache: false});
},
/**
... ... @@ -49,7 +49,7 @@ module.exports = {
});
}
return api.get('', finalParams);
return api.get('', finalParams, {code: 200, cache: false});
},
/**
... ... @@ -61,7 +61,7 @@ module.exports = {
return api.get('', {
method: 'app.shopsdecorator.getList',
shop_id: params.shopId
});
}, {code: 200, cache: false});
},
/**
... ... @@ -93,7 +93,7 @@ module.exports = {
}
});
return api.get('', finalParams);
return api.get('', finalParams, {code: 200, cache: false});
},
/**
... ... @@ -118,6 +118,6 @@ module.exports = {
method: 'app.favorite.add'
});
}
return api.get('', finalParams);
return api.get('', finalParams, {code: 200, cache: false});
}
};
... ...
... ... @@ -22,7 +22,7 @@ const getShopData = params => {
return shopApi.getBrandInfoByDomain({domain: params.domain}).then(result => {
if (result.code === 200) {
if (result.data) {
/* 品牌名称 */
Object.assign(finalResult, {
... ... @@ -44,7 +44,8 @@ const getShopData = params => {
// uid: '8050882'
}).then(subResult => {
if (subResult.code === 200) {
if (subResult.data) {
/* 取店铺的基本信息 */
Object.assign(finalResult, {
... ... @@ -56,26 +57,24 @@ const getShopData = params => {
/* 取资源位店铺背景图 */
return shopApi.getShopsDecoratorList({shopId: result.data.shop_id}).then(thResult => {
if (thResult.code === 200) {
if (thResult.data) {
_.forEach(thResult.data.list, value => {
if (value.resource_name === 'shopTopBanner_app') {
Object.assign(finalResult, {
brandBg: JSON.parse(value.resource_data).shopSrc
shopBg: JSON.parse(value.resource_data).shopSrc
});
}
});
} else {
logger.info('getShopsDecoratorList api code no 200');
logger.error('getShopsDecoratorList api no data');
}
return finalResult;
});
} else {
logger.error('getShopInfoData api code no 200');
logger.error('getShopInfoData api no data');
}
return finalResult;
});
} else {
... ... @@ -87,8 +86,9 @@ const getShopData = params => {
logger.info('brand has no shop');
}
return finalResult;
} else {
logger.error('getBrandOriginData api code no 200');
logger.error('getBrandInfoByDomain api no data');
}
return finalResult;
... ... @@ -103,13 +103,14 @@ const getShopData = params => {
const getBrandShopGoodsData = params => {
let finalResult = {};
return shopApi.getBrandInfoByDomain({ domain: params.domain }).then(result => {
if (result.code === 200) {
return shopApi.getBrandInfoByDomain({domain: params.domain}).then(result => {
if (result.data) {
return shopApi.getBrandShopGoodsOriginData(Object.assign(params, {
brand: result.data.id,
shopId: result.data.shop_id
})).then(subResult => {
if (subResult.code === 200 && subResult.data) {
if (subResult.data) {
prettyFilter(subResult.data.filter);
finalResult = {
data: {
... ... @@ -121,15 +122,13 @@ const getBrandShopGoodsData = params => {
code: 200
};
} else {
logger.error('getBrandShopGoodsOriginData api code no 200');
logger.error('getBrandShopGoodsOriginData api no data');
}
return camelCase(finalResult);
});
} else {
logger.error('getBrandInfoByDomain api code no 200');
logger.error('getBrandInfoByDomain api no data');
}
return camelCase(finalResult);
});
};
... ...
... ... @@ -27,6 +27,7 @@
.blk-icon {
background: resolve("me/app-icon.png") no-repeat;
background-size: 100%;
width: 180px;
height: 180px;
left: 0;
... ...