Showing
2 changed files
with
4 additions
and
7 deletions
@@ -36,20 +36,16 @@ export default class DetailBrand extends React.Component { | @@ -36,20 +36,16 @@ export default class DetailBrand extends React.Component { | ||
36 | let {url} = rowData; | 36 | let {url} = rowData; |
37 | if ((rowID+1)%4 == 0) { | 37 | if ((rowID+1)%4 == 0) { |
38 | return ( | 38 | return ( |
39 | - <TouchableOpacity onPress={()=>{this.props.onPressBrand&&this.props.onPressBrand(url)}}> | ||
40 | - <View style={styles.lastCell}> | 39 | + <TouchableOpacity style={styles.lastCell} onPress={()=>{this.props.onPressBrand&&this.props.onPressBrand(url)}}> |
41 | <Image style={styles.cellImg} source={{uri:rowData.thumb}}/> | 40 | <Image style={styles.cellImg} source={{uri:rowData.thumb}}/> |
42 | <Text style={styles.cellTitle}>{rowData.name}</Text> | 41 | <Text style={styles.cellTitle}>{rowData.name}</Text> |
43 | - </View> | ||
44 | </TouchableOpacity> | 42 | </TouchableOpacity> |
45 | ); | 43 | ); |
46 | } else { | 44 | } else { |
47 | return ( | 45 | return ( |
48 | - <TouchableOpacity onPress={()=>{this.props.onPressBrand&&this.props.onPressBrand(url)}}> | ||
49 | - <View style={styles.cell}> | 46 | + <TouchableOpacity style={styles.cell} onPress={()=>{this.props.onPressBrand&&this.props.onPressBrand(url)}}> |
50 | <Image style={styles.cellImg} source={{uri:rowData.thumb}}/> | 47 | <Image style={styles.cellImg} source={{uri:rowData.thumb}}/> |
51 | <Text style={styles.cellTitle}>{rowData.name}</Text> | 48 | <Text style={styles.cellTitle}>{rowData.name}</Text> |
52 | - </View> | ||
53 | </TouchableOpacity> | 49 | </TouchableOpacity> |
54 | ); | 50 | ); |
55 | } | 51 | } |
@@ -97,12 +97,13 @@ export default class DetailText extends React.Component { | @@ -97,12 +97,13 @@ export default class DetailText extends React.Component { | ||
97 | let template_name = resource.get('data'); | 97 | let template_name = resource.get('data'); |
98 | let text = template_name.get('text'); | 98 | let text = template_name.get('text'); |
99 | 99 | ||
100 | - text = '<html><body>' + text + '</body></html>'; | 100 | + text = '<html><style type="text/css">img {max-width: 100%;}</style><body>' + text + '</body></html>' |
101 | 101 | ||
102 | let hasLink = false; | 102 | let hasLink = false; |
103 | if (text.indexOf('<a href=') >= 0) { | 103 | if (text.indexOf('<a href=') >= 0) { |
104 | hasLink = true; | 104 | hasLink = true; |
105 | } | 105 | } |
106 | + | ||
106 | return ( | 107 | return ( |
107 | <View style={{width: width,height: this.state.realContentHeight,backgroundColor: 'white'}}> | 108 | <View style={{width: width,height: this.state.realContentHeight,backgroundColor: 'white'}}> |
108 | <WebView style={{width: width-40,height: this.state.realContentHeight,backgroundColor: 'white',marginRight: 20,marginLeft: 20}} | 109 | <WebView style={{width: width-40,height: this.state.realContentHeight,backgroundColor: 'white',marginRight: 20,marginLeft: 20}} |
-
Please register or login to post a comment