修改bug

This commit is contained in:
jyuesong
2022-01-21 17:07:42 +08:00
parent 9612802996
commit 25c98a1abf
8 changed files with 17 additions and 17 deletions

View File

@@ -1 +0,0 @@

View File

@@ -15,7 +15,7 @@ class EnvBean {
EnvBean.fromJson(Map<String, dynamic> json) { EnvBean.fromJson(Map<String, dynamic> json) {
value = json['value']; value = json['value'];
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : ""); 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']; status = json['status'];
timestamp = json['timestamp']; timestamp = json['timestamp'];
name = json['name']; name = json['name'];

View File

@@ -21,7 +21,7 @@ class LoginBean {
token = json['token']; token = json['token'];
lastip = json['lastip']; lastip = json['lastip'];
lastaddr = json['lastaddr']; lastaddr = json['lastaddr'];
lastlogon = json['lastlogon']; lastlogon = int.tryParse(json['lastlogon'].toString());
retries = json['retries']; retries = json['retries'];
platform = json['platform']; platform = json['platform'];
} }

View File

@@ -24,10 +24,10 @@ class DependencyBean {
DependencyBean.fromJson(Map<String, dynamic> json) { DependencyBean.fromJson(Map<String, dynamic> json) {
sId = json['_id']; sId = json['_id'];
created = json['created']; created = int.tryParse(json['created'].toString());
status = json['status']; status = json['status'];
type = json['type']; type = json['type'];
timestamp = json['timestamp']; timestamp = json['timestamp'].toString();
name = json['name']; name = json['name'];
log = json['log'].cast<String>(); log = json['log'].cast<String>();
remark = json['remark']; remark = json['remark'];

View File

@@ -13,7 +13,7 @@ class LoginLogBean {
{this.timestamp, this.address, this.ip, this.platform, this.status}); {this.timestamp, this.address, this.ip, this.platform, this.status});
LoginLogBean.fromJson(Map<String, dynamic> json) { LoginLogBean.fromJson(Map<String, dynamic> json) {
timestamp = json['timestamp']; timestamp = int.tryParse(json['timestamp'].toString());
address = json['address']; address = json['address'];
ip = json['ip']; ip = json['ip'];
platform = json['platform']; platform = json['platform'];

View File

@@ -116,9 +116,11 @@ class _OtherPageState extends ConsumerState<OtherPage> {
); );
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.only(
vertical: 8, top: 8,
horizontal: 15, bottom: 15,
left: 15,
right: 15,
), ),
child: Row( child: Row(
children: [ children: [
@@ -206,9 +208,11 @@ class _OtherPageState extends ConsumerState<OtherPage> {
}, },
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.only(
vertical: 10, top: 8,
horizontal: 15, bottom: 15,
left: 15,
right: 15,
), ),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,

View File

@@ -44,14 +44,14 @@ class TaskBean {
schedule = json['schedule'].toString(); schedule = json['schedule'].toString();
saved = json['saved']; saved = json['saved'];
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : ""); 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']; status = json['status'];
timestamp = json['timestamp'].toString(); timestamp = json['timestamp'].toString();
isSystem = json['isSystem']; isSystem = json['isSystem'];
isDisabled = json['isDisabled']; isDisabled = json['isDisabled'];
logPath = json['log_path'].toString(); logPath = json['log_path'].toString();
isPinned = json['isPinned']; isPinned = json['isPinned'];
lastExecutionTime = json['last_execution_time']; lastExecutionTime = int.tryParse(json['last_execution_time'].toString());
lastRunningTime = json['last_running_time']; lastRunningTime = json['last_running_time'];
pid = json['pid'].toString(); pid = json['pid'].toString();
} catch (e) { } catch (e) {

View File

@@ -6,8 +6,5 @@
// tree, read text, and verify that the values of widget properties are correct. // tree, read text, and verify that the values of widget properties are correct.
void main() { void main() {
String time = "Wed Jan 12 2022 20:33:39 GMT+0800 (中国标准时间)";
var result = DateTime.tryParse(time);
print(result);
} }