...
|
...
|
@@ -324,7 +324,7 @@ export function productListFailure(error) { |
|
|
export function getProductList(reload=false) {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, brandStore} = getState();
|
|
|
let {shopId, productList} = brandStore;
|
|
|
let {shopId, productList, filterFactors} = brandStore;
|
|
|
|
|
|
if (reload) {
|
|
|
|
...
|
...
|
@@ -339,8 +339,19 @@ export function getProductList(reload=false) { |
|
|
let pageSize = productList.pageSize;
|
|
|
let channel = 1;
|
|
|
|
|
|
let bSelectedFilterFactor,allFilterFactors;
|
|
|
allFilterFactors = filterFactors.toJS();
|
|
|
for (var pactor in allFilterFactors) {
|
|
|
if (allFilterFactors.hasOwnProperty(pactor)) {
|
|
|
if (allFilterFactors[pactor]) {
|
|
|
bSelectedFilterFactor.push(pactor);
|
|
|
bSelectedFilterFactor[pactor] = allFilterFactors[pactor];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
dispatch(productListRequest());
|
|
|
return new BrandStoreService().productList(shopId, channel, order, page, pageSize)
|
|
|
return new BrandStoreService().productList(shopId, channel, order, page, pageSize, bSelectedFilterFactor)
|
|
|
.then(json => {
|
|
|
let payload = parseProductList(json);
|
|
|
payload.endReached = payload.currentPage == payload.pageCount;
|
...
|
...
|
|