Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gmalpha_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile
gmalpha_flutter
Commits
c2950920
Commit
c2950920
authored
May 23, 2019
by
jinzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
53c641c5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
comment_suggest.dart
lib/comment_suggest.dart
+3
-1
DioUtil.dart
lib/netWork/DioUtil.dart
+1
-1
No files found.
lib/comment_suggest.dart
View file @
c2950920
...
@@ -157,12 +157,14 @@ class _CommentSuggestPageState extends State<CommentSuggestPage> {
...
@@ -157,12 +157,14 @@ class _CommentSuggestPageState extends State<CommentSuggestPage> {
String
phone
=
(
this
.
telCtrl
.
text
.
length
>
0
)?
this
.
telCtrl
.
text
:
''
;
String
phone
=
(
this
.
telCtrl
.
text
.
length
>
0
)?
this
.
telCtrl
.
text
:
''
;
DioUtil
().
requestR
(
Method
.
post
,
"api/v1/suggestion"
,
data:
{
"content"
:
content
,
"phone"
:
phone
}).
then
((
res
){
DioUtil
().
requestR
(
Method
.
post
,
"api/v1/suggestion"
,
data:
{
"content"
:
content
,
"phone"
:
phone
}).
then
((
res
){
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
Toast
.
show
(
context
,
'请求成功'
);
Toast
.
show
(
context
,
'提交成功'
);
FlutterBoost
.
singleton
.
closePageForContext
(
context
);
}
else
{
}
else
{
Toast
.
show
(
context
,
res
.
msg
);
Toast
.
show
(
context
,
res
.
msg
);
}
}
}
}
).
then
((
error
){
).
then
((
error
){
Toast
.
show
(
context
,
'提交失败'
);
print
(
error
);
print
(
error
);
});
});
}
}
...
...
lib/netWork/DioUtil.dart
View file @
c2950920
...
@@ -438,7 +438,7 @@ class DioUtil {
...
@@ -438,7 +438,7 @@ class DioUtil {
options
.
connectTimeout
=
10
*
1000
;
options
.
connectTimeout
=
10
*
1000
;
options
.
receiveTimeout
=
20
*
1000
;
options
.
receiveTimeout
=
20
*
1000
;
options
.
contentType
=
ContentType
.
parse
(
'application/x-www-form-urlencoded'
);
options
.
contentType
=
ContentType
.
parse
(
'application/x-www-form-urlencoded'
);
options
.
baseUrl
=
'http
://earth.gmapp
.com/'
;
options
.
baseUrl
=
'http
s://earth.iyanzhi
.com/'
;
Map
<
String
,
dynamic
>
headers
=
Map
<
String
,
dynamic
>();
Map
<
String
,
dynamic
>
headers
=
Map
<
String
,
dynamic
>();
headers
[
'Accept'
]
=
'application/json'
;
headers
[
'Accept'
]
=
'application/json'
;
return
options
;
return
options
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment