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-08 12:04:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
96133a59530737e1b973fa7bc1c27d51577c3d0d
96133a59
1 parent
63d7a625
留言部分 +每个页面标题
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
122 deletions
ios/ProtectGod.xcodeproj/project.pbxproj
src/pages/Home/index.js
src/pages/InsuranceCircle/details.js
src/pages/main.js
ios/ProtectGod.xcodeproj/project.pbxproj
View file @
96133a5
...
...
@@ -598,6 +598,7 @@
TargetAttributes = {
00E356ED1AD99517003FC87E = {
CreatedOnToolsVersion = 6.2;
DevelopmentTeam = EG4Q9YQ2UZ;
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
...
...
@@ -1009,6 +1010,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = EG4Q9YQ2UZ;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
...
...
@@ -1030,6 +1032,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = EG4Q9YQ2UZ;
INFOPLIST_FILE = ProtectGodTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
...
...
src/pages/Home/index.js
View file @
96133a5
...
...
@@ -27,13 +27,13 @@ export default class Home extends Component {
{
title
:
"平安保险第二个"
,
context
:
"600万医疗报废,自费药,进口药,器材费"
,
url
:
"http://m
p.weixin.qq.com/s?src=11×tamp=1504835681&ver=379&signature=fOt9QFjJYE6jPJF-Lp82mo7Z9qorXVqlXw7CIAhR*e7tOPzm8qcuFreVBK4Gybr*7HdhuHRi9zz-JMSa9FwZ7XDfU187dkJx*85Y3dnjO4Dj-ocM1FDT2yyZy4hg41pK&new=1
"
,
url
:
"http://m
.people.cn/n4/2017/0907/c190-9825877.html?admincptm=1504789835057
"
,
imgurl
:
require
(
"../../assets/circle/newspic.png"
)
},
{
title
:
"平安保险第三个"
,
context
:
"600万医疗报废,自费药,进口药,器材费"
,
url
:
"http://m
p.weixin.qq.com/s/T-EzAV0-dwGHpaM8nDrtUA
"
,
url
:
"http://m
.people.cn/n4/2017/0907/c190-9825877.html?admincptm=1504789835057
"
,
imgurl
:
require
(
"../../assets/circle/newspic.png"
)
},
{
...
...
src/pages/InsuranceCircle/details.js
View file @
96133a5
...
...
@@ -7,7 +7,8 @@ import {
ScrollView
,
TouchableOpacity
,
Image
,
TextInput
TextInput
,
KeyboardAvoidingView
,
}
from
"react-native"
;
export
default
class
Details
extends
Component
{
...
...
@@ -26,6 +27,7 @@ export default class Details extends Component {
const
{
data
}
=
this
.
state
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
KeyboardAvoidingView
behavior
=
"padding"
style
=
{
styles
.
KAVContainer
}
>
<
ScrollView
style
=
{
styles
.
scrollViewContainer
}
automaticallyAdjustContentInsets
=
{
false
}
...
...
@@ -67,12 +69,12 @@ export default class Details extends Component {
<
Text
style
=
{
styles
.
itemBeenreplyer
}
>
{
item
.
beenreplyer
}
<
/Text
>
<
Text
style
=
{
styles
.
itemTime
}
>
{
item
.
time
}
<
/Text
>
<
/View
>
<
Image
<
Text
style
=
{
styles
.
itemTime
}
>
{
item
.
time
}
<
/Text
>
{
/* <Image
style={styles.itemRightTopRight}
source={require("../../assets/tabbar/ic_circle_n.png")}
/
>
/>
*/
}
<
/View
>
<
Text
style
=
{
styles
.
itemRightBottom
}
>
{
item
.
content
}
<
/Text
>
<
/View
>
...
...
@@ -80,24 +82,28 @@ export default class Details extends Component {
);
})}
<
/View
>
<
/ScrollView
>
{
/* 回复框 */
}
<
View
style
=
{
styles
.
sendMsgContaier
}
>
<
TextInput
style
=
{
styles
.
msgInput
}
placeholder
=
"
回复 汉克斯
"
placeholder
=
"
留言
"
onChangeText
=
{
text
=>
this
.
setState
({
text
})}
value
=
{
this
.
state
.
text
}
autoCapitalize
=
"none"
selectionColor
=
"#1B9341"
clearTextOnFocus
=
{
true
}
numberOfLines
=
{
1
}
clearButtonMode
=
"always"
keyboardType
=
"default"
enablesReturnKeyAutomatically
=
{
true
}
returnKeyType
=
"send"
/
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
sendMsg
()}
>
<
TouchableOpacity
style
=
{
styles
.
sendButtonContaier
}
onPress
=
{()
=>
this
.
sendMsg
()}
>
<
Text
style
=
{
styles
.
sendButton
}
>
发送
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/Scroll
View
>
<
/KeyboardAvoiding
View
>
<
/View
>
);
}
...
...
@@ -106,15 +112,6 @@ export default class Details extends Component {
var
that
=
this
;
this
.
setState
({
text
:
""
,
// data: that.state.data.comments.push(
// {
// replyer: "噢噢噢",
// replayicon: require("../../assets/Mine/iconpic1.png"),
// beenreplyer: "嘿嘿嘿",
// content: this.state.text,
// time: "刚刚",
// }
// )
});
}
}
...
...
@@ -129,9 +126,14 @@ const styles = StyleSheet.create({
backgroundColor
:
"white"
,
paddingTop
:
64
},
KAVContainer
:
{
flex
:
1
,
justifyContent
:
'center'
,
// paddingHorizontal: 20,
// paddingTop: 20,
},
scrollViewContainer
:
{
// height: 300,
marginBottom
:
64
,
flex
:
1
,
},
titleText
:
{
marginTop
:
21
,
...
...
@@ -266,26 +268,39 @@ const styles = StyleSheet.create({
},
sendMsgContaier
:
{
flexDirection
:
"row"
,
//
justifyContent: "center",
justifyContent
:
"center"
,
alignItems
:
"center"
,
height
:
52
,
paddingLeft
:
15
,
paddingRight
:
15
,
// height: 48
// position: "absolute",
// bottom: 60,
// right: 0,
// backgroundColor: "white",
borderStyle
:
"solid"
,
borderColor
:
"#E8E8E8"
,
borderTopWidth
:
1
,
backgroundColor
:
"#E6E6E6"
,
},
msgInput
:
{
flex
:
7
,
fontSize
:
15
// color: "#999999",
flex
:
1
,
fontSize
:
15
,
borderWidth
:
1
,
borderColor
:
"#DCDCDC"
,
borderRadius
:
4
,
paddingTop
:
8
,
paddingBottom
:
7
,
paddingLeft
:
13
,
backgroundColor
:
"white"
,
},
sendButtonContaier
:
{
// flex: 1,
alignItems
:
"center"
,
justifyContent
:
"center"
,
},
sendButton
:
{
flex
:
3
,
fontSize
:
15
,
marginLeft
:
15
,
color
:
"#1B9341"
,
borderColor
:
"#E6E6E6"
,
borderStyle
:
"solid"
,
borderLeftWidth
:
0.5
,
}
});
...
...
src/pages/main.js
View file @
96133a5
...
...
@@ -15,108 +15,106 @@ import InsuranceChurch from "./InsuranceChurch/index";
import
Mine
from
"./Mine/index"
;
import
Login
from
"./Login"
;
var
scale
=
Dimensions
.
get
(
'window'
).
scale
;
var
scale
=
Dimensions
.
get
(
"window"
).
scale
;
export
default
class
Main
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
selectedItem
:
"home"
,
}
selectedTab
:
"home"
};
}
componentWillMount
()
{
console
.
log
(
"loginSuccess"
,
this
.
props
);
}
console
.
log
(
"loginSuccess"
,
this
.
props
);
}
render
()
{
const
{
loginSuccess
}
=
this
.
props
;
return
(
loginSuccess
?
(
<
TabBarIOS
tintColor
=
"#08CC6A"
barTintColor
=
"white"
>
<
TabBarIOS
.
Item
title
=
"首页"
icon
=
{
require
(
"../assets/tabbar/ic_home_n.png"
)}
selected
=
{
this
.
state
.
selectedItem
==
"home"
}
onPress
=
{()
=>
{
this
.
setState
({
selectedItem
:
"home"
});
}}
>
<
NavigatorIOS
style
=
{{
flex
:
1
}}
initialRoute
=
{{
component
:
Home
,
title
:
"保护神"
}}
/
>
<
/TabBarIOS.Item
>
<
TabBarIOS
.
Item
title
=
"保圈"
icon
=
{
require
(
"../assets/tabbar/ic_circle_n.png"
)}
selected
=
{
this
.
state
.
selectedItem
==
"insuranceCircle"
}
onPress
=
{()
=>
{
this
.
setState
({
selectedItem
:
"insuranceCircle"
});
}}
>
<
NavigatorIOS
style
=
{{
flex
:
1
}}
initialRoute
=
{{
component
:
InsuranceCircle
,
title
:
"保护神"
,
}}
/
>
<
/TabBarIOS.Item
>
<
TabBarIOS
.
Item
title
=
"保堂"
icon
=
{
require
(
"../assets/tabbar/ic_umbrella_n.png"
)}
selected
=
{
this
.
state
.
selectedItem
==
"insuranceChurch"
}
onPress
=
{()
=>
{
this
.
setState
({
selectedItem
:
"insuranceChurch"
});
}}
>
<
NavigatorIOS
style
=
{{
flex
:
1
}}
initialRoute
=
{{
component
:
InsuranceChurch
,
title
:
"保护神"
}}
/
>
<
/TabBarIOS.Item
>
<
TabBarIOS
.
Item
title
=
"我的"
icon
=
{
require
(
"../assets/tabbar/ic_mine_n.png"
)}
selected
=
{
this
.
state
.
selectedItem
==
"mine"
}
onPress
=
{()
=>
{
this
.
setState
({
selectedItem
:
"mine"
});
}}
>
<
NavigatorIOS
style
=
{{
flex
:
1
}}
initialRoute
=
{{
component
:
Mine
,
title
:
"保护神"
,
passProps
:
{
onLogin
:
this
.
props
.
onLogin
}
}}
/
>
<
/TabBarIOS.Item
>
<
/TabBarIOS
>
)
:
(
<
Login
loginSuccess
=
{
this
.
props
.
loginSuccess
}
onLogin
=
{
this
.
props
.
onLogin
}
/
>
)
return
loginSuccess
?
(
<
TabBarIOS
tintColor
=
"#08CC6A"
barTintColor
=
"white"
>
<
TabBarIOS
.
Item
title
=
"首页"
icon
=
{
require
(
"../assets/tabbar/ic_home_n.png"
)}
selected
=
{
this
.
state
.
selectedItem
==
"home"
}
onPress
=
{()
=>
{
this
.
setState
({
selectedItem
:
"home"
});
}}
>
<
NavigatorIOS
style
=
{{
flex
:
1
}}
initialRoute
=
{{
component
:
Home
,
title
:
"首页"
,
}}
/
>
<
/TabBarIOS.Item
>
<
TabBarIOS
.
Item
title
=
"保圈"
icon
=
{
require
(
"../assets/tabbar/ic_circle_n.png"
)}
selected
=
{
this
.
state
.
selectedItem
==
"insuranceCircle"
}
onPress
=
{()
=>
{
this
.
setState
({
selectedItem
:
"insuranceCircle"
});
}}
>
<
NavigatorIOS
style
=
{{
flex
:
1
}}
initialRoute
=
{{
component
:
InsuranceCircle
,
title
:
"保圈"
,
}}
/
>
<
/TabBarIOS.Item
>
<
TabBarIOS
.
Item
title
=
"保堂"
icon
=
{
require
(
"../assets/tabbar/ic_umbrella_n.png"
)}
selected
=
{
this
.
state
.
selectedItem
==
"insuranceChurch"
}
onPress
=
{()
=>
{
this
.
setState
({
selectedItem
:
"insuranceChurch"
});
}}
>
<
NavigatorIOS
style
=
{{
flex
:
1
}}
initialRoute
=
{{
component
:
InsuranceChurch
,
title
:
"保堂"
}}
/
>
<
/TabBarIOS.Item
>
<
TabBarIOS
.
Item
title
=
"我的"
icon
=
{
require
(
"../assets/tabbar/ic_mine_n.png"
)}
selected
=
{
this
.
state
.
selectedItem
==
"mine"
}
onPress
=
{()
=>
{
this
.
setState
({
selectedItem
:
"mine"
});
}}
>
<
NavigatorIOS
style
=
{{
flex
:
1
}}
initialRoute
=
{{
component
:
Mine
,
title
:
"我的"
,
passProps
:
{
onLogin
:
this
.
props
.
onLogin
}
}}
/
>
<
/TabBarIOS.Item
>
<
/TabBarIOS
>
)
:
(
<
Login
loginSuccess
=
{
this
.
props
.
loginSuccess
}
onLogin
=
{
this
.
props
.
onLogin
}
/
>
);
}
}
...
...
Please
register
or
login
to post a comment