Authored by 郁健超

修改砍价loading的方式 review by孙凯

... ... @@ -31,13 +31,6 @@ _trigggePullToRefresh() {
categoryType,
} = this.props;
if (Platform.OS === 'ios') {
this.timer = TimerMixin.setTimeout(() => {
this.listView && this.listView.getScrollResponder().startPullToRefresh();
}, 0);
} else {
this.props.onRefresh && this.props.onRefresh(categoryType);
}
}
componentWillUnmount() {
... ... @@ -124,7 +117,6 @@ _renderRow(rowData, sectionID, rowID) {
{
Platform.OS === 'ios' ?
<ListView
ref={(c) => {
this.listView = c;
... ...
... ... @@ -54,6 +54,8 @@ class HaggleListContainer extends Component {
json && json.forEach(item => {
})
});
this.props.actions.getHaggleProductList();
}
componentWillUnmount() {
... ... @@ -144,6 +146,7 @@ class HaggleListContainer extends Component {
render() {
let {productList, myHaggleProductList, resourceInfo, isShowAlert, categoryType} = this.props.haggle;
let isFetching = productList.isFetching || myHaggleProductList.isFetching;
let isPullToRefresh = productList.isPullToRefresh || myHaggleProductList.isPullToRefresh;
return (
<View style={styles.container}>
... ... @@ -178,6 +181,7 @@ class HaggleListContainer extends Component {
resourceJumpWithUrl={this._resourceJumpWithUrl}
onRefresh={this._onRefresh}
/>
<LoadingIndicator isVisible={isFetching && !isPullToRefresh}/>
</View>
);
}
... ...
... ... @@ -89,7 +89,6 @@ export default function couponReducer(state = initialState, action) {
let {
index,
} = action.payload;
console.log(index);
if (index === 0) {
return state.setIn(['productList', 'page'], 0)
... ...