master
张萌 3 years ago
parent 3670693a18
commit ce22405a71

@ -37,14 +37,6 @@ class _ClockInPageState extends State<ClockInPage> {
var base = await NetUtil().get(API.intergral.info); var base = await NetUtil().get(API.intergral.info);
if (base.status ?? false) { if (base.status ?? false) {
_integralModel = IntegralInfoModel.fromJson(base.data); _integralModel = IntegralInfoModel.fromJson(base.data);
} else {
BotToast.showText(text: base.message!);
}
}
@override
void initState() {
getData().then((value) {
if (_integralModel != null) { if (_integralModel != null) {
_records = _integralModel!.signRecordList; _records = _integralModel!.signRecordList;
_configs = _integralModel!.rewardSetting _configs = _integralModel!.rewardSetting
@ -55,7 +47,14 @@ class _ClockInPageState extends State<ClockInPage> {
.toList(); .toList();
setState(() {}); setState(() {});
} }
}); } else {
BotToast.showText(text: base.message!);
}
}
@override
void initState() {
getData();
super.initState(); super.initState();
} }

Loading…
Cancel
Save