From 06305b9ba2e3b7d88e4fa4fb06eefdbcd6c25131 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Thu, 13 Jul 2023 10:10:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E8=B7=B3=E8=BD=AC=E5=BA=97?= =?UTF-8?q?=E9=93=BA=EF=BC=8C=E9=93=BE=E6=8E=A5=E5=90=8D=E5=AD=97=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E9=80=82=E5=BA=94=E6=96=B0=E8=A7=84=E5=88=99?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9Ehttp://miniscan.lotus-wallet.com/pla?= =?UTF-8?q?ceorder=3Ftenant=5Fcode=3D1194&table=5Fid=3D1669609340031467520?= =?UTF-8?q?&store=5Fid=3D1637659387134738432=E9=93=BE=E6=8E=A5=E5=90=8D?= =?UTF-8?q?=E5=AD=97=E8=A7=84=E5=88=99=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/home/home_page.dart | 8 +++++--- lib/home/home_view/quick_order.dart | 8 +++++--- lib/mine/mine_view/mine_view.dart | 8 +++++--- lib/retrofit/min_api.dart | 4 ++-- lib/retrofit/retrofit_api.dart | 4 ++-- lib/store/shop_details_page.dart | 8 +++++--- lib/store/store_view/shop_goods.dart | 8 +++++--- lib/union/union_list.dart | 8 +++++--- lib/union/union_page.dart | 8 +++++--- 9 files changed, 39 insertions(+), 25 deletions(-) diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 2e7d8051..f17ab8ae 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -675,6 +675,8 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }); } else if (await Permission.camera.isGranted) { // http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512 + // 新版桌子码跳转 + // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); if(result.toString().contains("type\":\"coupon")){ ///活动优惠券赠送弹窗 @@ -687,9 +689,9 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { } // String result = await scanner.scan(); Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"]; - String tenantCode = uri.queryParameters["tenantCode"]; - String shopId = uri.queryParameters["shopId"]; + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; if (tableId != null && tableId != "" && tenantCode != null && diff --git a/lib/home/home_view/quick_order.dart b/lib/home/home_view/quick_order.dart index af65a3dc..2bfa6a96 100644 --- a/lib/home/home_view/quick_order.dart +++ b/lib/home/home_view/quick_order.dart @@ -382,12 +382,14 @@ class _QuickOrder extends State { }); } else if (await Permission.camera.isGranted) { // http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512 + // 新版桌子码跳转 + // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); // String result = await scanner.scan(); Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"]; - String tenantCode = uri.queryParameters["tenantCode"]; - String shopId = uri.queryParameters["shopId"]; + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; if (tableId != null && tableId != "" && tenantCode != null && diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index f8b5c7d0..2c46c8f7 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -182,6 +182,8 @@ class _MineView extends State { }); } else if (await Permission.camera.isGranted) { // http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512 + // 新版桌子码跳转 + // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); if (result.toString().contains("type\":\"coupon")) { ///活动优惠券赠送弹窗 @@ -195,9 +197,9 @@ class _MineView extends State { } // String result = await scanner.scan(); Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"]; - String tenantCode = uri.queryParameters["tenantCode"]; - String shopId = uri.queryParameters["shopId"]; + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; if (tableId != null && tableId != "" && tenantCode != null && diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 286a292b..15d058e5 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -26,8 +26,8 @@ import 'data/shopping_home_config.dart'; part 'min_api.g.dart'; -const localBaseUrl = "http://192.168.10.78:8765/app/";///本地 -// const localBaseUrl = "http://pos-test.api.lotus-wallet.com/app/";///测试 +// const localBaseUrl = "http://192.168.10.78:8765/app/";///本地 +const localBaseUrl = "http://pos-test.api.lotus-wallet.com/app/";///测试 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线上 diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 78a38906..13c3a7de 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -66,8 +66,8 @@ import 'data/wx_pay.dart'; part 'retrofit_api.g.dart'; -const localBaseUrl = "http://192.168.10.78:8766/app/";///本地 -// const localBaseUrl = "http://platform.test.api.lotus-wallet.com/app/";///测试 +// const localBaseUrl = "http://192.168.10.78:8766/app/";///本地 +const localBaseUrl = "http://platform.test.api.lotus-wallet.com/app/";///测试 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线上 @RestApi(baseUrl: localBaseUrl) diff --git a/lib/store/shop_details_page.dart b/lib/store/shop_details_page.dart index 0b3815ce..c2285615 100644 --- a/lib/store/shop_details_page.dart +++ b/lib/store/shop_details_page.dart @@ -1356,10 +1356,12 @@ class _ShopDetailsPage extends State { } else if (await Permission.camera.isGranted) { var result = await Navigator.of(context).pushNamed('/router/qr_scan'); // String result = "http://pos.app.gznl.top/placeorder/?tableId=1315906639160672256&tenantCode=1166&shopId=1300372027722432512"; + // 新版桌子码跳转 + // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"]; - String tenantCode = uri.queryParameters["tenantCode"]; - String shopId = uri.queryParameters["shopId"]; + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; if (tableId != null && tableId != "" && tenantCode != null && diff --git a/lib/store/store_view/shop_goods.dart b/lib/store/store_view/shop_goods.dart index 10b28b56..3baaa943 100644 --- a/lib/store/store_view/shop_goods.dart +++ b/lib/store/store_view/shop_goods.dart @@ -642,10 +642,12 @@ class _ShopGoods extends State { } else if (await Permission.camera.isGranted) { var result = await Navigator.of(context).pushNamed('/router/qr_scan'); // String result = "http://pos.app.gznl.top/placeorder/?tableId=1315906639160672256&tenantCode=1166&shopId=1300372027722432512"; + // 新版桌子码跳转 + // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"]; - String tenantCode = uri.queryParameters["tenantCode"]; - String shopId = uri.queryParameters["shopId"]; + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; if (tableId != null && tableId != "" && tenantCode != null && diff --git a/lib/union/union_list.dart b/lib/union/union_list.dart index 1abab53c..c381f3f0 100644 --- a/lib/union/union_list.dart +++ b/lib/union/union_list.dart @@ -436,12 +436,14 @@ class _UnionList extends State { }); } else if (await Permission.camera.isGranted) { // http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512 + // 新版桌子码跳转 + // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); // String result = await scanner.scan(); Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"]; - String tenantCode = uri.queryParameters["tenantCode"]; - String shopId = uri.queryParameters["shopId"]; + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; if (tableId != null && tableId != "" && tenantCode != null && diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index 67519db7..f68ff1f4 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -866,12 +866,14 @@ class UnionPageState extends State }); } else if (await Permission.camera.isGranted) { // http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512 + // 新版桌子码跳转 + // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); // String result = await scanner.scan(); Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"]; - String tenantCode = uri.queryParameters["tenantCode"]; - String shopId = uri.queryParameters["shopId"]; + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; if (tableId != null && tableId != "" && tenantCode != null &&