From ce22405a71ce3e3e8f4c0d17c94bd74a4132b7ec Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Sun, 16 Jan 2022 17:42:21 +0800 Subject: [PATCH] bug fix --- lib/pages/personal/clock_in/clock_in_page.dart | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/pages/personal/clock_in/clock_in_page.dart b/lib/pages/personal/clock_in/clock_in_page.dart index d3acd7b0..f77a0a83 100644 --- a/lib/pages/personal/clock_in/clock_in_page.dart +++ b/lib/pages/personal/clock_in/clock_in_page.dart @@ -37,14 +37,6 @@ class _ClockInPageState extends State { var base = await NetUtil().get(API.intergral.info); if (base.status ?? false) { _integralModel = IntegralInfoModel.fromJson(base.data); - } else { - BotToast.showText(text: base.message!); - } - } - - @override - void initState() { - getData().then((value) { if (_integralModel != null) { _records = _integralModel!.signRecordList; _configs = _integralModel!.rewardSetting @@ -55,7 +47,14 @@ class _ClockInPageState extends State { .toList(); setState(() {}); } - }); + } else { + BotToast.showText(text: base.message!); + } + } + + @override + void initState() { + getData(); super.initState(); }