罗广聪

products

@@ -14,16 +14,28 @@ export default class CommonImageView extends Component { @@ -14,16 +14,28 @@ export default class CommonImageView extends Component {
14 super(props); 14 super(props);
15 this.state = { 15 this.state = {
16 products: [ 16 products: [
17 - 17 + {
  18 + headerImage: require("../assets/home/product_header_1.jpg"),
  19 + title: "",
  20 + subscribe: "",
  21 + price: ""
  22 + },{
  23 + headerImage: require("../assets/home/product_header_2.jpg"),
  24 + title: "",
  25 + subscribe: "",
  26 + price: "",
  27 + }
18 ] 28 ]
19 } 29 }
20 } 30 }
21 render() { 31 render() {
22 console.log("Image index", this.props.navigation.state.params.index); 32 console.log("Image index", this.props.navigation.state.params.index);
23 const index = this.props.navigation.state.params.index; 33 const index = this.props.navigation.state.params.index;
  34 + const item = this.state.products[index];
24 return ( 35 return (
25 <View style={styles.container}> 36 <View style={styles.container}>
26 <ScrollView> 37 <ScrollView>
  38 +
27 {index == 0 ? ( 39 {index == 0 ? (
28 <Image 40 <Image
29 style={styles.imgOne} 41 style={styles.imgOne}