罗广聪

全部产品页面无法跳转

... ... @@ -3,6 +3,8 @@ import {
StyleSheet,
WebView,
View,
Image,
Dimensions
} from 'react-native';
import { StackNavigator, TabNavigator } from 'react-navigation';
... ... @@ -13,6 +15,7 @@ export default class CommonWebview extends Component {
}
render() {
console.log("url",this.props)
const url = this.props.navigation.state.params.item.url;
return (
<WebView
style={styles.container}
... ... @@ -29,6 +32,11 @@ const styles = StyleSheet.create({
paddingTop: 64,
justifyContent: "flex-start",
alignItems: "stretch",
backgroundColor: "#EFEFEF"
backgroundColor: "#EFEFEF",
paddingLeft: 10,
paddingRight: 10,
},
// img: {
// width: Dimensions.get("window").width - 20,
// },
});
... ...
... ... @@ -21,12 +21,14 @@ export default class AllProduct extends Component {
title: "平安e生保2017版-100万(有社保含新农合)",
time: "刚刚",
url: "http://hankschan.legendh5.com/h5/b8302dac-0563-478c-ff82-ba8ab20c1cb3.html",
// url: require("../../assets/home/product_long_1.jpg"),
imgurl: require("../../assets/home/product_1.png")
},
{
title: "泰康在线“住院宝”必备版(0-49周岁)",
time: "刚刚",
url: "http://hankschan.legendh5.com/h5/f782ab69-6515-3e70-025a-5da78f1f745f.html",
// url: require("../../assets/home/product_long_1.jpg"),
imgurl: require("../../assets/home/product_2.png")
},
]
... ... @@ -35,6 +37,7 @@ export default class AllProduct extends Component {
render() {
const { navigate } = this.props.navigation;
{/* onPress={() => navigate("CommonWebview", { item: item })} */}
return (
<View style={styles.container}>
<ScrollView
... ...