...
|
...
|
@@ -252,9 +252,6 @@ const getRelatedEditorial = (brandId, uid, udid, clientType, isApp) => { |
|
|
pageView: data.views_num
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
} else {
|
|
|
logger.error('editorial data return code is not 200');
|
...
|
...
|
@@ -264,13 +261,19 @@ const getRelatedEditorial = (brandId, uid, udid, clientType, isApp) => { |
|
|
};
|
|
|
|
|
|
// 是否收藏
|
|
|
const isCollection = (uid, brandId, clientType) => {
|
|
|
return serviceAPI.get('shops/service/v1/favorite/getUidBrandFav', {
|
|
|
uid: uid,
|
|
|
const isCollection = (brandId, clientType, uid) => {
|
|
|
|
|
|
let param = {
|
|
|
brandId: brandId,
|
|
|
client_type: clientType,
|
|
|
private_key: privateKeyList[clientType]
|
|
|
}).then((result) => {
|
|
|
};
|
|
|
|
|
|
if (uid) {
|
|
|
param.uid = uid;
|
|
|
}
|
|
|
|
|
|
return serviceAPI.get('shops/service/v1/favorite/getUidBrandFav', param).then((result) => {
|
|
|
|
|
|
if (result && result.code === 200) {
|
|
|
|
...
|
...
|
@@ -313,7 +316,7 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => { |
|
|
jumpToApp = 1;
|
|
|
}
|
|
|
|
|
|
return Promise.all([isCollection(uid, brandId, clientType), getRelatedEditorial(brandId, uid, udid, clientType, isApp), getNewProduct(brandId, gender, url, isApp)]).then((result) => {
|
|
|
return Promise.all([isCollection(brandId, clientType, uid), getRelatedEditorial(brandId, uid, udid, clientType, isApp), getNewProduct(brandId, gender, url, isApp)]).then((result) => {
|
|
|
|
|
|
list = _.assign(list, {
|
|
|
isLike: result[0],
|
...
|
...
|
@@ -341,7 +344,7 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => { |
|
|
* [品牌详情异步数据]
|
|
|
*/
|
|
|
const getDetailDataAsync = (brandId, uid, udid, clientType, isApp) => {
|
|
|
return Promise.all([isCollection(uid, brandId, clientType), getRelatedEditorial(brandId, uid, udid, clientType, isApp)]).then((result) => {
|
|
|
return Promise.all([isCollection(brandId, clientType, uid), getRelatedEditorial(brandId, uid, udid, clientType, isApp)]).then((result) => {
|
|
|
return {
|
|
|
isLike: result[0],
|
|
|
infos: result[1]
|
...
|
...
|
|