fix: 粉丝不可见时异常

This commit is contained in:
guozhigq
2024-09-30 11:38:39 +08:00
parent ed9a75ecd3
commit 66d2ac9777
2 changed files with 11 additions and 4 deletions

View File

@ -49,7 +49,6 @@ class FansController extends GetxController {
} else if (type == 'onLoad') { } else if (type == 'onLoad') {
fansList.addAll(res['data'].list); fansList.addAll(res['data'].list);
} }
print(total);
if ((pn == 1 && total < ps) || res['data'].list.isEmpty) { if ((pn == 1 && total < ps) || res['data'].list.isEmpty) {
loadingText.value = '没有更多了'; loadingText.value = '没有更多了';
} }

View File

@ -103,9 +103,17 @@ class _FansPageState extends State<FansPage> {
), ),
); );
} else { } else {
return HttpError( return CustomScrollView(
physics: const NeverScrollableScrollPhysics(),
slivers: [
HttpError(
errMsg: data['msg'], errMsg: data['msg'],
fn: () => _fansController.queryFans('init'), fn: () {
_futureBuilderFuture =
_fansController.queryFans('init');
},
)
],
); );
} }
} else { } else {