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-06 14:40:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
278b727d20a655efc8a97cf7351d8eeaf2d5c4d4
278b727d
1 parent
005e61a9
全部换成map
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
126 additions
and
54 deletions
src/pages/Home/allProduct.js
src/pages/Home/index.js
src/pages/InsuranceChurch/index.js
src/pages/InsuranceCircle/details.js
src/pages/InsuranceCircle/index.js
src/pages/Home/allProduct.js
View file @
278b727
...
...
@@ -75,6 +75,7 @@ export default class AllProduct extends Component {
<
/TouchableOpacity
>
);
})}
<
Text
style
=
{
styles
.
scrollViewText
}
>
没有更多了
<
/Text
>
<
/ScrollView
>
<
/View
>
);
...
...
src/pages/Home/index.js
View file @
278b727
...
...
@@ -105,6 +105,7 @@ export default class Home extends Component {
automaticallyAdjustContentInsets
=
{
false
}
>
{
this
.
_renderMap
()}
<
Text
style
=
{
styles
.
scrollViewText
}
>
没有更多了
<
/Text
>
<
/ScrollView
>
<
/View
>
);
...
...
@@ -177,5 +178,11 @@ const styles = StyleSheet.create({
fontSize
:
13
,
color
:
"#7A7A7A"
,
lineHeight
:
18
}
},
scrollViewText
:
{
color
:
"#7A7A7A"
,
fontSize
:
13
,
marginTop
:
10
,
textAlign
:
"center"
},
});
...
...
src/pages/InsuranceChurch/index.js
View file @
278b727
...
...
@@ -47,7 +47,6 @@ export default class InsuranceChurch extends Component {
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
{
/* <NewsList /> */
}
<
ScrollView
style
=
{
styles
.
scrollViewContainer
}
automaticallyAdjustContentInsets
=
{
false
}
...
...
@@ -76,6 +75,7 @@ export default class InsuranceChurch extends Component {
<
/TouchableOpacity
>
);
})}
<
Text
style
=
{
styles
.
scrollViewText
}
>
没有更多了
<
/Text
>
<
/ScrollView
>
<
/View
>
);
...
...
@@ -92,7 +92,6 @@ const styles = StyleSheet.create({
},
scrollViewContainer
:
{
height
:
300
// backgroundColor: "red"
},
scrollViewText
:
{
color
:
"#7A7A7A"
,
...
...
src/pages/InsuranceCircle/details.js
0 → 100644
View file @
278b727
import
React
,
{
Component
}
from
'react'
;
import
{
AppRegistry
,
StyleSheet
,
Text
,
View
,
ScrollView
,
TouchableOpacity
,
Image
,
}
from
'react-native'
;
export
default
class
Details
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{}
}
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
我是详情页
<
/Text
>
<
/View
>
);
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
justifyContent
:
"flex-start"
,
alignItems
:
"stretch"
,
backgroundColor
:
"#EFEFEF"
,
paddingTop
:
74
,
},
})
...
...
src/pages/InsuranceCircle/index.js
View file @
278b727
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
"react"
;
import
{
AppRegistry
,
StyleSheet
,
...
...
@@ -8,58 +7,88 @@ import {
ScrollView
,
TouchableOpacity
,
Image
}
from
'react-native'
;
}
from
"react-native"
;
import
CommonWebView
from
"../../Components/CommonWebView"
;
import
Details
from
"./details"
;
export
default
class
InsuranceCircle
extends
Component
{
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
NewsList
jumP
=
{()
=>
{
this
.
props
.
navigator
.
push
({
component
:
CommonWebView
,
title
:
"hjjj"
,
rightButtonTitle
:
'Cancel'
,})}}
/
>
<
/View
>
);
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
ListData
:
[
{
title
:
"家庭经济越差越应该买保险,因为你病不起,输不起,也折腾不起…"
,
content
:
"现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…"
,
name
:
"jack"
,
image
:
require
(
"../../assets/circle/newspic.png"
),
num
:
"30"
,
comments
:
[]
},
{
title
:
"家庭经济越差越应该买保险,因为你病不起,输不起,也折腾不起…"
,
content
:
"现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…"
,
name
:
"mike"
,
image
:
require
(
"../../assets/circle/newspic.png"
),
num
:
"29"
,
comments
:
[]
},
{
title
:
"因为你病不起,输不起,也折腾不起…"
,
content
:
"现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…"
,
name
:
"luosf"
,
image
:
require
(
"../../assets/circle/newspic.png"
),
num
:
"10"
,
comments
:
[]
}
}
class
NewsList
extends
Component
{
render
()
{
return
(
<
ScrollView
style
=
{
styles
.
scrollViewContainer
}
automaticallyAdjustContentInsets
=
{
false
}
>
<
ListItem
jump
=
{
this
.
props
.
jumP
}
title
=
{
"家庭经济越差越应该买保险,因为你病不起,输不起,也折腾不起…"
}
content
=
{
"现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…"
}
name
=
{
"汉克斯"
}
num
=
{
"30"
}
/
>
<
ListItem
title
=
{
"家庭经济越差越应该买保险,因为你病不起,输不起,也折腾不起…"
}
content
=
{
"现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…"
}
name
=
{
"汉克斯"
}
num
=
{
"30"
}
/
>
<
Text
style
=
{
styles
.
scrollViewText
}
>
没有更多了
<
/Text
>
<
/ScrollView
>
)
]
};
}
}
class
ListItem
extends
Component
{
render
()
{
return
(
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{
this
.
props
.
jump
}
>
<
Text
style
=
{
styles
.
itemTitle
}
numberOfLines
=
{
2
}
>
{
this
.
props
.
title
}
<
/Text
>
<
Text
style
=
{
styles
.
itemContent
}
numberOfLines
=
{
3
}
>
{
this
.
props
.
content
}
<
/Text
>
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollViewContainer
}
automaticallyAdjustContentInsets
=
{
false
}
>
{
this
.
state
.
ListData
.
map
((
item
,
index
)
=>
{
return
(
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
key
=
{
index
}
onPress
=
{()
=>
{
this
.
props
.
navigator
.
push
({
component
:
Details
,
passProps
:
{}
});
}}
>
<
Text
style
=
{
styles
.
itemTitle
}
numberOfLines
=
{
2
}
>
{
item
.
title
}
<
/Text
>
<
Text
style
=
{
styles
.
itemContent
}
numberOfLines
=
{
3
}
>
{
item
.
content
}
<
/Text
>
<
View
style
=
{
styles
.
itemInfoWrapper
}
>
<
View
style
=
{
styles
.
itemInfoLeft
}
>
<
Image
source
=
{
require
(
"../../assets/Mine/iconpic1.png"
)}
style
=
{[
styles
.
itemInfoIcon
,{
width
:
26
,
height
:
26
}]}
/
>
{
/* <View style={styles.itemInfoIcon}></View> */
}
<
Text
style
=
{
styles
.
itemInfoName
}
>
{
this
.
props
.
name
}
<
/Text
>
<
Image
source
=
{
item
.
image
}
style
=
{[
styles
.
itemInfoIcon
,
{
width
:
26
,
height
:
26
}]}
/
>
<
Text
style
=
{
styles
.
itemInfoName
}
>
{
item
.
name
}
<
/Text
>
<
/View
>
<
Text
style
=
{
styles
.
itemInfoRight
}
>
{
this
.
props
.
num
}
评论
<
/Text
>
<
Text
style
=
{
styles
.
itemInfoRight
}
>
{
item
.
num
}
评论
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
)
);
})}
<
Text
style
=
{
styles
.
scrollViewText
}
>
没有更多了
<
/Text
>
<
/ScrollView
>
<
/View
>
);
}
}
...
...
@@ -69,10 +98,10 @@ const styles = StyleSheet.create({
justifyContent
:
"flex-start"
,
alignItems
:
"stretch"
,
backgroundColor
:
"#EFEFEF"
,
paddingTop
:
74
,
paddingTop
:
74
},
scrollViewContainer
:
{
height
:
300
,
height
:
300
},
scrollViewText
:
{
color
:
"#7A7A7A"
,
...
...
@@ -86,7 +115,7 @@ const styles = StyleSheet.create({
height
:
180
,
paddingLeft
:
13
,
paddingRight
:
13
,
paddingTop
:
19
,
paddingTop
:
19
},
itemTitle
:
{
fontSize
:
17
,
...
...
@@ -108,20 +137,19 @@ const styles = StyleSheet.create({
itemInfoLeft
:
{
flexDirection
:
"row"
,
justifyContent
:
"flex-start"
,
alignItems
:
"center"
,
alignItems
:
"center"
},
itemInfoIcon
:
{
marginRight
:
10
,
marginRight
:
10
},
itemInfoName
:
{
fontSize
:
13
,
color
:
"#242424"
,
lineHeight
:
18
,
lineHeight
:
18
},
itemInfoRight
:
{
fontSize
:
13
,
color
:
"#999999"
,
lineHeight
:
18
,
},
})
lineHeight
:
18
}
});
...
...
Please
register
or
login
to post a comment