Compare commits

...

3 Commits

Author SHA1 Message Date
wangyang a86d3d62a7 删除 lib/common/config/request_config.dart 2024-04-03 09:49:28 +08:00
wangyang bc3596100b 删除 lib/common/job/user_login.g.dart 2024-04-03 09:49:14 +08:00
1147192855@qq.com 1604548333 no message 2024-04-03 09:48:22 +08:00
4 changed files with 3 additions and 75 deletions

@ -1 +0,0 @@
Subproject commit d3d8effc686d73e0114d71abdcccef63fa1f25d2

3
.gitignore vendored
View File

@ -16,6 +16,9 @@ migrate_working_dir/
*.iws
.idea/
# 编译文件不上传
*.g.dart
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.

View File

@ -1,43 +0,0 @@
/*
* @Author: wangyang 1147192855@qq.com
* @Date: 2022-07-13 11:28:23
* @LastEditors: wangyang 1147192855@qq.com
* @LastEditTime: 2022-09-14 11:17:20
* @FilePath: \marking_app\lib\config\RequestConfig.dart
* @Description:
*/
import 'package:school_asignment_app/common/job/common/base_page.dart';
class RequestConfig {
static const _devBaseUrl = "https://dpc-teacher-api.23544.com"; //
static const _proBaseUrl = "https://dpc-teacher-api.23544.com"; //
static RequestConfig? _instance;
String baseUrl;
static const connectTimeout = 8000; //
static const receiveTimeout = 8000; //
static const bool requestDataPrinting = true; //
static const bool printSwitch = true; //
static const successCode = [204, 200]; // code
static final BasePage basePage = BasePage(1, 10); //
//
//
RequestConfig._({required this.baseUrl});
factory RequestConfig() {
if (_instance == null) {
late String newBaseUrl;
late String newBaseUrlOfReport;
late String newLoginBaseUrl;
if (const bool.fromEnvironment('dart.vm.product'))
newBaseUrl = _proBaseUrl; //
else
newBaseUrl = _devBaseUrl; //
_instance = RequestConfig._(baseUrl: newBaseUrl);
}
return _instance!;
}
}

View File

@ -1,31 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'user_login.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
UserLogin _$UserLoginFromJson(Map<String, dynamic> json) => $checkedCreate(
'UserLogin',
json,
($checkedConvert) {
final val = UserLogin(
$checkedConvert('access_token', (v) => v as String),
$checkedConvert('expires_in', (v) => v as int),
$checkedConvert('token_type', (v) => v as String),
);
return val;
},
fieldKeyMap: const {
'accessToken': 'access_token',
'expiresIn': 'expires_in',
'tokenType': 'token_type'
},
);
Map<String, dynamic> _$UserLoginToJson(UserLogin instance) => <String, dynamic>{
'access_token': instance.accessToken,
'expires_in': instance.expiresIn,
'token_type': instance.tokenType,
};