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 20:25:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
78ed22a66cec6429ec6c970aa64df5f4604fe26a
78ed22a6
1 parent
5888fb5c
AI
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
src/pages/Home/AISolution/Question.js
src/pages/Home/HealthQuestionnaire/HealthBegin.js
src/pages/Home/AISolution/Question.js
View file @
78ed22a
...
...
@@ -153,13 +153,35 @@ export default class Home extends Component {
});
}
submit
()
{
const
that
=
this
;
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
})
}
format
(
date
)
{
const
Year
=
date
.
getFullYear
();
const
Month
=
date
.
getMonth
();
const
Day
=
date
.
getDate
();
return
`
${
Year
}
-
${
Month
}
-
${
Day
}
`
;
}
render
()
{
const
{
navigate
}
=
this
.
props
.
navigation
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
>
{
this
.
_renderQuestion
()}
<
TouchableOpacity
style
=
{
styles
.
confirmBtn
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
submit
();
}}
style
=
{
styles
.
confirmBtn
}
>
<
Text
style
=
{
styles
.
confirmBtnText
}
>
生成智能方案
<
/Text
>
<
/TouchableOpacity
>
<
/ScrollView
>
...
...
@@ -225,6 +247,6 @@ const styles = StyleSheet.create({
color
:
"white"
},
dateWrapper
:
{
width
:
300
,
}
,
width
:
300
}
});
...
...
src/pages/Home/HealthQuestionnaire/HealthBegin.js
View file @
78ed22a
...
...
@@ -71,10 +71,12 @@ export default class Home extends Component {
<
TouchableOpacity
onPress
=
{()
=>
{
{
/* alert(this.state.date); */
}
{
/* alert(this.state.date); */
}
this
.
setState
({
showDate
:
!
this
.
state
.
showDate
})
})
;
}}
>
<
Text
>
打印时间
<
/Text
>
...
...
Please
register
or
login
to post a comment