...
|
...
|
@@ -19,6 +19,7 @@ import BannerSwiper from '../cell/BannerSwiper'; |
|
|
import ActivityCell from '../../../outlet/components/outlet/ActivityCell';
|
|
|
import LatestHeader from '../cell/LatestHeader';
|
|
|
import ActivityHeader from '../cell/ActivityHeader';
|
|
|
import YH_Image from '../../../common/components/YH_Image';
|
|
|
|
|
|
export default class ProductListPool extends Component {
|
|
|
constructor(props) {
|
...
|
...
|
@@ -76,6 +77,14 @@ export default class ProductListPool extends Component { |
|
|
|
|
|
renderRow(rowData, sectionID, rowID, highlightRow) {
|
|
|
switch(sectionID) {
|
|
|
case 'singleImage': {
|
|
|
let {bannerUrl} = this.props;
|
|
|
if (bannerUrl.length == 0) {
|
|
|
return null;
|
|
|
}
|
|
|
let url = YH_Image.getSlicedUrl(bannerUrl, width, vipBannerHeight, 2)
|
|
|
return(<YH_Image style={styles.vipBanner} url={url}/>)
|
|
|
}
|
|
|
case 'bannerInfo':
|
|
|
return(<BannerSwiper resource={rowData} row_ID={rowID} onPressProduct={this.props.onPressBanner}/>);
|
|
|
case 'activity':
|
...
|
...
|
@@ -181,6 +190,11 @@ export default class ProductListPool extends Component { |
|
|
LatestHeader: ['1'],
|
|
|
newUserProductList: productList.list.toArray(),
|
|
|
};
|
|
|
}else if (type == 'YH_FilterProListVC') {
|
|
|
dataSource = {
|
|
|
singleImage: ['1'],
|
|
|
productList: productList.list.toArray(),
|
|
|
};
|
|
|
}
|
|
|
|
|
|
let isLoadingMore = productList.isFetching && productList.currentPage > 0;
|
...
|
...
|
@@ -224,6 +238,9 @@ let rowMarginTop = Math.ceil(10 * width / 320); |
|
|
let rowMarginHorizontal = (width - rowWidth * 2) / 3;
|
|
|
let yPosition = 0;
|
|
|
|
|
|
let vipBannerHeight = Math.ceil((200 / 640) * width);
|
|
|
|
|
|
|
|
|
let styles = StyleSheet.create({
|
|
|
container: {
|
|
|
flex: 1,
|
...
|
...
|
@@ -256,5 +273,9 @@ let styles = StyleSheet.create({ |
|
|
fontSize: 16,
|
|
|
fontWeight: 'bold',
|
|
|
color: '#444',
|
|
|
},
|
|
|
vipBanner: {
|
|
|
height: vipBannerHeight,
|
|
|
width
|
|
|
}
|
|
|
}); |
...
|
...
|
|