Authored by yoho-js001

Fix UI bug.

... ... @@ -36,20 +36,16 @@ export default class DetailBrand extends React.Component {
let {url} = rowData;
if ((rowID+1)%4 == 0) {
return (
<TouchableOpacity onPress={()=>{this.props.onPressBrand&&this.props.onPressBrand(url)}}>
<View style={styles.lastCell}>
<Image style={styles.cellImg} source={{uri:rowData.thumb}}/>
<Text style={styles.cellTitle}>{rowData.name}</Text>
</View>
<TouchableOpacity style={styles.lastCell} onPress={()=>{this.props.onPressBrand&&this.props.onPressBrand(url)}}>
<Image style={styles.cellImg} source={{uri:rowData.thumb}}/>
<Text style={styles.cellTitle}>{rowData.name}</Text>
</TouchableOpacity>
);
} else {
return (
<TouchableOpacity onPress={()=>{this.props.onPressBrand&&this.props.onPressBrand(url)}}>
<View style={styles.cell}>
<Image style={styles.cellImg} source={{uri:rowData.thumb}}/>
<Text style={styles.cellTitle}>{rowData.name}</Text>
</View>
<TouchableOpacity style={styles.cell} onPress={()=>{this.props.onPressBrand&&this.props.onPressBrand(url)}}>
<Image style={styles.cellImg} source={{uri:rowData.thumb}}/>
<Text style={styles.cellTitle}>{rowData.name}</Text>
</TouchableOpacity>
);
}
... ...
... ... @@ -97,12 +97,13 @@ export default class DetailText extends React.Component {
let template_name = resource.get('data');
let text = template_name.get('text');
text = '<html><body>' + text + '</body></html>';
text = '<html><style type="text/css">img {max-width: 100%;}</style><body>' + text + '</body></html>'
let hasLink = false;
if (text.indexOf('<a href=') >= 0) {
hasLink = true;
}
return (
<View style={{width: width,height: this.state.realContentHeight,backgroundColor: 'white'}}>
<WebView style={{width: width-40,height: this.state.realContentHeight,backgroundColor: 'white',marginRight: 20,marginLeft: 20}}
... ...