Toggle navigation
Toggle navigation
This project
Loading...
Sign in
罗广聪
/
ProtectGod
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
罗广聪
2017-09-19 09:44:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b29e6f71193ca04da53e7eb1678ab7004d09526c
b29e6f71
1 parent
e01a3932
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
index.ios.js
src/Components/CommonImageView.js → src/Components/ProductTemplate.js
src/pages/Home/allProduct.js
index.ios.js
View file @
b29e6f7
...
...
@@ -15,7 +15,7 @@ import Mine from "./src/pages/Mine/index";
import
Login
from
"./src/pages/Login"
;
import
AllProduct
from
"./src/pages/Home/allProduct"
;
import
CommonWebView
from
"./src/Components/CommonWebView"
;
import
CommonImageView
from
"./src/Components/CommonImageView
"
;
import
ProductTemplate
from
"./src/Components/ProductTemplate
"
;
import
ArticleTemplate
from
"./src/Components/articleTemplate"
;
import
Details
from
"./src/pages/InsuranceCircle/details"
;
...
...
@@ -89,7 +89,7 @@ const ProtectGod = StackNavigator(
navigationOptions
:
{
headerTitle
:
"全部产品"
}
},
CommonWebView
:
{
screen
:
CommonWebView
},
CommonImageView
:
{
screen
:
CommonImageView
},
ProductTemplate
:
{
screen
:
ProductTemplate
},
ArticleTemplate
:
{
screen
:
ArticleTemplate
},
Details
:
{
screen
:
Details
}
},{
...
...
src/Components/
CommonImageView
.js
→
src/Components/
ProductTemplate
.js
View file @
b29e6f7
...
...
@@ -11,7 +11,7 @@ import {
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
export
default
class
CommonImageView
extends
Component
{
export
default
class
ProductTemplate
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
...
...
@@ -123,6 +123,7 @@ const styles = StyleSheet.create({
flexDirection
:
"row"
,
paddingLeft
:
13
,
alignItems
:
"center"
,
marginBottom
:
1
,
},
midText
:
{
marginLeft
:
10
,
...
...
@@ -145,6 +146,9 @@ const styles = StyleSheet.create({
width
:
Dimensions
.
get
(
"window"
).
width
,
flexDirection
:
"row"
,
flex
:
1
,
borderColor
:
"#E4E4E4"
,
borderStyle
:
"solid"
,
borderTopWidth
:
1
,
},
footerLeft
:
{
flex
:
1
,
...
...
src/pages/Home/allProduct.js
View file @
b29e6f7
...
...
@@ -10,7 +10,7 @@ import {
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
'react-navigation'
;
import
CommonWebView
from
"../../Components/CommonWebView"
;
import
CommonImageView
from
"../../Components/CommonImageView"
;
//
import CommonImageView from "../../Components/CommonImageView";
export
default
class
AllProduct
extends
Component
{
...
...
@@ -19,11 +19,13 @@ export default class AllProduct extends Component {
this
.
state
=
{
ListData
:
[
{
id
:
0
,
title
:
"平安e生保2017版-100万(有社保含新农合)"
,
Subtitle
:
"200万医疗险,续保至99岁免审核"
,
imgurl
:
require
(
"../../assets/home/product_1.png"
)
},
{
id
:
1
,
title
:
"泰康在线“住院宝”必备版(0-49周岁)"
,
Subtitle
:
"疾病意外全面保障,补充社保不足,公共交通意外双倍赔付"
,
imgurl
:
require
(
"../../assets/home/product_2.png"
)
...
...
@@ -45,7 +47,7 @@ export default class AllProduct extends Component {
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
key
=
{
index
}
onPress
=
{()
=>
navigate
(
"
CommonImageView
"
,
{
index
:
index
})}
onPress
=
{()
=>
navigate
(
"
ProductTemplate
"
,
{
index
:
index
})}
>
<
Image
style
=
{
styles
.
itemImgWrapper
}
source
=
{
item
.
imgurl
}
/
>
<
View
style
=
{
styles
.
itemRightWrapper
}
>
...
...
Please
register
or
login
to post a comment