Authored by 孙凯

整理代码 review by hongmo

@@ -62,6 +62,7 @@ export default class Header extends React.Component { @@ -62,6 +62,7 @@ export default class Header extends React.Component {
62 let article_title = hasData?article_data.get('article_title'):''; 62 let article_title = hasData?article_data.get('article_title'):'';
63 let pageViews = hasData?article_data.get('pageViews'):'99999'; 63 let pageViews = hasData?article_data.get('pageViews'):'99999';
64 let publishTime = hasData?article_data.get('publishTime'):'12月12日 12:00'; 64 let publishTime = hasData?article_data.get('publishTime'):'12月12日 12:00';
  65 +
65 return( 66 return(
66 <View style={styles.contentContainer}> 67 <View style={styles.contentContainer}>
67 <TouchableOpacity activeOpacity={0.5} onPress={() => { 68 <TouchableOpacity activeOpacity={0.5} onPress={() => {
@@ -70,7 +71,7 @@ export default class Header extends React.Component { @@ -70,7 +71,7 @@ export default class Header extends React.Component {
70 <View style={styles.header}> 71 <View style={styles.header}>
71 <Image source={{uri: author_avatar}} style={styles.thumb}></Image> 72 <Image source={{uri: author_avatar}} style={styles.thumb}></Image>
72 <Text style={styles.name}>{author_name}</Text> 73 <Text style={styles.name}>{author_name}</Text>
73 - {(num > 25)?null:<Text style={styles.desc}>{author_desc}</Text>} 74 + {(num > 25)?null:<Text style={styles.desc} numberOfLines={1}>{author_desc}</Text>}
74 </View> 75 </View>
75 </TouchableOpacity> 76 </TouchableOpacity>
76 {(num > 25)?<Text style={styles.desc2}>{author_desc}</Text>:null} 77 {(num > 25)?<Text style={styles.desc2}>{author_desc}</Text>:null}
@@ -118,9 +119,9 @@ let styles = StyleSheet.create({ @@ -118,9 +119,9 @@ let styles = StyleSheet.create({
118 desc2: { 119 desc2: {
119 marginLeft: 20, 120 marginLeft: 20,
120 color: '#e5e5e5', 121 color: '#e5e5e5',
121 - height: 40,  
122 width: width, 122 width: width,
123 fontSize: 15, 123 fontSize: 15,
  124 + minHeight: 40,
124 }, 125 },
125 article_title: { 126 article_title: {
126 marginLeft: 20, 127 marginLeft: 20,