...
|
...
|
@@ -44,20 +44,22 @@ export default class GroupPurchaseDetail extends Component { |
|
|
switch(sectionID) {
|
|
|
|
|
|
case 'productResourceInfo': {
|
|
|
// if(!rowData || !rowData.get('data')){
|
|
|
// return null;
|
|
|
// }
|
|
|
// let infoData = rowData.get('data');
|
|
|
// let info = infoData?infoData.toJS():'';
|
|
|
// let item = info[0];
|
|
|
// let src = YH_Image.getSlicedUrl(item.src, width, 70, 2);
|
|
|
let src = 'http://img13.static.yhbimg.com/article/2019/02/28/14/02b72ac74385bdefd089ffa860d29d0862.jpeg';
|
|
|
let data = rowData ? rowData.toJS() : null;
|
|
|
|
|
|
if(data.template_name == "single_image"){
|
|
|
|
|
|
if(!data.data || !data.data[0]){
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
let resourceData = data.data[0];
|
|
|
let src = YH_Image.getSlicedUrl(resourceData.src, width, 70*DEVICE_WIDTH_RATIO, 2);
|
|
|
let url = resourceData.url;
|
|
|
return(
|
|
|
<View style={{width:width, height:70*DEVICE_WIDTH_RATIO+8, backgroundColor:'#f0f0f0'}}>
|
|
|
<View style={{width:width, height:70*DEVICE_WIDTH_RATIO}}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={() => {
|
|
|
// this.props.didTouchBanner && this.props.didTouchBanner(item.url);
|
|
|
this.props.didTouchBanner && this.props.didTouchBanner(url);
|
|
|
}}>
|
|
|
<YH_Image style={{width: '100%', height: '100%'}} url={src}></YH_Image>
|
|
|
</TouchableOpacity>
|
...
|
...
|
@@ -65,6 +67,8 @@ export default class GroupPurchaseDetail extends Component { |
|
|
</View>
|
|
|
);
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
case 'productListTitle': {
|
|
|
return(
|
...
|
...
|
@@ -92,7 +96,7 @@ export default class GroupPurchaseDetail extends Component { |
|
|
resource,
|
|
|
} = this.props;
|
|
|
let dataSource = {
|
|
|
productResourceInfo: [1],
|
|
|
productResourceInfo: resource.resourceList ? resource.resourceList.toArray() : [],
|
|
|
productListTitle: [2],
|
|
|
productList: productList.list ? productList.list.toArray() : [],
|
|
|
};
|
...
|
...
|
|