From 99e5f8406e3ab872e6613a3e75415da0547f06af Mon Sep 17 00:00:00 2001 From: huixiang_app <953969641@qq.com> Date: Wed, 6 Sep 2023 00:27:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E5=9C=B0=E5=9D=80=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=BA=8B=E4=BB=B6=E7=9A=84=E8=A7=A3=E5=86=B3=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/store/store_order.dart | 47 ++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 0dae970d..b56907f8 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -97,7 +97,9 @@ class _StoreOrderPage extends State /// 小程序登录 minLogin(SharedPreferences shared) async { - EasyLoading.show(status: S.of(context).zhengzaijiazai,maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.of(context).zhengzaijiazai, + maskType: EasyLoadingMaskType.black); apiService = ApiService( Dio(), context: context, @@ -127,7 +129,6 @@ class _StoreOrderPage extends State storeId: storeId, ); - queryMemberInfo(); queryShopCar().then((value) { @@ -244,7 +245,7 @@ class _StoreOrderPage extends State context), sliver: SliverAppBar( expandedHeight: (storeInfo != null && - storeInfo.couponVOList != null) + storeInfo.couponVOList != null) ? 400.h : 395.h, floating: false, @@ -327,7 +328,10 @@ class _StoreOrderPage extends State CrossAxisAlignment.start, children: [ ///门店信息 - StoreInfoView(storeInfo,widget.arguments["distance"],), + StoreInfoView( + storeInfo, + widget.arguments["distance"], + ), // Padding(padding:EdgeInsets.only(left: 14.w), // child: Text( // S.of(context).diandan, @@ -655,7 +659,7 @@ class _StoreOrderPage extends State "shoppingCart": shopCarGoods, "numberOfPeople": numberOfPeople, "distance": widget.arguments["distance"], - "vipLevelName": memberVo?.memberRankVo?.rankName ??"", + "vipLevelName": memberVo?.memberRankVo?.rankName ?? "", "isVips": memberVo?.isVip ?? false, "subscribeParam": miNiDetail?.subscribeParam, }, @@ -753,7 +757,8 @@ class _StoreOrderPage extends State ///选规格 _queryMiNiDetail(String id, int count) async { - EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); if (count < 0) { shopCarGoods.shoppingCartSkuItemList.forEach((element) async { if (element.productId == id) { @@ -1054,17 +1059,17 @@ class _Title extends State { double maxScrollExtent = widget.controller.position.maxScrollExtent; double alphaHeight = (kToolbarHeight) / 2; double alphaProgress = maxScrollExtent - widget.controller.offset; - double alphatemp = 0; + double alphaTemp = 0; if (alphaProgress <= 1) { - alphatemp = 1; + alphaTemp = 1; } else if (alphaProgress <= alphaHeight) { - alphatemp = + alphaTemp = (((alphaHeight - alphaProgress) / alphaHeight) > 0.5) ? 1 : 0; } else { - alphatemp = 0; + alphaTemp = 0; } - if (alpha != alphatemp && mounted) { - alpha = alphatemp; + if (alpha != alphaTemp && mounted) { + alpha = alphaTemp; print("object: $alpha"); widget.scrollChange(alpha); setState(() {}); @@ -1076,14 +1081,16 @@ class _Title extends State<Title> { Widget build(BuildContext context) { return Container( margin: EdgeInsets.only(bottom: 38.h), - child: Text( - widget.title ?? "", - style: TextStyle( - color: Colors.black.withOpacity(alpha), - fontWeight: FontWeight.bold, - fontSize: 18.sp, - ), - ), + child: alpha == 0 + ? null + : Text( + widget.title ?? "", + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 18.sp, + ), + ), ); } }