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-26 12:03:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a55a922b043100161161115f7bc4cc62bc4d0bf6
a55a922b
1 parent
8ca5ca70
AI
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
7 deletions
src/pages/Home/AISolution/Question.js
src/pages/Home/index.js
src/pages/Home/AISolution/Question.js
View file @
a55a922
...
...
@@ -15,7 +15,20 @@ import { StackNavigator, TabNavigator } from "react-navigation";
export
default
class
Home
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{};
this
.
state
=
{
QuesList
:
[
{
title
:
"1.我该称呼您先生还是女士呢?"
,
answers
:
[
"先生"
,
"女士"
],
},{
title
:
"2.请问您是否有家庭负债?"
,
answers
:
[
"有贷款"
,
"无贷款"
],
},{
title
:
"3.您要为哪些家人投保呢?"
,
answers
:
[
"先生"
,
"配偶"
,
"儿子"
,
"女儿"
,
"母亲"
,
"父亲"
]
}
]
};
}
componentWillMount
()
{}
...
...
@@ -49,6 +62,13 @@ export default class Home extends Component {
});
}
_renderQuestion
()
{
const
{
QuesList
}
=
this
.
state
;
return
(
<
Text
>
列表
<
/Text
>
)
}
render
()
{
// console.log("首页的this.props", this);
// console.log("render首页文章列表", this.state.ListData);
...
...
@@ -56,9 +76,11 @@ export default class Home extends Component {
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
智能问题
<
/Text
>
{
this
.
_renderQuestion
()}
<
/View
>
);
}
}
const
styles
=
StyleSheet
.
create
({
...
...
@@ -66,6 +88,6 @@ const styles = StyleSheet.create({
flex
:
1
,
justifyContent
:
"flex-start"
,
alignItems
:
"stretch"
,
backgroundColor
:
"#
EFEFEF
"
backgroundColor
:
"#
F0F0F0
"
},
});
...
...
src/pages/Home/index.js
View file @
a55a922
...
...
@@ -166,7 +166,7 @@ export default class Home extends Component {
navigate
(
"AIBegin"
);
}}
>
<
Image
style
=
{
styles
.
AHIcon
}
/
>
<
Image
style
=
{
styles
.
AHIcon
}
source
=
{
require
(
"../../assets/home/ic_intellect.png"
)}
/
>
<
Text
style
=
{
styles
.
AHText
}
>
智能方案
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
...
...
@@ -175,7 +175,7 @@ export default class Home extends Component {
navigate
(
"HealthBegin"
);
}}
>
<
Image
style
=
{
styles
.
AHIcon
}
/
>
<
Image
style
=
{
styles
.
AHIcon
}
source
=
{
require
(
"../../assets/home/ic_questionnaire.png"
)}
/
>
<
Text
style
=
{
styles
.
AHText
}
>
健康问卷
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
...
...
@@ -265,9 +265,21 @@ const styles = StyleSheet.create({
paddingTop
:
10
,
paddingBottom
:
10
,
},
AHContainer
:
{},
AHIcon
:
{},
AHText
:
{},
AHContainer
:
{
flexDirection
:
"row"
,
justifyContent
:
"center"
,
alignItems
:
"center"
,
},
AHIcon
:
{
width
:
40
,
height
:
40
,
},
AHText
:
{
fontSize
:
16
,
color
:
"#242424"
,
marginLeft
:
13
,
},
textContainer
:
{
backgroundColor
:
"#fff"
,
marginTop
:
10
,
...
...
Please
register
or
login
to post a comment