Authored by 于良

底部产品列表优化 review by shixiang

@@ -474,7 +474,7 @@ export function getProductList(reload=false) { @@ -474,7 +474,7 @@ export function getProductList(reload=false) {
474 return new BrandStoreService(app.host).productList(shopId, channel, order, page, pageSize, allFilterFactors) 474 return new BrandStoreService(app.host).productList(shopId, channel, order, page, pageSize, allFilterFactors)
475 .then(json => { 475 .then(json => {
476 let payload = parseProductList(json); 476 let payload = parseProductList(json);
477 - payload.endReached = payload.currentPage == payload.pageCount; 477 + payload.endReached = payload.currentPage == payload.pageCount || payload.list.length < pageSize;
478 if (payload.currentPage > 1) { 478 if (payload.currentPage > 1) {
479 let oldList = productList.list.toJS(); 479 let oldList = productList.list.toJS();
480 let list = [...oldList, ...payload.list]; 480 let list = [...oldList, ...payload.list];
@@ -315,9 +315,9 @@ export default function brandStoreReducer(state=initialState, action) { @@ -315,9 +315,9 @@ export default function brandStoreReducer(state=initialState, action) {
315 .setIn(['productListForNew', 'error'], action.payload); 315 .setIn(['productListForNew', 'error'], action.payload);
316 316
317 } 317 }
318 - 318 +
319 case FILTER_LIST_VIEW: { 319 case FILTER_LIST_VIEW: {
320 - return state.setIn(['productList', 'isFilter'], !state.productList.isFilter); 320 + return state.setIn(['productList', 'isFilter'], action.payload);
321 321
322 } 322 }
323 323