mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
修改bug
This commit is contained in:
@ -1 +0,0 @@
|
||||
|
||||
2
lib/module/env/env_bean.dart
vendored
2
lib/module/env/env_bean.dart
vendored
@ -15,7 +15,7 @@ class EnvBean {
|
||||
EnvBean.fromJson(Map<String, dynamic> json) {
|
||||
value = json['value'];
|
||||
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
|
||||
created = json['created'];
|
||||
created = int.tryParse(json['created'].toString());
|
||||
status = json['status'];
|
||||
timestamp = json['timestamp'];
|
||||
name = json['name'];
|
||||
|
||||
@ -21,7 +21,7 @@ class LoginBean {
|
||||
token = json['token'];
|
||||
lastip = json['lastip'];
|
||||
lastaddr = json['lastaddr'];
|
||||
lastlogon = json['lastlogon'];
|
||||
lastlogon = int.tryParse(json['lastlogon'].toString());
|
||||
retries = json['retries'];
|
||||
platform = json['platform'];
|
||||
}
|
||||
|
||||
@ -24,10 +24,10 @@ class DependencyBean {
|
||||
|
||||
DependencyBean.fromJson(Map<String, dynamic> json) {
|
||||
sId = json['_id'];
|
||||
created = json['created'];
|
||||
created = int.tryParse(json['created'].toString());
|
||||
status = json['status'];
|
||||
type = json['type'];
|
||||
timestamp = json['timestamp'];
|
||||
timestamp = json['timestamp'].toString();
|
||||
name = json['name'];
|
||||
log = json['log'].cast<String>();
|
||||
remark = json['remark'];
|
||||
|
||||
@ -13,7 +13,7 @@ class LoginLogBean {
|
||||
{this.timestamp, this.address, this.ip, this.platform, this.status});
|
||||
|
||||
LoginLogBean.fromJson(Map<String, dynamic> json) {
|
||||
timestamp = json['timestamp'];
|
||||
timestamp = int.tryParse(json['timestamp'].toString());
|
||||
address = json['address'];
|
||||
ip = json['ip'];
|
||||
platform = json['platform'];
|
||||
|
||||
@ -116,9 +116,11 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8,
|
||||
horizontal: 15,
|
||||
padding: const EdgeInsets.only(
|
||||
top: 8,
|
||||
bottom: 15,
|
||||
left: 15,
|
||||
right: 15,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
@ -206,9 +208,11 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
horizontal: 15,
|
||||
padding: const EdgeInsets.only(
|
||||
top: 8,
|
||||
bottom: 15,
|
||||
left: 15,
|
||||
right: 15,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
||||
@ -44,14 +44,14 @@ class TaskBean {
|
||||
schedule = json['schedule'].toString();
|
||||
saved = json['saved'];
|
||||
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
|
||||
created = json['created'];
|
||||
created = int.tryParse(json['created'].toString());
|
||||
status = json['status'];
|
||||
timestamp = json['timestamp'].toString();
|
||||
isSystem = json['isSystem'];
|
||||
isDisabled = json['isDisabled'];
|
||||
logPath = json['log_path'].toString();
|
||||
isPinned = json['isPinned'];
|
||||
lastExecutionTime = json['last_execution_time'];
|
||||
lastExecutionTime = int.tryParse(json['last_execution_time'].toString());
|
||||
lastRunningTime = json['last_running_time'];
|
||||
pid = json['pid'].toString();
|
||||
} catch (e) {
|
||||
|
||||
@ -6,8 +6,5 @@
|
||||
// tree, read text, and verify that the values of widget properties are correct.
|
||||
|
||||
void main() {
|
||||
String time = "Wed Jan 12 2022 20:33:39 GMT+0800 (中国标准时间)";
|
||||
|
||||
var result = DateTime.tryParse(time);
|
||||
print(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user