Authored by 孙凯

整理代码 review by zhanglixia

... ... @@ -162,6 +162,7 @@ export default class Home extends Component {
if (endReached) {
return <View style={styles.placeholder} />;
} else {
// console.log(isFetching);
return <LoadMoreIndicator isVisible={isFetching?true:false} animating={true} text={'正在加载更多的内容...'} />;
}
}
... ...
... ... @@ -123,7 +123,6 @@ export function getGlobalProductList(index,json,reload=false) {
json.filter = index;
json.endReached = false;
}
dispatch(getGlobalProductListRequest(json));
return new HomeService(app.host).getGlobalProductList(page,order,sort)
.then(json => {
... ...
... ... @@ -65,15 +65,15 @@ export default function homeReducer(state=initialState, action) {
let {
isFetching,
page,
fliter,
filter,
endReached,
} = action.payload;
let list = state.groupInfo.list.toJS();
list[0].isFetching = isFetching;
list[0].fliter = fliter;
list[0].page = page;
list[0].endReached = endReached;
list[filter].isFetching = isFetching;
list[filter].fliter = filter;
list[filter].page = page;
list[filter].endReached = endReached;
return state.setIn(['groupInfo', 'list'], Immutable.fromJS(list));
}
... ...