sqllite database save magnetic declination data

This commit is contained in:
cxc
2022-06-30 17:01:04 +08:00
parent d962dc8023
commit c7ccf28e9f
11 changed files with 173 additions and 166 deletions

View File

@ -21,10 +21,10 @@ class DioUtils {
bool isProxy = false;
//网络代理地址
String proxyIp = "192.168.0.107";
String proxyIp = "10.0.2.2";
//网络代理端口
String proxyPort = "8888";
String proxyPort = "7890";
DioUtils._internal() {
BaseOptions options = new BaseOptions();
@ -135,8 +135,8 @@ class DioUtils {
// _dio.options.headers["content-type"]="multipart/form-data";
//发起post请求
try {
Response response = await _dio.post(url,
data: form ?? jsonMap, cancelToken: cancelTag);
Response response =
await _dio.post(url, data: form ?? jsonMap, cancelToken: cancelTag);
//响应数据
dynamic responseData = response.data;
@ -216,8 +216,8 @@ class DioUtils {
// _dio.options.headers["content-type"]="multipart/form-data";
//发起post请求
try {
Response response = await _dio.post(url,
data: form ?? jsonMap, cancelToken: cancelTag);
Response response =
await _dio.post(url, data: form ?? jsonMap, cancelToken: cancelTag);
//响应数据
dynamic responseData = response.data;
@ -260,15 +260,15 @@ class DioUtils {
loginInfo.msg = "响应超时";
break;
case DioErrorType.response:
// 响应错误
// 响应错误
loginInfo.msg = "响应错误";
break;
case DioErrorType.cancel:
// 取消操作
// 取消操作
loginInfo.msg = "已取消";
break;
case DioErrorType.other:
// 默认自定义其他异常
// 默认自定义其他异常
loginInfo.msg = "网络请求异常";
break;
}
@ -316,8 +316,10 @@ class LoginInfo {
String msg;
String token;
LoginInfo({this.success = true, this.code = 200, this.token, this.msg="登陆成功"});
LoginInfo.error({this.success = false, this.code = 201, this.msg="请求异常"});
LoginInfo(
{this.success = true, this.code = 200, this.token, this.msg = "登陆成功"});
LoginInfo.error({this.success = false, this.code = 201, this.msg = "请求异常"});
}
class RegisterInfo {
@ -325,7 +327,8 @@ class RegisterInfo {
int code;
String msg;
RegisterInfo({this.success = true, this.code = 200, this.msg = "注册成功"});
RegisterInfo({this.success = true, this.code = 200, this.msg="注册成功"});
RegisterInfo.error({this.success = false, this.code = 201, this.msg="请求异常"});
RegisterInfo.error(
{this.success = false, this.code = 201, this.msg = "请求异常"});
}