From 1b5a815a370d926dd5c351d25112073f2dc93f62 Mon Sep 17 00:00:00 2001 From: fmk Date: Fri, 24 Mar 2023 17:44:37 +0800 Subject: [PATCH] =?UTF-8?q?ios=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner.xcodeproj/project.pbxproj | 6 +- lib/login/new_login_page.dart | 2 +- lib/message/system_details.dart | 4 +- lib/message/system_message.dart | 4 +- lib/order/order_detail_page.dart | 134 +++++++++++-------------- lib/settlement/settlement.dart | 2 +- lib/utils/status_utils.dart | 2 +- lib/view_widget/new_coupon_widget.dart | 2 +- 8 files changed, 68 insertions(+), 88 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 19c6b784..337e6dbd 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -617,7 +617,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -819,7 +819,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -912,7 +912,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index 78229327..ff90b763 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -416,7 +416,7 @@ class _NewLoginPage extends State { Container( height: 30.h, width: MediaQuery.of(context).size.width - 100.w, - margin: EdgeInsets.only(bottom:5.h), + margin: EdgeInsets.only(bottom:10.h), child: TextField( style: TextStyle( height: 1.h, diff --git a/lib/message/system_details.dart b/lib/message/system_details.dart index efdc1d6e..7e70d7f0 100644 --- a/lib/message/system_details.dart +++ b/lib/message/system_details.dart @@ -243,7 +243,7 @@ class _SystemDetails extends State { ? "assets/image/icon_system_message.webp" : (message.typed == 2) ? "assets/image/icon_system_message.webp" - : "assets/image/c_z.webp", + : "assets/image/icon_cz.webp", width: 24.w, height: 24.h, ), @@ -370,7 +370,7 @@ class _SystemDetails extends State { ? "assets/image/icon_system_message.webp" : (message.typed == 2) ? "assets/image/icon_system_message.webp" - : "assets/image/c_z.webp", + : "assets/image/icon_cz.webp", width: 24.w, height: 24.h, ), diff --git a/lib/message/system_message.dart b/lib/message/system_message.dart index c253b071..b7de1f57 100644 --- a/lib/message/system_message.dart +++ b/lib/message/system_message.dart @@ -154,6 +154,7 @@ class _SystemMessagePage extends State { // ), // ], // ), + backgroundColor: Colors.white, body: SmartRefresher( enablePullDown: true, enablePullUp: true, @@ -363,6 +364,7 @@ class _SystemMessagePage extends State { ), ], ), + if(title != S.of(context).xitongxiaoxi) Container( margin: EdgeInsets.only(top: 12.h), width: double.infinity, @@ -643,7 +645,7 @@ class _SystemMessagePage extends State { ? "assets/image/icon_system_message.webp" : (message.typed == 2) ? "assets/image/icon_system_message.webp" - : "assets/image/c_z.webp", + : "assets/image/icon.webp", width: 40.w, height: 40.h, ), diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index a9fac982..5d215b07 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -39,14 +39,17 @@ class _OrderDetailPage extends State { ApiService apiService; MinApiService minService; int jumpState; - final RefreshController refreshController = RefreshController(); @override void initState() { super.initState(); SharedPreferences.getInstance().then((value) { - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: true); + apiService = ApiService( + Dio(), + context: context, + token: value.getString("token"), + showLoading: true + ); queryDetails(); }); jumpState = widget.arguments["jumpState"]; @@ -63,7 +66,7 @@ class _OrderDetailPage extends State { String tenant = orderInfo.tenantCode; String storeId = orderInfo.storeId; SharedPreferences.getInstance().then( - (value) => { + (value) => { value.setString('minToken', minToken), value.setString('tenant', tenant), value.setString('storeId', storeId), @@ -91,19 +94,16 @@ class _OrderDetailPage extends State { queryDetails() async { if (apiService == null) { SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), + apiService = ApiService( + Dio(), context: context, token: value.getString("token"), - showLoading: false); + showLoading: false + ); } BaseData baseData = await apiService .orderDetail(widget.arguments["id"]) - .catchError((error) { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), - alignment: Alignment.center); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); + .catchError((error) {}); if (baseData != null && baseData.isSuccess) { orderInfo = baseData.data; payStatus = orderInfo.payStatus; @@ -123,12 +123,8 @@ class _OrderDetailPage extends State { setState(() { statusTitle(); }); - refreshController.refreshCompleted(); - refreshController.loadComplete(); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - refreshController.refreshFailed(); - refreshController.loadFailed(); + }else{ + SmartDialog.showToast(baseData.msg,alignment: Alignment.center); } } @@ -163,70 +159,52 @@ class _OrderDetailPage extends State { leadingColor: Colors.white, brightness: Brightness.dark, ), - body: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh:(){ - setState(() { - queryDetails(); - }); - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Container( - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - child: Column( - children: [ - ///订单状态显示 - OrderStatus( - orderStatus, - isTakeOut, - sendStatus, - payStatus, - refundStatus, - title, - center, - orderInfo, - ), + body: Container( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + child: Column( + children: [ + ///订单状态显示 + OrderStatus( + orderStatus, + isTakeOut, + sendStatus, + payStatus, + refundStatus, + title, + center, + orderInfo, + ), - ///订单取货地址,或, 收货地址 - if(orderInfo != null && orderInfo.addressExt != null) - OrderAddress( - orderStatus, - isTakeOut, - sendStatus, - payStatus, - refundStatus, - title, - center, - paySelected, - _orderCancel, - orderInfo, - jumpState - ), + ///订单取货地址,或, 收货地址 + if(orderInfo != null && orderInfo.addressExt != null) + OrderAddress( + orderStatus, + isTakeOut, + sendStatus, + payStatus, + refundStatus, + title, + center, + paySelected, + _orderCancel, + orderInfo, + jumpState + ), - ///订单商品 - if(orderInfo != null) - OrderCommodity(orderInfo), + ///订单商品 + if(orderInfo != null) + OrderCommodity(orderInfo), - ///显示订单信息 - if(orderInfo != null) - OrderInfoView(orderInfo, isTakeOut), + ///显示订单信息 + if(orderInfo != null) + OrderInfoView(orderInfo, isTakeOut), - Container( - height: 42.h, - ), - ], - ), + Container( + height: 42.h, + ), + ], ), ), ), diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 23f86df5..c01378a2 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -518,7 +518,7 @@ class _Settlement extends State { placeOrderFirst.storeId = storeInfo.id; placeOrderFirst.subcribeTime = null; placeOrderFirst.tableId = "$tableId"; - for(int i = 0;i