diff --git a/lib/home/home_view/discount_zone.dart b/lib/home/home_view/discount_zone.dart index 9f3967e3..d97c2306 100644 --- a/lib/home/home_view/discount_zone.dart +++ b/lib/home/home_view/discount_zone.dart @@ -102,7 +102,7 @@ class _DiscountZone extends State { overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 14.sp, - height: 1.5, + height: 1.5.h, fontWeight: MyFontWeight.semi_bold, color: Color(0xFFFFA607), ), @@ -206,7 +206,7 @@ class _DiscountZone extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - padding: EdgeInsets.only(bottom:10,top: 7,left: 12), + padding: EdgeInsets.only(bottom:10.h,top: 7.h,left: 12.w), child: Text( S.of(context).duihuanquan, style: TextStyle( @@ -232,7 +232,7 @@ class _DiscountZone extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - padding: EdgeInsets.only(bottom:10,top: 7,left: 12), + padding: EdgeInsets.only(bottom:10.h,top: 7.h,left: 12.w), child: Text( S.of(context).duihuanquan, style: TextStyle( diff --git a/lib/home/home_view/home_recommend_goods.dart b/lib/home/home_view/home_recommend_goods.dart index a5550cc8..e29ebde8 100644 --- a/lib/home/home_view/home_recommend_goods.dart +++ b/lib/home/home_view/home_recommend_goods.dart @@ -86,14 +86,14 @@ class _HomeRecommendGoods extends State { children: [ Container( decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular(4.r), ), child: MImage( commodityZone?.productImg ?? "", fit: BoxFit.contain, - radius: BorderRadius.circular(4), - width: 158, - height: 158, + radius: BorderRadius.circular(4.r), + width: 158.w, + height: 158.h, errorSrc: "assets/image/default_2_1.webp", fadeSrc: "assets/image/default_2_1.webp", ), @@ -116,7 +116,7 @@ class _HomeRecommendGoods extends State { SizedBox( height: 4.h, ), - Row( + Expanded(child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -128,7 +128,7 @@ class _HomeRecommendGoods extends State { color: Color(0xFFF85400), ), ), - SizedBox(width: 5,), + SizedBox(width: 5.w,), Text( "¥${AppUtils.calculateDouble(double.tryParse(commodityZone?.price) ?? 0)}", style: TextStyle( @@ -139,7 +139,7 @@ class _HomeRecommendGoods extends State { ), ), ], - ), + )), ], ), ); diff --git a/lib/home/home_view/shortcut_operation.dart b/lib/home/home_view/shortcut_operation.dart index b732da36..1ff402db 100644 --- a/lib/home/home_view/shortcut_operation.dart +++ b/lib/home/home_view/shortcut_operation.dart @@ -30,7 +30,7 @@ class _ShortcutOperation extends State { return Container( height: 80.h, width: double.infinity, - margin: EdgeInsets.only(bottom:15,left: 10,right: 10), + margin: EdgeInsets.only(bottom:15.h,left: 10.w,right: 10.w), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, @@ -85,8 +85,8 @@ class _ShortcutOperation extends State { SizedBox(width: 3.w), Expanded(child: Image.asset( "assets/image/home_lm.webp", - width:36, - height:36, + width:36.w, + height:36.h, ),), ], ), @@ -98,7 +98,7 @@ class _ShortcutOperation extends State { }, child: Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal:5), + margin: EdgeInsets.symmetric(horizontal:5.w), padding: EdgeInsets.all(10.h), decoration: BoxDecoration( color: Colors.white, @@ -110,7 +110,7 @@ class _ShortcutOperation extends State { spreadRadius: 0, ) ], - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular(4.r), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -128,7 +128,7 @@ class _ShortcutOperation extends State { color: Color(0xFF0D0D0D), ), ), - SizedBox(height: 5), + SizedBox(height: 5.h), Text( "充值福利多", style: TextStyle( @@ -142,8 +142,8 @@ class _ShortcutOperation extends State { SizedBox(width: 3.w), Expanded(child: Image.asset( "assets/image/home_recharge.webp", - width:36, - height:36, + width:36.w, + height:36.h, ),), ], ), @@ -156,7 +156,7 @@ class _ShortcutOperation extends State { }, child:Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal:5), + margin: EdgeInsets.symmetric(horizontal:5.w), padding: EdgeInsets.all(10.h), decoration: BoxDecoration( color: Colors.white, @@ -168,7 +168,7 @@ class _ShortcutOperation extends State { spreadRadius: 0, ) ], - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular(4.r), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -186,7 +186,7 @@ class _ShortcutOperation extends State { color: Color(0xFF0D0D0D), ), ), - SizedBox(height: 5), + SizedBox(height: 5.h), Text( "天天得福利", style: TextStyle( @@ -200,8 +200,8 @@ class _ShortcutOperation extends State { SizedBox(width: 3.w), Expanded(child: Image.asset( "assets/image/home_welfare.webp", - width:36, - height:36, + width:36.w, + height:36.h, ),), ], ), diff --git a/lib/home/home_view/top_selling_list.dart b/lib/home/home_view/top_selling_list.dart index d35c68d0..d5cbdb74 100644 --- a/lib/home/home_view/top_selling_list.dart +++ b/lib/home/home_view/top_selling_list.dart @@ -88,7 +88,7 @@ class _TopSellingList extends State { return Container( width: 290.w, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular(4.r), color: Color(0xB3FFFFFF), ), margin: EdgeInsets.only(right:8.w,top: 12.h), @@ -147,15 +147,15 @@ class _TopSellingList extends State { goodList.productImg ?? "", fit: BoxFit.cover, radius: BorderRadius.circular(4), - width: 54, - height: 54, + width: 54.w, + height: 54.h, errorSrc: "assets/image/default_2_1.webp", fadeSrc: "assets/image/default_2_1.webp", ), Image.asset( index == 0 ? "assets/image/ranking1.webp" :(index == 1 ? "assets/image/ranking2.webp": "assets/image/ranking3.webp"), - width: 25, - height: 25, + width: 25.w, + height: 25.h, fit: BoxFit.cover, ), ], @@ -189,7 +189,7 @@ class _TopSellingList extends State { color: Color(0xFF0D0D0D), ), ), - SizedBox(width: 5,), + SizedBox(width: 5.w,), Text( "¥${AppUtils.calculateDouble(double.tryParse(goodList?.applyPrice) ?? 0)}", style: TextStyle( diff --git a/lib/home/home_view/union_entry.dart b/lib/home/home_view/union_entry.dart index bef6bd39..48dee0be 100644 --- a/lib/home/home_view/union_entry.dart +++ b/lib/home/home_view/union_entry.dart @@ -30,7 +30,7 @@ class _UnionEntry extends State { return Container( height: 130.h, width: double.infinity, - margin: EdgeInsets.only(bottom:10,left: 10,right: 10,top: 14.h), + margin: EdgeInsets.only(bottom:10.h,left: 10.w,right: 10.w,top: 14.h), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, @@ -41,7 +41,7 @@ class _UnionEntry extends State { }, child: Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal:5), + margin: EdgeInsets.symmetric(horizontal:5.w), padding: EdgeInsets.symmetric(vertical:12.h), decoration: BoxDecoration( color: Colors.white, @@ -53,7 +53,7 @@ class _UnionEntry extends State { spreadRadius: 0, ) ], - borderRadius: BorderRadius.circular(6), + borderRadius: BorderRadius.circular(6.r), ), child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -62,8 +62,8 @@ class _UnionEntry extends State { Image.asset( "assets/image/home_chi.webp", fit: BoxFit.cover, - width: 60, - height: 60, + width: 60.w, + height: 60.h, ), SizedBox(height:4.h), Text( @@ -84,7 +84,7 @@ class _UnionEntry extends State { }, child: Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal:5), + margin: EdgeInsets.symmetric(horizontal:5.w), // padding: EdgeInsets.symmetric(vertical:12.h), decoration: BoxDecoration( color: Colors.white, @@ -96,7 +96,7 @@ class _UnionEntry extends State { spreadRadius: 0, ) ], - borderRadius: BorderRadius.circular(6), + borderRadius: BorderRadius.circular(6.r), ), child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -105,8 +105,8 @@ class _UnionEntry extends State { Image.asset( "assets/image/home_he.webp", fit: BoxFit.cover, - width: 60, - height: 60, + width: 60.w, + height: 60.h, ), SizedBox(height:4.h), Text( @@ -127,7 +127,7 @@ class _UnionEntry extends State { }, child: Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal:5), + margin: EdgeInsets.symmetric(horizontal:5.w), padding: EdgeInsets.symmetric(vertical:12.h), decoration: BoxDecoration( color: Colors.white, @@ -139,7 +139,7 @@ class _UnionEntry extends State { spreadRadius: 0, ) ], - borderRadius: BorderRadius.circular(6), + borderRadius: BorderRadius.circular(6.r), ), child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -148,8 +148,8 @@ class _UnionEntry extends State { Image.asset( "assets/image/home_wan.webp", fit: BoxFit.cover, - width: 60, - height: 60, + width: 60.w, + height: 60.h, ), SizedBox(height:4.h), Text( diff --git a/lib/home/points_mall_view/points_goods_view.dart b/lib/home/points_mall_view/points_goods_view.dart index d88fbd5c..82edfb87 100644 --- a/lib/home/points_mall_view/points_goods_view.dart +++ b/lib/home/points_mall_view/points_goods_view.dart @@ -111,7 +111,7 @@ class _PointGoods extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + Expanded(child: Text( goods.name, overflow: TextOverflow.ellipsis, maxLines: 2, @@ -120,8 +120,8 @@ class _PointGoods extends State { fontWeight: MyFontWeight.medium, fontSize: 15.sp, ), - ), - SizedBox(height: 5,), + )), + SizedBox(height: 5.h,), Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/integral_store/integral_store_details_page.dart b/lib/integral_store/integral_store_details_page.dart index e722f7b7..3112c1ae 100644 --- a/lib/integral_store/integral_store_details_page.dart +++ b/lib/integral_store/integral_store_details_page.dart @@ -247,11 +247,6 @@ class _IntegralStoreDetailsPage extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - // goods?.onePrice == null || goods?.onePrice == "0"? - // ((goods?.price == null || goods?.price == "0"?"":S.of(context).jifen_(goods?.price)) + - // (goods?.money == null|| goods?.money == "0.00" ?"":" + ${goods.money}元"))==""? - // (goods?.oneMoney == null || goods?.oneMoney == "0.00"?"":"${goods?.oneMoney}元"):"" - // :S.of(context).jifen_(goods?.onePrice), pointPrice(), style: TextStyle( fontWeight: MyFontWeight.semi_bold, @@ -264,7 +259,7 @@ class _IntegralStoreDetailsPage extends State { ), Expanded( child: Text( - S.of(context).yuan_(goods?.worth ?? goods?.worth ?? ""), + S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(goods?.worth ?? goods?.worth ?? "") ?? 0)), style: TextStyle( color: Color(0xFF585858), decoration: TextDecoration.lineThrough, diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index d801ec42..62aa589c 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -245,7 +245,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { ), ), Container( - margin: EdgeInsets.only(top: 265.h), + margin: EdgeInsets.only(top: 258 .h), child: Column( children: [ ///我的订单 diff --git a/lib/mine/mine_view/mine_calendar.dart b/lib/mine/mine_view/mine_calendar.dart index 63a7b85d..c1675ef1 100644 --- a/lib/mine/mine_view/mine_calendar.dart +++ b/lib/mine/mine_view/mine_calendar.dart @@ -46,27 +46,27 @@ class _MineCalendar extends State { child: Row( children: [ Expanded(child: Text( - "我的5月足迹日历", + "我的${DateTime.now().month}月足迹日历", style: TextStyle( color: Color(0xFF0D0D0D), fontWeight: MyFontWeight.semi_bold, fontSize: 15.sp, ), ),), - Text( - "查看绿叶", - style: TextStyle( - color: Color(0xFF000000), - fontWeight: MyFontWeight.regular, - fontSize: 15.sp, - ), - ), - Icon( - Icons.navigate_next, - size: 24, - color: Colors.black, - ), - SizedBox(width:12,), + // Text( + // "查看绿叶", + // style: TextStyle( + // color: Color(0xFF000000), + // fontWeight: MyFontWeight.regular, + // fontSize: 15.sp, + // ), + // ), + // Icon( + // Icons.navigate_next, + // size: 24, + // color: Colors.black, + // ), + // SizedBox(width:12,), ], ), ), diff --git a/lib/order/exchange_order_page.dart b/lib/order/exchange_order_page.dart index bb0dd316..59cfca6d 100644 --- a/lib/order/exchange_order_page.dart +++ b/lib/order/exchange_order_page.dart @@ -10,6 +10,7 @@ import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/wx_pay.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -616,12 +617,12 @@ class _ExchangeOrderPage extends State { : ((widget.arguments["price"] == null || widget.arguments["price"] == "0" ? "" - : "${(double.parse(widget.arguments["onePrice"]) * buyNum).toInt()}积分") + + : "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分") + (widget.arguments["money"] == null || widget.arguments["money"] == "0.00" ? "" - : " + ${double.parse(widget.arguments["money"]) * buyNum}元")), + : " + ${AppUtils.calculateDouble(double.tryParse(widget.arguments["money"]) * buyNum) ?? 0}元")), style: TextStyle( fontSize: 12, decoration: (widget.arguments["payType"] == 3) @@ -1015,9 +1016,9 @@ class _ExchangeOrderPage extends State { (widget.arguments["money"] == null || widget.arguments["money"] == "0.00" ? "" - : " + ${double.parse(widget.arguments["money"]) * buyNum}元"); + : " + ${AppUtils.calculateDouble(double.tryParse(widget.arguments["money"]) * buyNum) ?? 0}元"); }else if(widget.arguments["payType"] == 3){ - return "${double.parse(widget.arguments["oneMoney"]) * buyNum}元"; + return "${AppUtils.calculateDouble(double.tryParse(widget.arguments["oneMoney"]) * buyNum) ?? 0}元"; } } diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index af18ff25..c8a9fc6c 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -560,6 +560,24 @@ class _OrderHistoryList extends State }); } + queryDetails(id) async { + if (apiService == null) { + SharedPreferences value = await SharedPreferences.getInstance(); + apiService = ApiService( + Dio(), + context: context, + token: value.getString("token"), + showLoading: true + ); + } + BaseData baseData = await apiService + .orderDetail(id) + .catchError((error) {}); + if (baseData != null && baseData.isSuccess) { + return baseData.data; + } + } + paySelected(OrderInfo orderInfo, MinApiService minService) async { var payChannel = await showModalBottomSheet( context: context, @@ -568,30 +586,23 @@ class _OrderHistoryList extends State return OrderPaySelected(); }, ); - // if (payChannel != null && payChannel > 0) { - // OrderUtils.carryOnPay( - // payChannel, - // minService, - // orderInfo, - // (BaseData baseData) { - // SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center); - // Future.delayed(Duration(seconds: 3), () { - // _onRefresh(); - // }); - // }, - // ); - // } if (payChannel != null && payChannel > 0) { - OrderUtils.carryOnPay(payChannel, minService, orderInfo, payResult); + orderInfo = await queryDetails(orderInfo.id); + OrderUtils.carryOnPay( + payChannel, + minService, + orderInfo, + (BaseData baseData) { + SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center); + Future.delayed(Duration(seconds: 3), () { + _onRefresh(); + }); + }, + ); } } - payResult(BaseData baseData) { - SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center); - Future.delayed(Duration(seconds: 3), () { - _onRefresh(); - }); - } + payResult(BaseData baseData) {} orderCancel(String orderId) async { BaseData baseData = diff --git a/lib/retrofit/data/order_product_vo.dart b/lib/retrofit/data/order_product_vo.dart index b3e62d5b..bb4c5b53 100644 --- a/lib/retrofit/data/order_product_vo.dart +++ b/lib/retrofit/data/order_product_vo.dart @@ -10,9 +10,9 @@ class OrderProductVOList { String id, String productId, String productName, - String returnCode, - String returnStatus, - String returnType, + dynamic returnCode, + dynamic returnStatus, + dynamic returnType, String sellPrice, String skuId, String skuImg, diff --git a/lib/retrofit/data/placeOrderFirst.dart b/lib/retrofit/data/placeOrderFirst.dart index 8dc1d2df..effb8486 100644 --- a/lib/retrofit/data/placeOrderFirst.dart +++ b/lib/retrofit/data/placeOrderFirst.dart @@ -5,25 +5,25 @@ import 'package:huixiang/retrofit/data/shoppingCart.dart'; class PlaceOrderFirst { int cartNum; - String cartSum; - String addressId; + dynamic cartSum; + dynamic addressId; bool isSubscribe; - num isTakeOut; - String notes; - String id; - String numberOfPeople; - num orderSource; - String orderType; - num orderTypeId; - String parentCode; - String parentId; - num payChannel; + int isTakeOut; + dynamic notes; + dynamic id; + dynamic numberOfPeople; + int orderSource; + dynamic orderType; + int orderTypeId; + dynamic parentCode; + dynamic parentId; + int payChannel; PromotionInfoDTOBean promotionInfoDTO; String recMobile; List orderProductVOList; List shoppingCartSkuItemList; List skuItemDTOList; - num source; + int source; String storeId; String subcribeTime; String tableId; diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 21c9f8fa..d808a441 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -65,8 +65,8 @@ abstract class MinApiService { } headers["Environment"] = "app"; dio.options = BaseOptions( - connectTimeout: 15000, - receiveTimeout: 15000, + connectTimeout: 18000, + receiveTimeout: 18000, headers: headers, responseType: ResponseType.json, ); @@ -191,7 +191,7 @@ abstract class MinApiService { ///小程序下单加菜 @POST("order/addOrder") - Future> addOrder(@Body() Map param); + Future> addOrder(@Body() Map param); /// 结算 @POST("order/settlement") diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index 0a88c69e..b2d36ae5 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -292,7 +292,7 @@ class _MinApiService implements MinApiService { } @override - Future> addOrder(param) async { + Future> addOrder(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; @@ -306,9 +306,9 @@ class _MinApiService implements MinApiService { extra: _extra, baseUrl: baseUrl), data: _data); - final value = BaseData.fromJson( + final value = BaseData.fromJson( _result.data, - (json) => json??""==""?null:DownOrder.fromJson(json), + (json) => json, ); return value; } diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 22b35523..98a9d460 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -78,6 +78,7 @@ class _Settlement extends State { String productSkuId; int count1 = 0; String productId; + bool orderButton = false; @override void initState() { @@ -437,6 +438,7 @@ class _Settlement extends State { .catchError((error) { print("error: $error"); }); + // orderButton =false; if (baseData != null && baseData.isSuccess) { placeOrder = true; this.downOrder = DownOrder.fromJson(baseData.data); @@ -446,7 +448,7 @@ class _Settlement extends State { } } else { ///火锅店下单, 等待结算 - BaseData baseData; + BaseData baseData; if (placeOrder) { // 结算 querySettlement(); @@ -467,9 +469,10 @@ class _Settlement extends State { }); } } + orderButton =false; if (baseData != null && baseData.isSuccess) { placeOrder = true; - this.downOrder = baseData.data; + this.downOrder = DownOrder.fromJson(baseData.data); queryOrderDetails( (parentId == null || parentId == "") ? baseData.data.id : parentId); setState(() {}); @@ -482,7 +485,7 @@ class _Settlement extends State { ///结算 querySettlement() async { placeOrderFirst.id = parentId != "" ? parentId : downOrder.id; - placeOrderFirst.orderProductVOList = downOrder == null + placeOrderFirst.orderProductVOList = (downOrder == null) ? minOrderInfo.orderProductVOList : downOrder.orderProductVOList; if (placeOrderFirst.payChannel == 1) { @@ -499,6 +502,7 @@ class _Settlement extends State { .catchError((error) { print(error); }); + orderButton =false; if (baseData != null && baseData.isSuccess) { WxPay wxPay = baseData.data; await registerWxApi( @@ -522,8 +526,9 @@ class _Settlement extends State { .catchError((error) { print(error); }); + orderButton =false; if (baseData != null && baseData.isSuccess) { - SmartDialog.showToast(baseData?.msg == "ok" ? "订单支付成功":"", alignment: Alignment.center); + SmartDialog.showToast(baseData.data, alignment: Alignment.center); toOrderDetails(placeOrderFirst.id); } else { SmartDialog.show( @@ -531,7 +536,7 @@ class _Settlement extends State { () { toOrderDetails(placeOrderFirst.id); }, - text: "${baseData.msg}", + text: "${baseData?.msg}", )); } } @@ -780,6 +785,12 @@ class _Settlement extends State { vertical: 5.h, ), callback: () { + if(orderButton){ + SmartDialog.showToast("订单正在提交中...",alignment: Alignment.center); + return; + } + else + orderButton = true; pageType != null ? bargainOrderId != null ? activityPay() diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index cda12941..b9d76d88 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -129,6 +129,11 @@ class _StoreOrderListPage extends State { itemBuilder: (context, position) { return GestureDetector( onTap: () { + if (widget.storeInfo.posType.code == + "NORMALSTORE" && + widget.storeInfo.storeName == "百年川椒(光谷店)"||widget.storeInfo.storeName == "百年川椒(汉街店)") + return; + else goShopDetailsPage(position); }, child: goodsItem(position), diff --git a/lib/view_widget/activity_poster.dart b/lib/view_widget/activity_poster.dart index 69c9711d..66141e50 100644 --- a/lib/view_widget/activity_poster.dart +++ b/lib/view_widget/activity_poster.dart @@ -24,7 +24,6 @@ class _ActivityPoster extends State { Widget build(BuildContext context) { return Container( width: double.infinity, - height: 332.h, alignment: Alignment.center, margin: EdgeInsets.only( left:27.w, @@ -45,9 +44,9 @@ class _ActivityPoster extends State { ), child:MImage( widget?.activityPos?.showImage ?? "", - width: double.infinity, - height: MediaQuery.of(context).size.height / 2, - fit: BoxFit.fill, + aspectRatio: 0.75, + fit: BoxFit.cover, + noCompress: true, radius: BorderRadius.all(Radius.circular(12)), errorSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp", diff --git a/lib/view_widget/custom_image.dart b/lib/view_widget/custom_image.dart index 1b1cc66b..35aca8c4 100644 --- a/lib/view_widget/custom_image.dart +++ b/lib/view_widget/custom_image.dart @@ -14,6 +14,7 @@ class MImage extends StatelessWidget { double height; final BoxFit fit; final bool isCircle; + final bool noCompress;//不压缩图片 double scaleIndex = 2.5; @@ -26,6 +27,7 @@ class MImage extends StatelessWidget { this.height, this.fit, this.isCircle = false, + this.noCompress = false, this.radius = BorderRadius.zero, }); @@ -52,7 +54,10 @@ class MImage extends StatelessWidget { MediaQuery.of(context).size.height:constraints.constrainHeight()) * scaleIndex).toInt(); ///压缩图片 if ((src??"").startsWith("http")) { - imageUrl = "$src?imageView2/1/w/${_w}/h/${_h}/format/jpg/q/75"; + if(!noCompress) + imageUrl = src; + else + imageUrl = "$src?imageView2/1/w/${_w}/h/${_h}/format/jpg/q/75"; } // print("imageUrl:$imageUrl");