From 2a7cbdd44eba96137ea72c65b2074ab34c19dba4 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Mon, 21 Feb 2022 14:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/community/community_details.dart | 2 +- lib/order/order_view/order_address.dart | 2 +- lib/qr/qr_share_image.dart | 2 +- lib/retrofit/data/min_order_info.dart | 12 ++++++------ lib/retrofit/min_api.dart | 8 ++++---- lib/retrofit/min_api.g.dart | 2 +- lib/retrofit/retrofit_api.dart | 13 +++++-------- lib/retrofit/retrofit_api.g.dart | 8 ++++---- lib/settlement/settlement.dart | 5 ++++- .../settlement_view/settlement_order_commodity.dart | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lib/community/community_details.dart b/lib/community/community_details.dart index 391b8702..90b61610 100644 --- a/lib/community/community_details.dart +++ b/lib/community/community_details.dart @@ -127,7 +127,7 @@ class _CommunityDetails extends State with WidgetsBindingObser exitFull: () { setState(() {}); }, - userId:widget.arguments !=null ? widget.arguments["userId"] :widget.arguments["mid"], + userId:widget.arguments !=null ? widget.arguments["userId"] : widget.arguments["mid"], itemCount: 3, isDetails: true, heightFun: (height) { diff --git a/lib/order/order_view/order_address.dart b/lib/order/order_view/order_address.dart index 536b12de..363fd09f 100644 --- a/lib/order/order_view/order_address.dart +++ b/lib/order/order_view/order_address.dart @@ -87,7 +87,7 @@ class _OrderAddress extends State { ), ), SizedBox( - width: 12.w, + width:7.w, ), Expanded( child: Text( diff --git a/lib/qr/qr_share_image.dart b/lib/qr/qr_share_image.dart index 68aa47f2..445c66a4 100644 --- a/lib/qr/qr_share_image.dart +++ b/lib/qr/qr_share_image.dart @@ -136,7 +136,7 @@ class _QrShareImagePage extends State { margin: EdgeInsets.only(left: 16.w, right: 24.w), child: Text( // S.of(context).saomashibieguanzhugongzonghao, - S.of(context).beiyaoqingdejiangli, + S.of(context).fenxiangyaoqingma, textAlign: TextAlign.center, style: TextStyle( color: Color(0xFF2E3552), diff --git a/lib/retrofit/data/min_order_info.dart b/lib/retrofit/data/min_order_info.dart index 6979e2d9..d2370a0a 100644 --- a/lib/retrofit/data/min_order_info.dart +++ b/lib/retrofit/data/min_order_info.dart @@ -62,8 +62,8 @@ class MinOrderInfo { String totalDiscountPrice, int orderSource, dynamic address, - dynamic discountPercent, - dynamic discountAmount, + dynamic discountPercent, + String discountAmount, dynamic discountType, dynamic discountMoney, dynamic overTime, @@ -315,7 +315,7 @@ class MinOrderInfo { int orderSource; dynamic address; dynamic discountPercent; - dynamic discountAmount; + String discountAmount; dynamic discountType; dynamic discountMoney; dynamic overTime; @@ -451,8 +451,8 @@ class OrderInfoVo { MemberVO memberVO, String postAge, String price, - String orderSum, - dynamic discountAmount, + String orderSum, + String discountAmount, dynamic promotionInfoList, dynamic couponList, String threshold, @@ -495,7 +495,7 @@ class OrderInfoVo { String postAge; String price; String orderSum; - dynamic discountAmount; + String discountAmount; dynamic promotionInfoList; dynamic couponList; String threshold; diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index d6e9ad5b..84461685 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -21,15 +21,15 @@ import 'data/shoppingCart.dart'; part 'min_api.g.dart'; -const base_url = "https://pos.api.lotus-wallet.com/app/"; ///正式 -const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式 +// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///正式 +// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式 // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 -// const base_url = "http://192.168.10.236:8765/app/";///费韬 -// const baseUrl = "http://192.168.10.236:8765/app/";///费韬 +const base_url = "http://192.168.10.236:8765/app/";///费韬 +const baseUrl = "http://192.168.10.236:8765/app/";///费韬 // const base_url = "http://192.168.10.88:8765/app/";///詹云久 diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index 02d9988a..1c1cc751 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -9,7 +9,7 @@ part of 'min_api.dart'; class _MinApiService implements MinApiService { _MinApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'https://pos.api.lotus-wallet.com/app/'; + baseUrl ??= 'http://192.168.10.236:8765/app/'; } final Dio _dio; diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 76f21efa..55730ee0 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -56,17 +56,14 @@ import 'data/wx_pay.dart'; part 'retrofit_api.g.dart'; -const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 -// const base_url = "http://192.168.10.236:8766/app/"; ///费韬 -// const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 - -// const base_url = "http://192.168.10.159:8766/app/"; ///费韬 -// const baseUrl = "http://192.168.10.159:8766/app/"; ///费韬 +const base_url = "http://192.168.10.236:8766/app/"; ///费韬 +const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 // const base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; @@ -388,7 +385,7 @@ abstract class ApiService { ///取消订单 @GET("/order/cancel/{id}") - Future> orderCancel(@Path("id") String id); + Future> orderCancel(@Path("id") String id); ///继续付款? @POST("/order/settlement") diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index d5cd1024..ad727613 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; + baseUrl ??= 'http://192.168.10.236:8766/app/'; } final Dio _dio; @@ -1189,7 +1189,7 @@ class _ApiService implements ApiService { } @override - Future> orderCancel(id) async { + Future> orderCancel(id) async { ArgumentError.checkNotNull(id, 'id'); const _extra = {}; final queryParameters = {}; @@ -1203,9 +1203,9 @@ class _ApiService implements ApiService { extra: _extra, baseUrl: baseUrl), data: _data); - final value = BaseData.fromJson( + final value = BaseData.fromJson( _result.data, - (json) => json as bool, + (json) => json as dynamic, ); return value; } diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 07e2b533..60bc4a6c 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -152,6 +152,8 @@ class _Settlement extends State { setState(() { minOrderInfo = baseData.data; }); + }else{ + SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } } @@ -282,7 +284,8 @@ class _Settlement extends State { this.downOrder = baseData.data; querySettlement(); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("下单失败:订单实付金额不能为0", alignment: Alignment.center); + // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } } else { ///火锅店下单, 等待结算 diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index 3292f7c2..8d853b0c 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -383,7 +383,7 @@ class _SettlementOrderCommodity extends State { String discountPrice(){ if(widget.minOrderInfo != null){ - return (widget.minOrderInfo.discountAmount ?? "0") + double.parse(widget.settleOrderInfo.benefitDiscountAmount ?? "0"); + return (widget.minOrderInfo.discountAmount ?? "0") + (widget.settleOrderInfo.benefitDiscountAmount ?? "0"); }else if(widget.tableId < 0){ return "0"; }else {