From f370562480fff5e36a34b510e9c5bf4ad3d86afe Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Tue, 15 Mar 2022 10:25:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9B=B4=E6=94=B93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/community/community_course.dart | 16 +++++++++++----- lib/community/headlines/article_page.dart | 2 +- lib/retrofit/retrofit_api.dart | 8 ++++---- lib/retrofit/retrofit_api.g.dart | 2 +- 4 files changed, 17 insertions(+), 11 deletions(-) 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, diff --git a/lib/community/headlines/article_page.dart b/lib/community/headlines/article_page.dart index 445cafcd..77d4485d 100644 --- a/lib/community/headlines/article_page.dart +++ b/lib/community/headlines/article_page.dart @@ -134,7 +134,7 @@ class _ArticlePage extends State articles.addAll(baseData.data.list); else articleTop.addAll(baseData.data.list); - if (baseData.data.pageNum == baseData.data.pages) { + if (baseData.data.pageNum == baseData.data.pages && !isHot) { refreshController.loadNoData(); } else { pageNum += 1; diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 33bc1d91..d50b5e95 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -57,14 +57,14 @@ import 'data/vip_rule_details.dart'; part 'retrofit_api.g.dart'; -// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 -const base_url = "http://192.168.10.236:8766/app/"; ///费韬 -const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 +// const base_url = "http://192.168.10.236:8766/app/"; ///费韬 +// const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 // const base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index a49324a3..5706536a 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8766/app/'; + baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; } final Dio _dio;