...
|
...
|
@@ -28,13 +28,13 @@ export default class List extends Component { |
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
let src = this.props.resource.src;
|
|
|
let src = this.props.resource.get('src');
|
|
|
let bigPic = getSlicedUrl(src, 640, 640, 2);
|
|
|
Image.getSize(bigPic, (width, height) => {
|
|
|
let newWidth = Dimensions.get('window').width;
|
|
|
let newHeight = Dimensions.get('window').width/width*height;
|
|
|
Image.getSize(bigPic, (width, height) => {
|
|
|
let newWidth = Dimensions.get('window').width;
|
|
|
let newHeight = Dimensions.get('window').width/width*height;
|
|
|
this.setState({width: newWidth, height: newHeight });
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
_renderHeader() {
|
...
|
...
|
@@ -81,6 +81,7 @@ export default class List extends Component { |
|
|
id,
|
|
|
isFavor,
|
|
|
} = this.props.resource.toJS();
|
|
|
let {hiddenTagView} = this.props;
|
|
|
let urlAry = url.split('&');
|
|
|
let shareParam = {
|
|
|
title,
|
...
|
...
|
@@ -103,9 +104,12 @@ export default class List extends Component { |
|
|
<View style={styles.sapatorView}/>
|
|
|
{this._renderHeader()}
|
|
|
<Image style={[styles.image,{width: this.state.width, height: this.state.height}]} source={{uri:bigPic}}>
|
|
|
<Image style={styles.tagContainer} source={tagImg}>
|
|
|
<Text style={styles.tagText}>{category_name}</Text>
|
|
|
</Image>
|
|
|
{!hiddenTagView?
|
|
|
<Image style={styles.tagContainer} source={tagImg}>
|
|
|
<Text style={styles.tagText}>{category_name}</Text>
|
|
|
</Image>
|
|
|
:null
|
|
|
}
|
|
|
</Image>
|
|
|
<Text style={styles.titleText}>{title}</Text>
|
|
|
<Text style={styles.contentText} numberOfLines={3}>{intro}</Text>
|
...
|
...
|
|