From 421ac624926670b11318c3737564040ffd7ee6bc Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Thu, 1 Aug 2024 10:44:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A9=E5=86=9C=E5=95=86=E5=93=81=E4=B9=9F?= =?UTF-8?q?=E4=B8=8Dbug=E6=9B=B4=E6=94=B9=EF=BC=9B=20=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E8=BD=AE=E6=92=AD=E9=97=B4=E9=9A=94=E6=9B=B4=E6=94=B9=EF=BC=9B?= =?UTF-8?q?=20=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E9=97=B4=E9=9A=94=E6=9B=B4=E6=94=B9=EF=BC=9B=20=E4=BC=9A?= =?UTF-8?q?=E5=91=98=E4=BB=B7=E6=9A=82=E6=97=B6=E9=9A=90=E8=97=8F=EF=BC=9B?= =?UTF-8?q?=20=E9=97=A8=E5=BA=97=E5=88=97=E8=A1=A80=E5=85=83=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=A4=84=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/home/help_farmers/help_farmers_page.dart | 19 +++++---- lib/home/home_page.dart | 4 +- lib/mine/mine_page.dart | 2 +- lib/retrofit/retrofit_api.dart | 2 +- lib/store/store_view/product_sku.dart | 41 ++++++++++---------- lib/store/store_view/store_info.dart | 9 ++--- lib/union/union_list.dart | 23 +++++------ 7 files changed, 52 insertions(+), 48 deletions(-) diff --git a/lib/home/help_farmers/help_farmers_page.dart b/lib/home/help_farmers/help_farmers_page.dart index fea9a197..4ce538a4 100644 --- a/lib/home/help_farmers/help_farmers_page.dart +++ b/lib/home/help_farmers/help_farmers_page.dart @@ -31,6 +31,7 @@ class _HelpFarmersPage extends State { final RefreshController refreshController = RefreshController(); List farmersList = []; int tabIndex = 0; + int farmersListData = 0; @override void initState() { @@ -57,10 +58,11 @@ class _HelpFarmersPage extends State { }); if (baseData?.isSuccess ?? false) { farmersList.clear(); - farmersList.addAll(baseData!.data ?? []); + farmersList.addAll(baseData?.data ?? []); refreshController.refreshCompleted(); } else { refreshController.refreshFailed(); + farmersListData = 1; } } finally { setState(() {}); @@ -100,7 +102,9 @@ class _HelpFarmersPage extends State { centerTitle: true, flexibleSpace: FlexibleSpaceBar( background: MImage( - farmersList[tabIndex].agriculturaListImg ?? "", + farmersList.isEmpty + ? "" + : (farmersList[tabIndex].agriculturaListImg ?? ""), fit: BoxFit.fill, width: double.infinity, height: 354.h, @@ -127,7 +131,7 @@ class _HelpFarmersPage extends State { //可滚动 indicatorColor: Colors.white, //tab排放方向 - tabAlignment:TabAlignment.start, + tabAlignment: TabAlignment.start, //去掉底部线条 dividerHeight: 0, labelColor: Colors.white, @@ -146,9 +150,8 @@ class _HelpFarmersPage extends State { indicatorSize: TabBarIndicatorSize.label, //指示器与文字等宽 tabs: farmersList - ?.map((e) => MyTab(text: "${e.typeName}")) - .toList() ?? - [], + .map((e) => MyTab(text: "${e.typeName}")) + .toList(), onTap: (index) { // queryConfig("AgriculturalList"); tabIndex = index; @@ -172,8 +175,8 @@ class _HelpFarmersPage extends State { return Container( color: Colors.white, padding: EdgeInsets.symmetric(horizontal: 10.w), - child: (farmersList.isNotEmpty && - (farmersList[tabIndex].goodList?.isEmpty ?? false)) + child: (farmersList.isEmpty || + (farmersList[tabIndex].goodList ?? []).isEmpty) ? NoDataView( src: "assets/image/xiao_fei.webp", isShowBtn: false, diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 9c7e0459..bcc9a5dc 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -582,7 +582,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ), autoplay: true, duration: 1000, - autoplayDelay: 3000, + autoplayDelay: 17000, physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return InkWell( @@ -679,7 +679,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ), autoplay: true, duration: 1000, - autoplayDelay: 2500, + autoplayDelay: 10000, itemBuilder: (context, position) { return InkWell( onTap: () { diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index 6aaba10e..415d858f 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -455,7 +455,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { ), autoplay: true, duration: 1000, - autoplayDelay: 2000, + autoplayDelay: 10000, itemBuilder: (context, position) { return InkWell( onTap: () { diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 76aaba10..20493ce9 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -63,7 +63,7 @@ import 'package:huixiang/login/captcha/click_word_captcha.dart'; part 'retrofit_api.g.dart'; -const localBaseUrl = "http://192.168.10.54:8766/app/";///本地 +const localBaseUrl = "https://pos.platform.lotus-wallet.com/app//";///本地 // const localBaseUrl = "http://platform.test.api.lotus-wallet.com/app/";///测试 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线上 diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index 8161df7e..3144aee2 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -158,26 +158,27 @@ class _ProductSku extends State { ), ), ), - Row( - children: [ - Text( - S.of(context).huiyuanjia, - style: TextStyle( - color: Color(0xFFFF7A1A), - fontSize: 13.sp, - fontWeight: MyFontWeight.medium, - ), - ), - Text( - selectedPrice, - style: TextStyle( - color: Color(0xFFFF7A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ), - ], - ), + ///业务需求暂时隐藏 + // Row( + // children: [ + // Text( + // S.of(context).huiyuanjia, + // style: TextStyle( + // color: Color(0xFFFF7A1A), + // fontSize: 13.sp, + // fontWeight: MyFontWeight.medium, + // ), + // ), + // Text( + // selectedPrice, + // style: TextStyle( + // color: Color(0xFFFF7A1A), + // fontSize: 14.sp, + // fontWeight: MyFontWeight.medium, + // ), + // ), + // ], + // ), ], ), ), diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index 43c05b2f..e8246497 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -113,7 +113,9 @@ class _StoreInfoView extends State { ), Row( children: [ - Text( + if( widget.storeInfo?.perCapitaConsumption != null && ( widget.storeInfo?.perCapitaConsumption ?? "") != "0") + Padding(padding:EdgeInsets.only(right:20.w), + child: Text( S.of(context).ren(widget.storeInfo?.perCapitaConsumption ?? ""), overflow: TextOverflow.ellipsis, style: TextStyle( @@ -121,10 +123,7 @@ class _StoreInfoView extends State { fontWeight: MyFontWeight.medium, color: Color(0xFF353535), ), - ), - SizedBox( - width: 20.w, - ), + ),), ]..addAll(itemServer(widget.storeInfo?.businessService ?? "")), ), Text( diff --git a/lib/union/union_list.dart b/lib/union/union_list.dart index a3802ca4..f0e0eec9 100644 --- a/lib/union/union_list.dart +++ b/lib/union/union_list.dart @@ -314,17 +314,18 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { SizedBox(height: 6.h), Row( children: [ - Text( - S.of(context).ren( - store.perCapitaConsumption ?? "", - ), - style: TextStyle( - color: Color(0xFF4D4D4D), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox(width: 22.w), + if(store.perCapitaConsumption != null && (store.perCapitaConsumption ?? "") != "0") + Padding(padding:EdgeInsets.only(right:22.w), + child:Text( + S.of(context).ren( + store.perCapitaConsumption ?? "", + ), + style: TextStyle( + color: Color(0xFF4D4D4D), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + )), Image.asset( "assets/image/icon_union_location_black.webp", fit: BoxFit.fill,