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-28 17:55:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7dee164b816d5a131b165e3432fb15e0712f8470
7dee164b
1 parent
96310e63
调整发现入口
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
4 deletions
src/pages/Mine/Evaluate.js
src/pages/Mine/index.js
src/pages/Mine/Evaluate.js
View file @
7dee164
...
...
@@ -9,7 +9,8 @@ import {
ScrollView
,
Dimensions
,
TextInput
,
Alert
Alert
,
AsyncStorage
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
import
post
from
"../../utils/fetch"
;
...
...
@@ -32,18 +33,38 @@ export default class Home extends Component {
super
(
props
);
this
.
state
=
{
content
:
""
,
IS_LOGIN
:
""
,
USER_ID
:
""
,
};
}
componentWillMount
()
{}
componentWillMount
()
{
this
.
getAsyncStorage
();
}
componentDidMount
()
{
this
.
props
.
navigation
.
setParams
({
submit
:
this
.
submit
.
bind
(
this
)
});
}
//
getAsyncStorage
()
{
const
that
=
this
;
AsyncStorage
.
multiGet
(
[
"IS_LOGIN"
,
"USER_ID"
],
(
err
,
result
)
=>
{
if
(
err
)
{
console
.
error
(
err
);
}
that
.
setState
({
IS_LOGIN
:
result
[
0
][
1
],
USER_ID
:
result
[
1
][
1
]
!=
null
?
result
[
1
][
1
]
:
""
,
});
}
);
}
submit
()
{
const
{
navigate
,
goBack
}
=
this
.
props
.
navigation
;
const
{
goBack
}
=
this
.
props
.
navigation
;
if
(
!
this
.
state
.
content
){
Alert
.
alert
(
"请填写评论内容"
);
}
else
{
...
...
src/pages/Mine/index.js
View file @
7dee164
...
...
@@ -354,6 +354,26 @@ export default class Mine extends Component {
<
/TouchableOpacity
>
<
/View
>
{
/* 发现 */
}
<
View
style
=
{
styles
.
midContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
navigate
(
"Discover"
);
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
发现
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
{
/* 当前版本 */
}
<
View
style
=
{
styles
.
midContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
>
...
...
Please
register
or
login
to post a comment