Authored by 沈志敏

fix bug

... ... @@ -30,7 +30,10 @@ module.exports = {
return api.get('', {
method: 'web.brand.byDomain',
domain: params.domain
}, {code: 200, cache: false});
}, {
code: 200,
cache: false
});
},
/**
... ... @@ -49,7 +52,10 @@ module.exports = {
});
}
return api.get('', finalParams, {code: 200, cache: false});
return api.get('', finalParams, {
code: 200,
cache: false
});
},
/**
... ... @@ -61,7 +67,10 @@ module.exports = {
return api.get('', {
method: 'app.shopsdecorator.getList',
shop_id: params.shopId
}, {code: 200, cache: false});
}, {
code: 200,
cache: false
});
},
/**
... ... @@ -93,7 +102,10 @@ module.exports = {
}
});
return api.get('', finalParams, {code: 200, cache: false});
return api.get('', finalParams, {
code: 200,
cache: false
});
},
/**
... ... @@ -120,4 +132,4 @@ module.exports = {
}
return api.get('', finalParams);
}
};
};
\ No newline at end of file
... ...
... ... @@ -67,10 +67,25 @@ const _getGoodsList = params => {
shopId: params.shopId
})).then(subResult => {
if (subResult.data) {
// java端不愿意将boys改为wen,所以没办法,只能在这边改了。
if (subResult.data.filter) {
const gender = subResult.data.filter.gender || {};
for (let k in gender) {
if (k.indexOf('1') > -1) {
gender[k] = 'men';
} else if (k.indexOf('2') > -1) {
gender[k] = 'women';
}
}
}
prettyFilter(subResult.data.filter);
finalResult = {
data: {
productList: processProductList(subResult.data.product_list, { gender: params.gender }),
productList: processProductList(subResult.data.product_list, {
gender: params.gender
}),
filter: subResult.data.filter,
page: subResult.data.page,
pageTotal: subResult.data.page_total
... ... @@ -121,7 +136,9 @@ const getShopData = params => {
isBlkShop: true,
shopId: result.data.shop_id
});
return _getShopInfoData(finalResult, Object.assign(params, {shopId: result.data.shop_id}));
return _getShopInfoData(finalResult, Object.assign(params, {
shopId: result.data.shop_id
}));
} else {
/* 不是 BLK 的店铺 */
... ... @@ -183,4 +200,4 @@ module.exports = {
getShopData,
getBrandShopGoodsData,
collectShopData
};
};
\ No newline at end of file
... ...