Authored by chenl

调整了我的个人中心资源位高度。review by 孙凯。

@@ -119,10 +119,9 @@ export default class MineListHeader extends React.Component { @@ -119,10 +119,9 @@ export default class MineListHeader extends React.Component {
119 119
120 return( 120 return(
121 <MineResourceList 121 <MineResourceList
122 - style={{width:width,height:500}} 122 + style={{width: width,height: bannerResourceHeight}}
123 mineResource={this.props.mineResource} 123 mineResource={this.props.mineResource}
124 - onPressFloorItem={this.props.onPressFloorItem}>  
125 - </MineResourceList> 124 + onPressFloorItem={this.props.onPressFloorItem} />
126 ); 125 );
127 } 126 }
128 127
@@ -206,8 +205,8 @@ export default class MineListHeader extends React.Component { @@ -206,8 +205,8 @@ export default class MineListHeader extends React.Component {
206 205
207 //资源位高度 206 //资源位高度
208 if (this.props.mineResource) { 207 if (this.props.mineResource) {
209 - let floorHeight = this._calculateBannerResourceHeight();  
210 - oHigh = oHigh + floorHeight; 208 + bannerResourceHeight = this._calculateBannerResourceHeight();
  209 + oHigh = oHigh + bannerResourceHeight;
211 } 210 }
212 211
213 oHigh = topHeight + oHigh; 212 oHigh = topHeight + oHigh;
@@ -742,6 +741,7 @@ let subRowHeight = Math.ceil(35 * DEVICE_WIDTH_RATIO);//账号安全 通知层 @@ -742,6 +741,7 @@ let subRowHeight = Math.ceil(35 * DEVICE_WIDTH_RATIO);//账号安全 通知层
742 let rowheight = 45;//wo的订单类似的高度,我的逛也用这个高度 741 let rowheight = 45;//wo的订单类似的高度,我的逛也用这个高度
743 let orderContainerHeight = 55; 742 let orderContainerHeight = 55;
744 let topHeight = 175 + rowheight + orderContainerHeight + 10 + rowheight + orderContainerHeight + 1 + 10 + rowheight * 3 + 91; 743 let topHeight = 175 + rowheight + orderContainerHeight + 10 + rowheight + orderContainerHeight + 1 + 10 + rowheight * 3 + 91;
  744 +let bannerResourceHeight = 0;
745 let orderContentWidth = (width - 10) / 5; 745 let orderContentWidth = (width - 10) / 5;
746 let assetContentWidth = (width - 10) / 4; 746 let assetContentWidth = (width - 10) / 4;
747 747
@@ -79,14 +79,13 @@ export default class MineResourceList extends React.Component { @@ -79,14 +79,13 @@ export default class MineResourceList extends React.Component {
79 let dataSource = mineResource.toArray(); 79 let dataSource = mineResource.toArray();
80 80
81 return ( 81 return (
82 - <View style={styles.container}>  
83 <ListView 82 <ListView
  83 + style={styles.container}
84 contentContainerStyle={styles.contentContainer} 84 contentContainerStyle={styles.contentContainer}
85 enableEmptySections={true} 85 enableEmptySections={true}
86 dataSource={this.dataSource.cloneWithRows(dataSource)} 86 dataSource={this.dataSource.cloneWithRows(dataSource)}
87 renderRow={this._renderRow} 87 renderRow={this._renderRow}
88 /> 88 />
89 - </View>  
90 ); 89 );
91 } 90 }
92 }; 91 };
@@ -94,7 +93,7 @@ export default class MineResourceList extends React.Component { @@ -94,7 +93,7 @@ export default class MineResourceList extends React.Component {
94 let {width, height} = Dimensions.get('window'); 93 let {width, height} = Dimensions.get('window');
95 let styles = StyleSheet.create({ 94 let styles = StyleSheet.create({
96 container: { 95 container: {
97 - width: width, 96 + flex: 1,
98 }, 97 },
99 98
100 contentContainer: { 99 contentContainer: {