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:33:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
96310e631c183b28fc19375a393935cb8b14df95
96310e63
1 parent
2bcdc497
评价 还没发送
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
6 deletions
src/pages/Mine/Evaluate.js
src/pages/Mine/index.js
src/pages/Mine/Evaluate.js
View file @
96310e6
...
...
@@ -7,8 +7,9 @@ import {
Image
,
TouchableOpacity
,
ScrollView
,
ListView
,
Dimensions
,
TextInput
,
Alert
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
import
post
from
"../../utils/fetch"
;
...
...
@@ -29,7 +30,9 @@ export default class Home extends Component {
};
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{};
this
.
state
=
{
content
:
""
,
};
}
componentWillMount
()
{}
...
...
@@ -39,7 +42,14 @@ export default class Home extends Component {
});
}
//
submit
()
{
console
.
log
(
"提交成功"
)
}
submit
()
{
const
{
navigate
,
goBack
}
=
this
.
props
.
navigation
;
if
(
!
this
.
state
.
content
){
Alert
.
alert
(
"请填写评论内容"
);
}
else
{
Alert
.
alert
(
"提交成功"
,
null
,()
=>
goBack
());
}
}
getListData
()
{
post
(
"/test/insurance/article"
,
{},
res
=>
{},
err
=>
{});
...
...
@@ -49,7 +59,25 @@ export default class Home extends Component {
const
{
navigate
}
=
this
.
props
.
navigation
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
评价页面
<
/Text
>
{
/* <Text>评价页面</Text> */
}
<
View
style
=
{
styles
.
inputContaier
}
>
<
TextInput
style
=
{
styles
.
contentInput
}
placeholder
=
"填写评价内容"
onChangeText
=
{
content
=>
this
.
setState
({
content
})}
value
=
{
this
.
state
.
content
}
autoCapitalize
=
"none"
multiline
=
{
true
}
selectionColor
=
"#1B9341"
clearButtonMode
=
"always"
keyboardType
=
"default"
enablesReturnKeyAutomatically
=
{
true
}
returnKeyType
=
"send"
onSubmitEditing
=
{()
=>
{
Keyboard
.
dismiss
();
}}
/
>
<
/View
>
<
/View
>
);
}
...
...
@@ -61,5 +89,23 @@ const styles = StyleSheet.create({
justifyContent
:
"flex-start"
,
alignItems
:
"stretch"
,
backgroundColor
:
"#EFEFEF"
}
},
inputContaier
:
{
backgroundColor
:
"white"
,
paddingHorizontal
:
15
,
paddingVertical
:
10
,
marginVertical
:
20
,
marginHorizontal
:
15
,
borderStyle
:
"solid"
,
borderColor
:
"#EFEFEF"
,
borderTopWidth
:
1
,
flex
:
1
,
borderRadius
:
8
,
},
contentInput
:
{
fontSize
:
15
,
paddingTop
:
8
,
paddingBottom
:
7
,
flex
:
1
,
},
});
...
...
src/pages/Mine/index.js
View file @
96310e6
...
...
@@ -315,7 +315,16 @@ export default class Mine extends Component {
{
/* 评价和客服 */
}
<
View
style
=
{
styles
.
midContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
navigate
(
'Evaluate'
)}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{
if
(
this
.
state
.
IS_LOGIN
!=
"yes"
)
{
Alert
.
alert
(
"请先登录账号"
);
}
else
{
navigate
(
"Evaluate"
);
}
}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
评价我们
<
/Text
>
<
/View
>
...
...
Please
register
or
login
to post a comment