Authored by 孙凯

修改接调用接口 app.search.li review by zhanglixia

... ... @@ -450,7 +450,10 @@ export function setProductFilterFactors(category={key: 'gender', name: '性别',
export function getProductList(reload=false) {
return (dispatch, getState) => {
let {app, brandStore} = getState();
let {shopId, productList, filterFactors} = brandStore;
let {shopId, productList, filterFactors,resource} = brandStore;
let {brandBrowse} = resource;
let {brandId} = brandBrowse;
if (reload) {
... ... @@ -481,7 +484,7 @@ export function getProductList(reload=false) {
}
dispatch(productListRequest());
return new BrandStoreService(app.host).productList(shopId, channel, order, page, pageSize, allFilterFactors)
return new BrandStoreService(app.host).productList(shopId, channel, order, page, pageSize, allFilterFactors,brandId)
.then(json => {
let payload = parseProductList(json);
payload.endReached = payload.currentPage == payload.pageCount || payload.list.length < pageSize;
... ... @@ -572,14 +575,14 @@ function parseProductList(json) {
isSelect: true,
});
brandList.map((item, i) => {
newSortList.push({
newBrandList.push({
key: item.id,
name: item.brand_name,
isSelect: false,
})
});
filterCategoryDetailFilterList.brand;
filterCategoryDetailFilterList.brand = newSortList;
filterCategoryDetailFilterList.brand = newBrandList;
}
if (filter['color']) {
... ...
... ... @@ -78,11 +78,11 @@ export default class BrandStoreService {
});
}
async productList(shop_id, yh_channel=1, order='s_t_asc', page=1, limit=60, filterFactors={}, v=7) {
async productList(shop_id, yh_channel=1, order='s_t_asc', page=1, limit=60, filterFactors={},brandId, v=7) {
return await this.api.get({
url: '',
body: {
method: 'app.search.brand',
method: 'app.search.li',
shop_id,
yh_channel,
order,
... ... @@ -94,6 +94,7 @@ export default class BrandStoreService {
attribute_not: 2,
...filterFactors,
v,
brandId,
}
})
.then((json) => {
... ... @@ -168,7 +169,7 @@ export default class BrandStoreService {
return await this.api.get({
url: '',
body: {
method: 'app.search.brand',
method: 'app.search.li',
shop_id,
yh_channel,
order,
... ... @@ -194,7 +195,7 @@ export default class BrandStoreService {
return await this.api.get({
url: '',
body: {
method: 'app.search.brand',
method: 'app.search.li',
shop_id,
yh_channel,
order,
... ...