Commit c2950920 authored by jinzhu's avatar jinzhu

update

parent 53c641c5
......@@ -157,12 +157,14 @@ class _CommentSuggestPageState extends State<CommentSuggestPage> {
String phone = (this.telCtrl.text.length > 0)? this.telCtrl.text : '';
DioUtil().requestR(Method.post, "api/v1/suggestion",data: {"content": content, "phone": phone}).then((res){
if (res.code == 0) {
Toast.show(context, '请求成功');
Toast.show(context, '提交成功');
FlutterBoost.singleton.closePageForContext(context);
} else {
Toast.show(context, res.msg);
}
}
).then((error){
Toast.show(context, '提交失败');
print(error);
});
}
......
......@@ -438,7 +438,7 @@ class DioUtil {
options.connectTimeout = 10 * 1000;
options.receiveTimeout = 20 * 1000;
options.contentType = ContentType.parse('application/x-www-form-urlencoded');
options.baseUrl = 'http://earth.gmapp.com/';
options.baseUrl = 'https://earth.iyanzhi.com/';
Map<String, dynamic> headers = Map<String, dynamic>();
headers['Accept'] = 'application/json';
return options;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment