...
|
...
|
@@ -47,7 +47,6 @@ export default class NewArrival extends Component { |
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
}
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
...
|
...
|
@@ -329,6 +328,7 @@ export default class NewArrival extends Component { |
|
|
recommend = [topPart.get('brandList')];
|
|
|
}
|
|
|
let featured = topPart.get('featuredList')&&topPart.get('featuredList').size?[topPart.get('featuredList')]:[];
|
|
|
|
|
|
let dataSource = {
|
|
|
banner,
|
|
|
recommend,
|
...
|
...
|
@@ -349,7 +349,7 @@ export default class NewArrival extends Component { |
|
|
renderRow={this._renderRow}
|
|
|
enableEmptySections={true}
|
|
|
renderSectionHeader={this._renderSectionHeader}
|
|
|
removeClippedSubviews={false}
|
|
|
removeClippedSubviews={true}
|
|
|
renderFooter={()=>{
|
|
|
if (endReached) {
|
|
|
return <View style={styles.placeholder} />;
|
...
|
...
|
@@ -365,16 +365,16 @@ export default class NewArrival extends Component { |
|
|
this.props.onEndReached && this.props.onEndReached();
|
|
|
}
|
|
|
}}
|
|
|
scrollEventThrottle={300}
|
|
|
initialListSize={40}
|
|
|
onScroll={(event) => {
|
|
|
if (this.state.showBackToTopButton && event.nativeEvent.contentOffset.y < height) {
|
|
|
this.setState({showBackToTopButton: false});
|
|
|
}
|
|
|
if (this.state.showBackToTopButton == false && event.nativeEvent.contentOffset.y > height) {
|
|
|
this.setState({showBackToTopButton: true});
|
|
|
}
|
|
|
}}
|
|
|
initialListSize={30}
|
|
|
pageSize={30}
|
|
|
onScrollEndDrag={(event) => {
|
|
|
if (this.state.showBackToTopButton && event.nativeEvent.contentOffset.y < height) {
|
|
|
this.setState({showBackToTopButton: false});
|
|
|
}
|
|
|
if (this.state.showBackToTopButton == false && event.nativeEvent.contentOffset.y > height) {
|
|
|
this.setState({showBackToTopButton: true});
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
{productList.isFilter ?
|
|
|
<NewArrivalCategoryList
|
...
|
...
|
@@ -400,6 +400,7 @@ export default class NewArrival extends Component { |
|
|
style={styles.backToTopButton}
|
|
|
onPress={()=>{
|
|
|
this.listView && this.listView.scrollTo({x: 0, y: 0, animated: true});
|
|
|
this.setState({showBackToTopButton: false});
|
|
|
}}>
|
|
|
<Image style={{flex:1}} source={require('../../image/backtop.png')}/>
|
|
|
</TouchableOpacity>: null
|
...
|
...
|
@@ -414,6 +415,8 @@ export default class NewArrival extends Component { |
|
|
}
|
|
|
|
|
|
let {width, height} = Dimensions.get('window');
|
|
|
width = Math.ceil(width);
|
|
|
height = Math.ceil(height);
|
|
|
let bannerHeight = Math.ceil((363 / 750) * width);
|
|
|
let yPosition = 0;
|
|
|
let rowWidth = Math.ceil(137.5 * width / 320);
|
...
|
...
|
|