diff --git a/lib/community/community_course.dart b/lib/community/community_course.dart index 378d4ec1..49b5a5f7 100644 --- a/lib/community/community_course.dart +++ b/lib/community/community_course.dart @@ -131,8 +131,7 @@ class _CommunityCourse extends State refreshController.loadFailed(); } }); - - if (baseData.isSuccess) { + if (baseData != null && baseData.isSuccess) { if(categoryId == "") { refreshController.refreshCompleted(); refreshController.loadComplete(); @@ -200,6 +199,7 @@ class _CommunityCourse extends State _onRefresh(){ queryCourseBanner(); classListAsync(); + collectionList(); } @override @@ -213,10 +213,16 @@ class _CommunityCourse extends State child: SmartRefresher( controller: refreshController, enablePullDown: true, - enablePullUp: true, + enablePullUp: false, header: MyHeader(), - onRefresh: _onRefresh, - onLoading: () { + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + onRefresh:(){ + setState(() {_onRefresh(); + }); }, physics: BouncingScrollPhysics(), scrollController: scrollController,