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-10 15:08:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8bdffa5e1c008f4037db1d6ebd4764100574b08a
8bdffa5e
1 parent
01ae7cdc
精简代码 目前除了登录一切OK
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
89 deletions
index.ios.js
src/Components/Carousel.js
src/pages/Home/index.js
src/pages/InsuranceChurch/index.js
src/pages/InsuranceCircle/index.js
src/pages/Mine/index.js
index.ios.js
View file @
8bdffa5
...
...
@@ -17,11 +17,12 @@ import AllProduct from "./src/pages/Home/allProduct";
import
CommonWebView
from
"./src/Components/CommonWebView"
;
import
Details
from
"./src/pages/InsuranceCircle/details"
;
// 底部导航栏配置,但也只是作为一个页面,加载到StackNavigator成为第一个页面
const
MainTabBar
=
TabNavigator
({
Home
:
{
screen
:
Home
,
navigationOptions
:
{
//
title: "首页",
title
:
"首页"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_home_s.png"
)}
/
>
...
...
@@ -33,7 +34,7 @@ const MainTabBar = TabNavigator({
InsuranceCircle
:
{
screen
:
InsuranceCircle
,
navigationOptions
:
{
// title: "首页
",
title
:
"保圈
"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_circle_s.png"
)}
/
>
...
...
@@ -45,7 +46,7 @@ const MainTabBar = TabNavigator({
InsuranceChurch
:
{
screen
:
InsuranceChurch
,
navigationOptions
:
{
// title: "首页
",
title
:
"保堂
"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_umbrella_s.png"
)}
/
>
...
...
@@ -57,7 +58,7 @@ const MainTabBar = TabNavigator({
Mine
:
{
screen
:
Mine
,
navigationOptions
:
{
// title: "首页
",
title
:
"我的
"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_mine_s.png"
)}
/
>
...
...
@@ -73,31 +74,8 @@ const MainTabBar = TabNavigator({
}
});
// class Main extends Component {
// constructor(props) {
// super(props);
// this.state = {
// isLoading: false,
// isLogin: true
// };
// }
// render() {
// const { isLogin } = this.state;
// return isLogin ? (
// <MainTabBar />
// ) : (
// <Login
// loginSuccess={this.props.loginSuccess}
// onLogin={this.props.onLogin}
// />
// );
// }
// }
const
ProtectGod
=
StackNavigator
(
{
// Main: { screen: Main },
MainTabBar
:
{
screen
:
MainTabBar
},
Home
:
{
screen
:
Home
},
InsuranceCircle
:
{
screen
:
InsuranceCircle
},
...
...
@@ -111,26 +89,10 @@ const ProtectGod = StackNavigator(
CommonWebView
:
{
screen
:
CommonWebView
},
Details
:
{
screen
:
Details
}
},
{
navigationOptions
:
{
// 顶部标题颜色
// headerTintColor: 'red',
// 顶部背景颜色
// headerStyle: {backgroundColor: "white"},
// headerTitleStyle: {alignSelf: 'center'},
}
}
);
const
styles
=
StyleSheet
.
create
(
{
// container: {
// flex: 1,
// justifyContent: "center",
// alignItems: "center",
// backgroundColor: "#F5FCFF"
// }
}
);
AppRegistry
.
registerComponent
(
"ProtectGod"
,
()
=>
ProtectGod
);
...
...
src/Components/Carousel.js
deleted
100644 → 0
View file @
01ae7cd
import
React
,
{
Component
}
from
"react"
;
import
{
AppRegistry
,
StyleSheet
,
Text
,
View
,
Image
,
Dimensions
}
from
"react-native"
;
var
width
=
Dimensions
.
get
(
'window'
).
width
;
var
height
=
width
*
(
140
/
375
);
// var height = Dimensions.get('window').height;
var
scale
=
Dimensions
.
get
(
'window'
).
scale
;
export
default
class
Carousel
extends
Component
{
render
()
{
console
.
log
(
width
,
height
,
scale
);
return
(
<
Image
source
=
{
require
(
"../assets/WechatIMG10.png"
)}
style
=
{{
width
:
width
,
height
:
140
}}
/
>
);
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
justifyContent
:
"center"
,
alignItems
:
"center"
,
backgroundColor
:
"#F5FCFF"
},
welcome
:
{
fontSize
:
20
,
textAlign
:
"center"
,
margin
:
10
}
});
src/pages/Home/index.js
View file @
8bdffa5
...
...
@@ -14,9 +14,9 @@ import Swiper from "react-native-swiper";
import
CommonWebView
from
"../../Components/CommonWebView"
;
export
default
class
Home
extends
Component
{
static
navigationOptions
=
{
title
:
"首页"
};
//
static navigationOptions = {
//
title: "首页"
//
};
constructor
(
props
)
{
super
(
props
);
this
.
_renderMap
=
this
.
_renderMap
.
bind
(
this
);
...
...
src/pages/InsuranceChurch/index.js
View file @
8bdffa5
...
...
@@ -12,9 +12,9 @@ import { StackNavigator, TabNavigator } from 'react-navigation';
import
CommonWebView
from
"../../Components/CommonWebView"
;
export
default
class
InsuranceChurch
extends
Component
{
static
navigationOptions
=
{
title
:
'保堂'
,
};
//
static navigationOptions = {
//
title: '保堂',
//
};
constructor
(
props
)
{
super
(
props
);
// this._renderMap = this._renderMap.bind(this);
...
...
src/pages/InsuranceCircle/index.js
View file @
8bdffa5
...
...
@@ -13,9 +13,9 @@ import CommonWebView from "../../Components/CommonWebView";
import
Details
from
"./details"
;
export
default
class
InsuranceCircle
extends
Component
{
static
navigationOptions
=
{
title
:
'保圈'
,
};
//
static navigationOptions = {
//
title: '保圈',
//
};
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
...
...
src/pages/Mine/index.js
View file @
8bdffa5
...
...
@@ -11,9 +11,9 @@ import {
import
{
StackNavigator
,
TabNavigator
}
from
'react-navigation'
;
export
default
class
Mine
extends
Component
{
static
navigationOptions
=
{
title
:
'我的'
,
};
//
static navigationOptions = {
//
title: '我的',
//
};
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
...
...
Please
register
or
login
to post a comment