...
|
...
|
@@ -51,24 +51,15 @@ export default class HotCategoryList extends Component{ |
|
|
|
|
|
renderRow(rowData, sectionID, rowID, highlightRow){
|
|
|
|
|
|
// console.log("chenlin", "rowData数据:" + JSON.stringify(rowData));
|
|
|
|
|
|
|
|
|
if (!rowData || rowData.length == 0) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
let imageUrl = getSlicedUrl(rowData.get("default_images"), 106, 106, 2);
|
|
|
let imageUrl = getSlicedUrl(rowData.get("default_images"), 82, 110, 2);
|
|
|
let categoryName = rowData.get("category_name");
|
|
|
|
|
|
//数据类型,纯文字型和图片型,列表中会出现纯文本的情况,比如MORE
|
|
|
let dataType = rowData.get("data_type");
|
|
|
// console.log("chenlin", "rowData数据:" + JSON.stringify(rowData));
|
|
|
// console.log("chenlin", "dataType数据:" + dataType);
|
|
|
|
|
|
// return(
|
|
|
// <Text style={styles.rowText} numberOfLines={1}>{categoryName}</Text>
|
|
|
// );
|
|
|
|
|
|
if(dataType && dataType == 'text')
|
|
|
return (
|
...
|
...
|
@@ -95,15 +86,10 @@ export default class HotCategoryList extends Component{ |
|
|
render(){
|
|
|
let {data} = this.props;
|
|
|
|
|
|
console.log("chenlin", "data数据长度:" + data.length);
|
|
|
|
|
|
// console.log("chenlin", "data数据:" + JSON.stringify(data));
|
|
|
|
|
|
|
|
|
return(
|
|
|
<View style={styles.container}>
|
|
|
<ListView
|
|
|
pageSize={9}
|
|
|
pageSize={3}
|
|
|
contentContainerStyle={styles.contentContainer}
|
|
|
dataSource={this.dataSource.cloneWithRows(data)}
|
|
|
enableEmptySections={true}
|
...
|
...
|
@@ -170,17 +156,19 @@ let styles = StyleSheet.create({ |
|
|
height: 70 * DEVICE_WIDTH_RATIO,
|
|
|
paddingLeft: 8.5 * DEVICE_WIDTH_RATIO,
|
|
|
paddingRight: 8.5 * DEVICE_WIDTH_RATIO,
|
|
|
justifyContent: 'center',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
|
|
|
rowThumbnail:{
|
|
|
width: 53 * DEVICE_WIDTH_RATIO,
|
|
|
height: 53 * DEVICE_WIDTH_RATIO,
|
|
|
width: 41 * DEVICE_WIDTH_RATIO,
|
|
|
height: 55 * DEVICE_WIDTH_RATIO,
|
|
|
},
|
|
|
|
|
|
rowText:{
|
|
|
width: 53 * DEVICE_WIDTH_RATIO,
|
|
|
height: 17 * DEVICE_WIDTH_RATIO,
|
|
|
fontSize: 10 * DEVICE_WIDTH_RATIO,
|
|
|
height: 15 * DEVICE_WIDTH_RATIO,
|
|
|
fontSize: 9 * DEVICE_WIDTH_RATIO,
|
|
|
color: '#B0B0B0',
|
|
|
textAlign: 'center',
|
|
|
},
|
...
|
...
|
|