...
|
...
|
@@ -48,19 +48,20 @@ export default class Header extends React.Component { |
|
|
|
|
|
let author_data = author.get('data');
|
|
|
let article_data = article.get('data');
|
|
|
let hasData = true;
|
|
|
if (!author_data || !article_data) {
|
|
|
return null;
|
|
|
hasData = false;
|
|
|
}
|
|
|
|
|
|
let author_desc = author_data.get('author_desc');
|
|
|
let author_avatar = author_data.get('avatar');
|
|
|
let author_name = author_data.get('name');
|
|
|
let author_url = author_data.get('url');
|
|
|
let author_desc = hasData?author_data.get('author_desc'):'';
|
|
|
let author_avatar = hasData?author_data.get('avatar'):'';
|
|
|
let author_name = hasData?author_data.get('name'):'';
|
|
|
let author_url = hasData?author_data.get('url'):'';
|
|
|
let num = this.getStrSize(author_desc);
|
|
|
|
|
|
let article_title = article_data.get('article_title');
|
|
|
let pageViews = article_data.get('pageViews');
|
|
|
let publishTime = article_data.get('publishTime');
|
|
|
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={() => {
|
...
|
...
|
|