Authored by 孙凯

整理代码 review by hongmo

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