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-27 10:39:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d8efb69760c69e917771c06ba07899bcc83e27aa
d8efb697
1 parent
dd2078d8
solution
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
118 additions
and
9 deletions
src/pages/Home/AISolution/Question.js
src/pages/Home/AISolution/Solution.js
src/pages/Home/AISolution/Question.js
View file @
d8efb69
...
...
@@ -155,13 +155,18 @@ export default class Home extends Component {
submit
()
{
const
that
=
this
;
const
{
navigate
}
=
this
.
props
.
navigation
;
let
Temp
=
this
.
state
.
QuesList
.
map
(
item
=>
item
.
answers
[
item
.
selected
]);
console
.
log
(
Temp
)
Temp
.
splice
(
3
,
1
,
that
.
format
(
that
.
state
.
date
));
that
.
setState
({
answerList
:
Temp
})
console
.
log
(
"hh"
)
console
.
log
(
Temp
);
Temp
.
splice
(
3
,
1
,
that
.
format
(
that
.
state
.
date
));
that
.
setState
(
{
answerList
:
Temp
},
()
=>
{
navigate
(
"AISolution"
,
{
answerList
:
that
.
state
.
answerList
});
}
);
}
format
(
date
)
{
...
...
src/pages/Home/AISolution/Solution.js
View file @
d8efb69
...
...
@@ -8,7 +8,7 @@ import {
TouchableOpacity
,
ScrollView
,
ListView
,
Dimensions
,
Dimensions
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
...
...
@@ -50,10 +50,52 @@ export default class Home extends Component {
}
render
()
{
console
.
log
(
"solution"
,
this
.
props
.
navigation
.
state
.
params
.
answerList
);
const
{
navigate
}
=
this
.
props
.
navigation
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
智能解决方案
<
/Text
>
<
View
style
=
{
styles
.
ownContaier
}
>
<
View
style
=
{
styles
.
headerContainer
}
>
<
View
style
=
{
styles
.
titleWrapper
}
>
<
Text
style
=
{
styles
.
headerTitle
}
>
关于自己的保险方案
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
infoContainer
}
>
<
View
style
=
{
styles
.
leftInfoContaier
}
>
<
View
style
=
{
styles
.
TInfoContaier
}
>
<
Text
>
年龄:
<
/Text
>
<
Text
>
16
岁
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
BInfoContaier
}
>
<
Text
>
个人年收入:
<
/Text
>
<
Text
>
10
万
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
rightInfoContaier
}
>
<
View
style
=
{
styles
.
TInfoContaier
}
>
<
Text
>
社保:
<
/Text
>
<
Text
>
有社保
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
BInfoContaier
}
>
<
Text
>
负责:
<
/Text
>
<
Text
>
XXX
贷款
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
adviceContainer
}
>
<
Text
style
=
{
styles
.
adviceText
}
>
作为家庭的经济支柱,压力和责任重大,应优先进行保险配置,且应占家庭保险的中支出和总保额的大比重,建议依次配置以下产品,以保障家庭持续、高品质的运营
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
configureContaier
}
>
<
View
style
=
{
styles
.
headerContainer
}
>
<
View
style
=
{
styles
.
titleWrapper
}
>
<
Text
style
=
{
styles
.
headerTitle
}
>
保险配置方案
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
tableContainer
}
/
>
<
/View
>
<
/View
>
);
}
...
...
@@ -64,6 +106,68 @@ const styles = StyleSheet.create({
flex
:
1
,
justifyContent
:
"flex-start"
,
alignItems
:
"stretch"
,
backgroundColor
:
"#
EFEFEF
"
backgroundColor
:
"#
F0F0F0
"
},
ownContaier
:
{
backgroundColor
:
"white"
,
marginTop
:
10
},
headerContainer
:
{
marginLeft
:
10
,
height
:
45
,
justifyContent
:
"center"
,
alignItems
:
"flex-start"
},
titleWrapper
:
{
borderStyle
:
"solid"
,
borderColor
:
"#009B3A"
,
borderLeftWidth
:
2
,
paddingLeft
:
7
},
headerTitle
:
{
fontSize
:
16
,
fontWeight
:
"bold"
},
infoContainer
:
{
marginLeft
:
18
,
borderStyle
:
"solid"
,
borderColor
:
"#E8E8E8"
,
borderTopWidth
:
0.5
,
flexDirection
:
"row"
,
paddingVertical
:
12
,
},
leftInfoContaier
:
{
flex
:
1
,
justifyContent
:
"center"
,
alignItems
:
"flex-start"
},
rightInfoContaier
:
{
flex
:
1
,
justifyContent
:
"center"
,
alignItems
:
"flex-start"
},
TInfoContaier
:
{
flexDirection
:
"row"
,
marginBottom
:
12
,
},
BInfoContaier
:
{
flexDirection
:
"row"
,
},
adviceContainer
:
{
marginLeft
:
18
,
paddingRight
:
18
,
borderStyle
:
"solid"
,
borderColor
:
"#E8E8E8"
,
borderTopWidth
:
0.5
,
paddingVertical
:
12
,
},
adviceText
:
{
fontSize
:
13
,
lineHeight
:
20
,
color
:
"#242424"
,
},
configureContaier
:
{
backgroundColor
:
"white"
,
marginTop
:
10
}
});
...
...
Please
register
or
login
to post a comment