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 &&