From 36606bf8382b7371815ba92dfaf1d6b0148377f4 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Sat, 2 Apr 2022 14:13:06 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/retrofit/min_api.dart | 4 ++-- lib/retrofit/retrofit_api.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 5026bdb9..8fa0eb72 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -61,8 +61,8 @@ abstract class MinApiService { } headers["Environment"] = "app"; dio.options = BaseOptions( - connectTimeout: 15000, - receiveTimeout: 15000, + connectTimeout: 10000, + receiveTimeout: 10000, headers: headers, responseType: ResponseType.json, ); diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index e66070b7..cc7de47f 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -90,8 +90,8 @@ abstract class ApiService { headers["Environment"] = "app"; } dio.options = BaseOptions( - connectTimeout: 60000, - receiveTimeout: 60000, + connectTimeout: 10000, + receiveTimeout: 10000, headers: headers, responseType: ResponseType.json, ); From 06a6a6592854f832e6049f6239177b5b04924a63 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Sat, 2 Apr 2022 15:53:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/setting/about_page.dart | 2 +- lib/setting/treaty_page.dart | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/setting/about_page.dart b/lib/setting/about_page.dart index 7e62ff2f..ac8b9989 100644 --- a/lib/setting/about_page.dart +++ b/lib/setting/about_page.dart @@ -84,7 +84,7 @@ class _AboutPage extends State { S.of(context).dangqianbanben, S.of(context).banben(version), ), - textItem(S.of(context).tebieshengming), + // textItem(S.of(context).tebieshengming), InkWell( onTap: () { Navigator.of(context) diff --git a/lib/setting/treaty_page.dart b/lib/setting/treaty_page.dart index 4adba3f5..e94c890d 100644 --- a/lib/setting/treaty_page.dart +++ b/lib/setting/treaty_page.dart @@ -36,7 +36,8 @@ class _TreatyPage extends State { background: Colors.transparent, leadingColor: Colors.black, ), - body: Container( + body: + Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, alignment: Alignment.center, From faa65dc67b7835bb7bc215f69abc33d005e4c729 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Sat, 2 Apr 2022 17:15:44 +0800 Subject: [PATCH 3/4] =?UTF-8?q?hw=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main.dart | 2 +- lib/main_page.dart | 3 ++- lib/setting/logout_ing.dart | 6 +++--- lib/setting/setting_page.dart | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index de3dea5b..e2d69ce3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -125,7 +125,7 @@ void main() async { // FlutterBugly.init(androidAppId: "204f207673",iOSAppId: "8bb92ba0f6"); } -final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); +// final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); diff --git a/lib/main_page.dart b/lib/main_page.dart index 96ae17e0..f821f904 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -139,8 +139,9 @@ class _MainPage extends State with WidgetsBindingObserver { queryUserInfo(); } - + final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); initSdk() async { + xgFlutterPlugin.stopXg(); ///ios 调用startXg前需要调用此方法 xgFlutterPlugin.configureClusterDomainName("tpns.sh.tencent.com"); xgFlutterPlugin.setEnableDebug(true); diff --git a/lib/setting/logout_ing.dart b/lib/setting/logout_ing.dart index 66f0935a..4b43f5fc 100644 --- a/lib/setting/logout_ing.dart +++ b/lib/setting/logout_ing.dart @@ -452,8 +452,8 @@ class _LogoutIng extends State { Navigator.of(context) .pushNamedAndRemoveUntil('/router/login_page', (route) => false); - if (xgFlutterPlugin != null) { - xgFlutterPlugin.stopXg(); - } + // if (xgFlutterPlugin != null) { + // xgFlutterPlugin.stopXg(); + // } } } diff --git a/lib/setting/setting_page.dart b/lib/setting/setting_page.dart index 314ed979..3af86255 100644 --- a/lib/setting/setting_page.dart +++ b/lib/setting/setting_page.dart @@ -243,9 +243,9 @@ class _SettingPage extends State { Navigator.of(context) .pushNamedAndRemoveUntil('/router/login_page', (route) => false); - if (xgFlutterPlugin != null) { - xgFlutterPlugin.stopXg(); - } + // if (xgFlutterPlugin != null) { + // xgFlutterPlugin.stopXg(); + // } } Widget settingItem(left, right) { From 5f1d428ada8503e9e19abd37fde45b432bc37a5e Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Wed, 6 Apr 2022 13:44:40 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=9B=B4=E6=96=B01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/retrofit/min_api.dart | 10 +++++----- lib/retrofit/min_api.g.dart | 8 ++++---- lib/retrofit/retrofit_api.dart | 8 ++++---- lib/retrofit/retrofit_api.g.dart | 2 +- lib/settlement/settlement.dart | 15 ++++++++------- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 8fa0eb72..022e7de7 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -21,8 +21,8 @@ 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 @@ -32,8 +32,8 @@ const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式 // const baseUrl = "http://192.168.10.236:8765/app/";///费韬 -// const base_url = "http://192.168.10.139:8765/app/";///詹云久 -// const baseUrl = "http://192.168.10.139:8765/app/";///詹云久 +const base_url = "http://192.168.10.104:8765/app/";///詹云久 +const baseUrl = "http://192.168.10.104:8765/app/";///詹云久 // const base_url = "http://192.168.10.37:8766/app/"; @@ -183,7 +183,7 @@ abstract class MinApiService { ///小程序下单 @POST("order/placeOrderFirst") - Future> placeOrderFirst(@Body() Map param); + Future> placeOrderFirst(@Body() Map param); ///小程序下单加菜 @POST("order/addOrder") diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index 02d9988a..b88b200f 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.104:8765/app/'; } final Dio _dio; @@ -269,7 +269,7 @@ class _MinApiService implements MinApiService { } @override - Future> placeOrderFirst(param) async { + Future> placeOrderFirst(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; @@ -284,9 +284,9 @@ class _MinApiService implements MinApiService { extra: _extra, baseUrl: baseUrl), data: _data); - final value = BaseData.fromJson( + final value = BaseData.fromJson( _result.data, - (json) => DownOrder.fromJson(json), + (json) => json, ); return value; } diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index cc7de47f..0b352fab 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -58,8 +58,8 @@ import 'data/vip_rule_details.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 @@ -71,8 +71,8 @@ const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 // const baseUrl = "http://192.168.10.37:8766/app/"; -// const base_url = "http://192.168.10.139:8766/app/";///詹云久 -// const baseUrl = "http://192.168.10.139:8766/app/";///詹云久 +const base_url = "http://192.168.10.104:8766/app/";///詹云久 +const baseUrl = "http://192.168.10.104:8766/app/";///詹云久 @RestApi(baseUrl: baseUrl) abstract class ApiService { diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 35c2bbd6..5cfa3725 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.104:8766/app/'; } final Dio _dio; diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index c3ebabf6..6bd2185e 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -274,23 +274,21 @@ class _Settlement extends State { if (tableId == 0) { ///正常的商店下单 - BaseData baseData = await minService + BaseData baseData = await minService .placeOrderFirst(placeOrderFirst.toJson()) .catchError((error) { print("error: $error"); }); if (baseData != null && baseData.isSuccess) { placeOrder = true; - this.downOrder = baseData.data; + this.downOrder = DownOrder.fromJson(baseData.data); querySettlement(); } else { - baseData?.isSuccess ?? false ? - SmartDialog.showToast("下单失败:订单实付金额不能为0", alignment: Alignment.center) : - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); } } else { ///火锅店下单, 等待结算 - BaseData baseData; + BaseData baseData; if (parentId == "") { // 下单 if (placeOrder) { @@ -319,11 +317,14 @@ class _Settlement extends State { } 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(() {}); } + else { + SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); + } } }