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
ddd1178a
Commit
ddd1178a
authored
Jun 04, 2019
by
马士红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.wanmeizhensuo.com:mobile/gmalpha_flutter
parents
3476da0e
215838f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
comment_suggest.dart
lib/comment_suggest.dart
+11
-2
main.dart
lib/main.dart
+1
-1
DioUtil.dart
lib/netWork/DioUtil.dart
+1
-1
No files found.
lib/comment_suggest.dart
View file @
ddd1178a
...
@@ -62,6 +62,8 @@ class _CommentSuggestPageState extends State<CommentSuggestPage> {
...
@@ -62,6 +62,8 @@ class _CommentSuggestPageState extends State<CommentSuggestPage> {
color:
ALColors
.
Color323232
,
color:
ALColors
.
Color323232
,
),
),
onTap:
()
{
onTap:
()
{
print
(
'123-------'
);
// FlutterBoost.singleton.closePageForContext(context);
FlutterBoost
.
singleton
.
closePageForContext
(
context
);
FlutterBoost
.
singleton
.
closePageForContext
(
context
);
}),
}),
),
),
...
@@ -157,13 +159,20 @@ class _CommentSuggestPageState extends State<CommentSuggestPage> {
...
@@ -157,13 +159,20 @@ 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
){
print
(
error
);
if
(
error
!=
null
)
{
Toast
.
show
(
context
,
'提交失败'
);
print
(
error
);
}
else
{
// FlutterBoost.singleton.closePageForContext(context);
}
});
});
}
}
...
...
lib/main.dart
View file @
ddd1178a
...
@@ -42,7 +42,7 @@ class _MyAppState extends State<MyApp> {
...
@@ -42,7 +42,7 @@ class _MyAppState extends State<MyApp> {
debugShowCheckedModeBanner:
false
,
debugShowCheckedModeBanner:
false
,
initialRoute:
'/test'
,
//调试的时候可以打开
initialRoute:
'/test'
,
//调试的时候可以打开
routes:
{
routes:
{
'/'
:
(
context
)
=>
CommentSuggest
({
'cookie'
:
'124'
}),
'/'
:
(
context
)
=>
CommentSuggest
({
"Cookie"
:
" _gm_token=7e48641558699683; sessionid=nb3ze4ur7ucosln8sd8pzwojddenv9ym; _gtid=a1bc0a387e1911e996b9525400fa516d4094"
}),
},
//调试的时候可以打开
},
//调试的时候可以打开
builder:
FlutterBoost
.
init
(
postPush:
_onRoutePushed
),
builder:
FlutterBoost
.
init
(
postPush:
_onRoutePushed
),
theme:
new
ThemeData
(
theme:
new
ThemeData
(
...
...
lib/netWork/DioUtil.dart
View file @
ddd1178a
...
@@ -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