|
@@ -51,24 +51,15 @@ export default class HotCategoryList extends Component{ |
|
@@ -51,24 +51,15 @@ export default class HotCategoryList extends Component{ |
51
|
|
51
|
|
52
|
renderRow(rowData, sectionID, rowID, highlightRow){
|
52
|
renderRow(rowData, sectionID, rowID, highlightRow){
|
53
|
|
53
|
|
54
|
- // console.log("chenlin", "rowData数据:" + JSON.stringify(rowData));
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
if (!rowData || rowData.length == 0) {
|
54
|
if (!rowData || rowData.length == 0) {
|
58
|
return null;
|
55
|
return null;
|
59
|
}
|
56
|
}
|
60
|
|
57
|
|
61
|
- let imageUrl = getSlicedUrl(rowData.get("default_images"), 106, 106, 2);
|
58
|
+ let imageUrl = getSlicedUrl(rowData.get("default_images"), 82, 110, 2);
|
62
|
let categoryName = rowData.get("category_name");
|
59
|
let categoryName = rowData.get("category_name");
|
63
|
|
60
|
|
64
|
//数据类型,纯文字型和图片型,列表中会出现纯文本的情况,比如MORE
|
61
|
//数据类型,纯文字型和图片型,列表中会出现纯文本的情况,比如MORE
|
65
|
let dataType = rowData.get("data_type");
|
62
|
let dataType = rowData.get("data_type");
|
66
|
- // console.log("chenlin", "rowData数据:" + JSON.stringify(rowData));
|
|
|
67
|
- // console.log("chenlin", "dataType数据:" + dataType);
|
|
|
68
|
-
|
|
|
69
|
- // return(
|
|
|
70
|
- // <Text style={styles.rowText} numberOfLines={1}>{categoryName}</Text>
|
|
|
71
|
- // );
|
|
|
72
|
|
63
|
|
73
|
if(dataType && dataType == 'text')
|
64
|
if(dataType && dataType == 'text')
|
74
|
return (
|
65
|
return (
|
|
@@ -95,15 +86,10 @@ export default class HotCategoryList extends Component{ |
|
@@ -95,15 +86,10 @@ export default class HotCategoryList extends Component{ |
95
|
render(){
|
86
|
render(){
|
96
|
let {data} = this.props;
|
87
|
let {data} = this.props;
|
97
|
|
88
|
|
98
|
- console.log("chenlin", "data数据长度:" + data.length);
|
|
|
99
|
-
|
|
|
100
|
- // console.log("chenlin", "data数据:" + JSON.stringify(data));
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
return(
|
89
|
return(
|
104
|
<View style={styles.container}>
|
90
|
<View style={styles.container}>
|
105
|
<ListView
|
91
|
<ListView
|
106
|
- pageSize={9}
|
92
|
+ pageSize={3}
|
107
|
contentContainerStyle={styles.contentContainer}
|
93
|
contentContainerStyle={styles.contentContainer}
|
108
|
dataSource={this.dataSource.cloneWithRows(data)}
|
94
|
dataSource={this.dataSource.cloneWithRows(data)}
|
109
|
enableEmptySections={true}
|
95
|
enableEmptySections={true}
|
|
@@ -170,17 +156,19 @@ let styles = StyleSheet.create({ |
|
@@ -170,17 +156,19 @@ let styles = StyleSheet.create({ |
170
|
height: 70 * DEVICE_WIDTH_RATIO,
|
156
|
height: 70 * DEVICE_WIDTH_RATIO,
|
171
|
paddingLeft: 8.5 * DEVICE_WIDTH_RATIO,
|
157
|
paddingLeft: 8.5 * DEVICE_WIDTH_RATIO,
|
172
|
paddingRight: 8.5 * DEVICE_WIDTH_RATIO,
|
158
|
paddingRight: 8.5 * DEVICE_WIDTH_RATIO,
|
|
|
159
|
+ justifyContent: 'center',
|
|
|
160
|
+ alignItems: 'center',
|
173
|
},
|
161
|
},
|
174
|
|
162
|
|
175
|
rowThumbnail:{
|
163
|
rowThumbnail:{
|
176
|
- width: 53 * DEVICE_WIDTH_RATIO,
|
|
|
177
|
- height: 53 * DEVICE_WIDTH_RATIO,
|
164
|
+ width: 41 * DEVICE_WIDTH_RATIO,
|
|
|
165
|
+ height: 55 * DEVICE_WIDTH_RATIO,
|
178
|
},
|
166
|
},
|
179
|
|
167
|
|
180
|
rowText:{
|
168
|
rowText:{
|
181
|
width: 53 * DEVICE_WIDTH_RATIO,
|
169
|
width: 53 * DEVICE_WIDTH_RATIO,
|
182
|
- height: 17 * DEVICE_WIDTH_RATIO,
|
|
|
183
|
- fontSize: 10 * DEVICE_WIDTH_RATIO,
|
170
|
+ height: 15 * DEVICE_WIDTH_RATIO,
|
|
|
171
|
+ fontSize: 9 * DEVICE_WIDTH_RATIO,
|
184
|
color: '#B0B0B0',
|
172
|
color: '#B0B0B0',
|
185
|
textAlign: 'center',
|
173
|
textAlign: 'center',
|
186
|
},
|
174
|
},
|