Browse Source

ios 更新

remove_uniapp
fmk 3 years ago
parent
commit
03f66febe5
  1. 2
      lib/community/community_page.dart
  2. 14
      lib/community/headlines/article_page.dart

2
lib/community/community_page.dart

@ -127,7 +127,7 @@ class _CommunityPage extends State<CommunityPage>
if (e == "关于回乡") {
return BrandPage();
}else if(e == "了解健康"){
return ArticlePage();
return ArticlePage(onChildScroll);
}else if(e == "学习健康"){
return CommunityCourse();
}

14
lib/community/headlines/article_page.dart

@ -26,6 +26,10 @@ import 'activity_top_list.dart';
import 'article_list.dart';
class ArticlePage extends StatefulWidget {
final Function onScroll;
ArticlePage(this.onScroll);
@override
State<StatefulWidget> createState() {
return _ArticlePage();
@ -34,8 +38,8 @@ class ArticlePage extends StatefulWidget {
class _ArticlePage extends State<ArticlePage>
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController();
ScrollController sc = ScrollController();
ApiService apiService;
List<GlobalKey> globaKeys = [];
@ -50,7 +54,9 @@ class _ArticlePage extends State<ArticlePage>
@override
void initState() {
super.initState();
sc.addListener(() {
widget.onScroll();
});
eventBus.on<EventType>().listen((event) {
print("object: ArticlePage");
if (event.type < 3) {
@ -204,7 +210,7 @@ class _ArticlePage extends State<ArticlePage>
queryArticleList(false);
},
physics: BouncingScrollPhysics(),
scrollController: scrollController,
scrollController: sc,
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
@ -231,7 +237,7 @@ class _ArticlePage extends State<ArticlePage>
child: StoreTitleTab(
brands,
globaKeys,
scrollController,
sc,
isScroll: true,
),
),

Loading…
Cancel
Save