diff --git a/lib/community/headlines/article_page.dart b/lib/community/headlines/article_page.dart index ded44c87..9dabdec0 100644 --- a/lib/community/headlines/article_page.dart +++ b/lib/community/headlines/article_page.dart @@ -160,6 +160,7 @@ class _ArticlePage extends State _onRefresh(){ queryHeadlinesBanner(); queryHeadlinesList();//分类列表 + queryArticleList(); } @override diff --git a/lib/community/headlines/headlines_collection.dart b/lib/community/headlines/headlines_collection.dart index 8b493968..a80a2bfe 100644 --- a/lib/community/headlines/headlines_collection.dart +++ b/lib/community/headlines/headlines_collection.dart @@ -46,10 +46,12 @@ class _HeadlinesCollection extends State { itemBuilder: (context, position) { return GestureDetector( onTap: () { + List
articles = []; + articles.addAll(widget.articles); Navigator.of(context).pushNamed( '/router/headlines_column_details', - arguments: {"categoryId":widget.articles[position].categoryId, - "articles":widget.articles}); + arguments: {"id":widget.headlines[position].id, + "articles":articles}); }, child: headlinesCollectionItem(widget.headlines[position]), ); diff --git a/lib/community/headlines/headlines_column_details.dart b/lib/community/headlines/headlines_column_details.dart index 66676bc8..6f41fc03 100644 --- a/lib/community/headlines/headlines_column_details.dart +++ b/lib/community/headlines/headlines_column_details.dart @@ -10,7 +10,6 @@ import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -34,15 +33,14 @@ class _HeadlinesColumnDetails extends State List headlines = []; final RefreshController refreshController = RefreshController(); int pageNum = 1; - final ScrollController scrollController = ScrollController(); @override void initState() { super.initState(); articles = widget.arguments["articles"]; WidgetsBinding.instance.addObserver(this); - queryHeadlinesDetails(widget.arguments["categoryId"]); - queryArticleList(widget.arguments["categoryId"]); + queryHeadlinesDetails(widget.arguments["id"]); + queryArticleList(widget.arguments["id"]); } ///文章合集详情 @@ -80,7 +78,7 @@ class _HeadlinesColumnDetails extends State "searchKey": "", "state": 1, "type": 2, - "categoryId":widget.arguments["categoryId"] + "categoryId":categoryId }).catchError((onError){ refreshController.refreshFailed(); refreshController.loadFailed(); @@ -104,24 +102,11 @@ class _HeadlinesColumnDetails extends State } } - _onRefresh(){ - queryHeadlinesDetails(widget.arguments["categoryId"]); - queryArticleList(widget.arguments["categoryId"]);//分类列表 - } - @override Widget build(BuildContext context) { return Scaffold( body: Container( - child: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader(), - physics: ClampingScrollPhysics(), - onRefresh: _onRefresh, - scrollController: scrollController, - child:Column( + child: Column( children: [ Expanded( child: SingleChildScrollView( @@ -251,7 +236,7 @@ class _HeadlinesColumnDetails extends State ), ListView.builder( padding: EdgeInsets.zero, - itemCount:articles.length, + itemCount:articles == null ? 0 : articles.length, scrollDirection: Axis.vertical, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), @@ -276,7 +261,7 @@ class _HeadlinesColumnDetails extends State ), ], ), - ),) + ), ); } diff --git a/lib/home/home_view/shortcut_operation.dart b/lib/home/home_view/shortcut_operation.dart index 2cfdaa20..82e76630 100644 --- a/lib/home/home_view/shortcut_operation.dart +++ b/lib/home/home_view/shortcut_operation.dart @@ -35,12 +35,12 @@ class _ShortcutOperation extends State { Widget build(BuildContext context) { return Container( height: 150.h, - margin: EdgeInsets.only(bottom:15), + margin: EdgeInsets.only(bottom:15,left: 16,right: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - GestureDetector( + Expanded(child:GestureDetector( onTap: (){ widget.goToOrder(); }, @@ -77,8 +77,8 @@ class _ShortcutOperation extends State { ], ), ), - ), - GestureDetector( + ) ), + Expanded(child:GestureDetector( onTap: (){ Navigator.of(context).pushNamed('/router/recharge_page'); }, @@ -115,8 +115,8 @@ class _ShortcutOperation extends State { ], ), ), - ), - GestureDetector( + ), ), + Expanded(child: GestureDetector( onTap: (){ Navigator.of(context).pushNamed('/router/roll_center_page'); }, @@ -153,7 +153,7 @@ class _ShortcutOperation extends State { ], ), ), - ), + ),), ], ), ); diff --git a/lib/integral_store/integral_store_details_page.dart b/lib/integral_store/integral_store_details_page.dart index 0681a11a..d8792447 100644 --- a/lib/integral_store/integral_store_details_page.dart +++ b/lib/integral_store/integral_store_details_page.dart @@ -117,29 +117,30 @@ class _IntegralStoreDetailsPage extends State { ), GestureDetector( onTap: () { - if(payType > 0){ - toExchangeOrder(); - }else{ - SmartDialog.showToast("您的积分不足!", alignment: Alignment.center); - return; - } + // if(payType > 0){ + // toExchangeOrder(); + // }else{ + // SmartDialog.showToast("您的积分不足!", alignment: Alignment.center); + // return; + // } }, child: Container( padding: EdgeInsets.only(top: 16.h, bottom: 16.h), decoration: BoxDecoration( - color: (payType > 0) - ? Color(0xFF32A060) - : Color(0xFFD8D8D8), + color: Color(0xFFD8D8D8), + // (payType > 0) + // ? Color(0xFF32A060) + // : Color(0xFFD8D8D8), borderRadius: BorderRadius.vertical( top: Radius.circular(4), ), ), alignment: Alignment.center, child: Text( - (payType > 0) - ? S.of(context).duihuan - : S.of(context).jifenbuzu, - // "兑换功能暂未开放", + // (payType > 0) + // ? S.of(context).duihuan + // : S.of(context).jifenbuzu, + "兑换功能暂未开放", style: TextStyle( fontSize: 16.sp, color: Color(0xFFFFFFFF),