From a83206bf4bdcb90f8442737bc234b5b28e9eed66 Mon Sep 17 00:00:00 2001 From: NewTab <425698907@qq.com> Date: Sat, 22 Jan 2022 22:42:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9A=82=E6=97=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/module/others/login_log/login_log_page.dart | 12 +++++++++--- lib/module/others/scripts/script_page.dart | 3 +++ lib/module/others/task_log/task_log_page.dart | 3 +++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/module/others/login_log/login_log_page.dart b/lib/module/others/login_log/login_log_page.dart index 8c985a7..70191f9 100644 --- a/lib/module/others/login_log/login_log_page.dart +++ b/lib/module/others/login_log/login_log_page.dart @@ -21,7 +21,8 @@ class LoginLogPage extends ConsumerStatefulWidget { _LoginLogPageState createState() => _LoginLogPageState(); } -class _LoginLogPageState extends ConsumerState with LazyLoadState { +class _LoginLogPageState extends ConsumerState + with LazyLoadState { List list = []; @override @@ -65,7 +66,8 @@ class _LoginLogPageState extends ConsumerState with LazyLoadState< selectionWidthStyle: BoxWidthStyle.max, selectionHeightStyle: BoxHeightStyle.max, style: TextStyle( - color: ref.watch(themeProvider).themeColor.descColor(), + color: + ref.watch(themeProvider).themeColor.descColor(), fontSize: 14, ), ), @@ -77,7 +79,8 @@ class _LoginLogPageState extends ConsumerState with LazyLoadState< selectionWidthStyle: BoxWidthStyle.max, selectionHeightStyle: BoxHeightStyle.max, style: TextStyle( - color: ref.watch(themeProvider).themeColor.descColor(), + color: + ref.watch(themeProvider).themeColor.descColor(), fontSize: 14, ), ), @@ -106,6 +109,9 @@ class _LoginLogPageState extends ConsumerState with LazyLoadState< HttpResponse> response = await Api.loginLog(); if (response.success) { + if (response.bean == null || response.bean!.isEmpty) { + "暂无数据".toast(); + } list.clear(); list.addAll(response.bean ?? []); setState(() {}); diff --git a/lib/module/others/scripts/script_page.dart b/lib/module/others/scripts/script_page.dart index 4d36b28..d56918a 100644 --- a/lib/module/others/scripts/script_page.dart +++ b/lib/module/others/scripts/script_page.dart @@ -114,6 +114,9 @@ class _ScriptPageState extends ConsumerState with LazyLoadState> response = await Api.scripts(); if (response.success) { + if (response.bean == null || response.bean!.isEmpty) { + "暂无数据".toast(); + } list.clear(); list.addAll(response.bean ?? []); setState(() {}); diff --git a/lib/module/others/task_log/task_log_page.dart b/lib/module/others/task_log/task_log_page.dart index 69e2273..fe64844 100644 --- a/lib/module/others/task_log/task_log_page.dart +++ b/lib/module/others/task_log/task_log_page.dart @@ -88,6 +88,9 @@ class _TaskLogPageState extends ConsumerState with LazyLoadState> response = await Api.taskLog(); if (response.success) { + if (response.bean == null || response.bean!.isEmpty) { + "暂无数据".toast(); + } list.clear(); list.addAll(response.bean ?? []); setState(() {});