...
|
...
|
@@ -10,6 +10,7 @@ import { |
|
|
Image,
|
|
|
ListView,
|
|
|
TouchableOpacity,
|
|
|
RefreshControl,
|
|
|
} from 'react-native';
|
|
|
import Immutable, {Map} from 'immutable';
|
|
|
import OutletSwiper from './OutletSwiper';
|
...
|
...
|
@@ -148,7 +149,6 @@ export default class OutletPageListView extends Component { |
|
|
}
|
|
|
|
|
|
render() {
|
|
|
|
|
|
let {
|
|
|
resource,
|
|
|
tabLabel,
|
...
|
...
|
@@ -203,27 +203,59 @@ export default class OutletPageListView extends Component { |
|
|
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
<ListView
|
|
|
ref='OutletPageListView'
|
|
|
contentContainerStyle={styles.contentContainerStyle}
|
|
|
enableEmptySections={true}
|
|
|
dataSource={this.dataSource.cloneWithRowsAndSections(dataSource)}
|
|
|
renderRow={this.renderRow}
|
|
|
renderSectionHeader={this.renderSectionHeader}
|
|
|
enablePullToRefresh={true}
|
|
|
isOnPullToRefresh={isFetching}
|
|
|
onRefreshData={() => {
|
|
|
this._onRefresh && this._onRefresh(true);
|
|
|
}}
|
|
|
onEndReached={() => {
|
|
|
if (categoryNavigationList && productList && productList.size > 0) {
|
|
|
let {
|
|
|
resource,
|
|
|
} = this.props;
|
|
|
this.props.onEndReached && this.props.onEndReached(resource.get('content_code'),categoryNavigationList?categoryNavigationList[fliter].toJS():null);
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
{
|
|
|
Platform.OS === 'ios' ?
|
|
|
<ListView
|
|
|
ref='OutletPageListView'
|
|
|
contentContainerStyle={styles.contentContainerStyle}
|
|
|
enableEmptySections={true}
|
|
|
dataSource={this.dataSource.cloneWithRowsAndSections(dataSource)}
|
|
|
renderRow={this.renderRow}
|
|
|
renderSectionHeader={this.renderSectionHeader}
|
|
|
enablePullToRefresh={true}
|
|
|
isOnPullToRefresh={isFetching}
|
|
|
onRefreshData={() => {
|
|
|
this._onRefresh && this._onRefresh(true);
|
|
|
}}
|
|
|
onEndReached={() => {
|
|
|
if (categoryNavigationList && productList && productList.size > 0) {
|
|
|
let {
|
|
|
resource,
|
|
|
} = this.props;
|
|
|
this.props.onEndReached && this.props.onEndReached(resource.get('content_code'),categoryNavigationList?categoryNavigationList[fliter].toJS():null);
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
:
|
|
|
<ListView
|
|
|
ref='OutletPageListView'
|
|
|
contentContainerStyle={styles.contentContainerStyle}
|
|
|
enableEmptySections={true}
|
|
|
dataSource={this.dataSource.cloneWithRowsAndSections(dataSource)}
|
|
|
renderRow={this.renderRow}
|
|
|
renderSectionHeader={this.renderSectionHeader}
|
|
|
enablePullToRefresh={true}
|
|
|
isOnPullToRefresh={isFetching}
|
|
|
refreshControl={
|
|
|
<RefreshControl
|
|
|
refreshing={isFetching}
|
|
|
onRefresh={() => {
|
|
|
this._onRefresh && this._onRefresh(true);
|
|
|
}}
|
|
|
colors={['#000000', '#ff0000']}
|
|
|
progressBackgroundColor="#ffffff"
|
|
|
/>
|
|
|
}
|
|
|
onEndReached={() => {
|
|
|
if (categoryNavigationList && productList && productList.size > 0) {
|
|
|
let {
|
|
|
resource,
|
|
|
} = this.props;
|
|
|
this.props.onEndReached && this.props.onEndReached(resource.get('content_code'),categoryNavigationList?categoryNavigationList[fliter].toJS():null);
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
}
|
|
|
{needShowToast ? <Prompt
|
|
|
text={showToastMessage}
|
|
|
duration={3000}
|
...
|
...
|
|