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
Yingchuan
2017-09-13 20:53:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bd21e8195be10f2f885d68e88d0169c494383d96
bd21e819
1 parent
252249f1
first
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
40 deletions
index.android.js
index.android.js
View file @
bd21e81
...
...
@@ -4,50 +4,102 @@
* @flow
*/
import
React
,
{
Component
}
from
'react'
;
import
{
AppRegistry
,
StyleSheet
,
Text
,
View
}
from
'react-native'
;
import
React
,
{
Component
}
from
"react"
;
import
{
AppRegistry
,
StyleSheet
,
Text
,
View
,
Image
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
export
default
class
ProtectGod
extends
Component
{
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
style
=
{
styles
.
welcome
}
>
Welcome
to
React
Native
!
<
/Text
>
<
Text
style
=
{
styles
.
instructions
}
>
To
get
started
,
edit
index
.
android
.
js
<
/Text
>
<
Text
style
=
{
styles
.
instructions
}
>
Double
tap
R
on
your
keyboard
to
reload
,{
'\n'
}
Shake
or
press
menu
button
for
dev
menu
<
/Text
>
<
/View
>
);
}
}
import
Home
from
"./src/pages/Home/index"
;
import
InsuranceCircle
from
"./src/pages/InsuranceCircle/index"
;
import
InsuranceChurch
from
"./src/pages/InsuranceChurch/index"
;
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
Details
from
"./src/pages/InsuranceCircle/details"
;
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
'#F5FCFF'
,
// 底部导航栏配置,但也只是作为一个页面,加载到StackNavigator成为第一个页面
const
MainTabBar
=
TabNavigator
({
Home
:
{
screen
:
Home
,
navigationOptions
:
{
title
:
"首页"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_home_s.png"
)}
/
>
)
:
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_home_n.png"
)}
/
>
)
}
},
welcome
:
{
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
10
,
InsuranceCircle
:
{
screen
:
InsuranceCircle
,
navigationOptions
:
{
title
:
"保圈"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_circle_s.png"
)}
/
>
)
:
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_circle_n.png"
)}
/
>
)
}
},
instructions
:
{
textAlign
:
'center'
,
color
:
'#333333'
,
marginBottom
:
5
,
InsuranceChurch
:
{
screen
:
InsuranceChurch
,
navigationOptions
:
{
title
:
"保堂"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_umbrella_s.png"
)}
/
>
)
:
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_umbrella_n.png"
)}
/
>
)
}
},
Mine
:
{
screen
:
Mine
,
navigationOptions
:
{
title
:
"我的"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_mine_s.png"
)}
/
>
)
:
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_mine_n.png"
)}
/
>
)
}
}
},{
swipeEnabled
:
true
,
tabBarOptions
:
{
activeTintColor
:
"#1B9341"
}
});
AppRegistry
.
registerComponent
(
'ProtectGod'
,
()
=>
ProtectGod
);
const
ProtectGod
=
StackNavigator
(
{
MainTabBar
:
{
screen
:
MainTabBar
},
Home
:
{
screen
:
Home
},
InsuranceCircle
:
{
screen
:
InsuranceCircle
},
InsuranceChurch
:
{
screen
:
InsuranceChurch
},
Mine
:
{
screen
:
Mine
},
Login
:
{
screen
:
Login
},
AllProduct
:
{
screen
:
AllProduct
,
navigationOptions
:
{
headerTitle
:
"全部产品"
}
},
CommonWebView
:
{
screen
:
CommonWebView
},
Details
:
{
screen
:
Details
}
},{
navigationOptions
:
{
// headerTintColor: "blue",
headerStyle
:
{
backgroundColor
:
"white"
}
}
}
);
const
styles
=
StyleSheet
.
create
(
);
AppRegistry
.
registerComponent
(
"ProtectGod"
,
()
=>
ProtectGod
);
...
...
Please
register
or
login
to post a comment