diff --git a/ios/Podfile.lock b/ios/Podfile.lock index e30b0e1c..aaf89031 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,4 +1,19 @@ PODS: + - AFNetworking (4.0.1): + - AFNetworking/NSURLSession (= 4.0.1) + - AFNetworking/Reachability (= 4.0.1) + - AFNetworking/Security (= 4.0.1) + - AFNetworking/Serialization (= 4.0.1) + - AFNetworking/UIKit (= 4.0.1) + - AFNetworking/NSURLSession (4.0.1): + - AFNetworking/Reachability + - AFNetworking/Security + - AFNetworking/Serialization + - AFNetworking/Reachability (4.0.1) + - AFNetworking/Security (4.0.1) + - AFNetworking/Serialization (4.0.1) + - AFNetworking/UIKit (4.0.1): + - AFNetworking/NSURLSession - BaiduMapKit/Base (6.2.0) - BaiduMapKit/Map (6.2.0): - BaiduMapKit/Base @@ -26,18 +41,19 @@ PODS: - flutter_bmflocation (1.0.3): - BMKLocationKit - Flutter - - flutter_qr_reader (0.0.1): + - flutter_scankit (0.0.1): - Flutter + - ScanKitFrameWork (~> 1.0.2.300) - fluwx (0.0.1): - Flutter + - WechatOpenSDK_Fuck (~> 1.9.2) - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - image_cropper (0.0.4): - - Flutter - - TOCropViewController (~> 2.6.0) - - image_picker (0.0.1): + - image_pickers (0.0.1): + - AFNetworking - Flutter + - ZLPhotoBrowser-objc (= 1.0.4) - mob_sharesdk (4.4.0): - mob_sharesdk/ShareSDK (= 4.4.0) - MOBFoundation (>= 3.2.9) @@ -68,6 +84,10 @@ PODS: - Flutter - "permission_handler (5.1.0+2)": - Flutter + - ScanKitFrameWork (1.0.2.300) + - SDWebImage (5.12.1): + - SDWebImage/Core (= 5.12.1) + - SDWebImage/Core (5.12.1) - shared_preferences (0.0.1): - Flutter - sharesdk_plugin (1.1.2): @@ -83,7 +103,6 @@ PODS: - Flutter - FMDB (>= 2.7.5) - SSZipArchive (2.4.2) - - TOCropViewController (2.6.0) - TPNS-iOS (1.3.3.0) - tpns_flutter_plugin (1.1.2): - Flutter @@ -96,6 +115,9 @@ PODS: - Flutter - webview_flutter (0.0.1): - Flutter + - WechatOpenSDK_Fuck (1.9.2) + - ZLPhotoBrowser-objc (1.0.4): + - SDWebImage DEPENDENCIES: - Flutter (from `Flutter`) @@ -104,10 +126,9 @@ DEPENDENCIES: - flutter_baidu_mapapi_search (from `.symlinks/plugins/flutter_baidu_mapapi_search/ios`) - flutter_baidu_mapapi_utils (from `.symlinks/plugins/flutter_baidu_mapapi_utils/ios`) - flutter_bmflocation (from `.symlinks/plugins/flutter_bmflocation/ios`) - - flutter_qr_reader (from `.symlinks/plugins/flutter_qr_reader/ios`) + - flutter_scankit (from `.symlinks/plugins/flutter_scankit/ios`) - fluwx (from `.symlinks/plugins/fluwx/ios`) - - image_cropper (from `.symlinks/plugins/image_cropper/ios`) - - image_picker (from `.symlinks/plugins/image_picker/ios`) + - image_pickers (from `.symlinks/plugins/image_pickers/ios`) - package_info (from `.symlinks/plugins/package_info/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`) - permission_handler (from `.symlinks/plugins/permission_handler/ios`) @@ -123,14 +144,18 @@ DEPENDENCIES: SPEC REPOS: trunk: + - AFNetworking - BaiduMapKit - BMKLocationKit - FMDB - mob_sharesdk - MOBFoundation + - ScanKitFrameWork + - SDWebImage - SSZipArchive - - TOCropViewController - TPNS-iOS + - WechatOpenSDK_Fuck + - ZLPhotoBrowser-objc EXTERNAL SOURCES: Flutter: @@ -145,14 +170,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_baidu_mapapi_utils/ios" flutter_bmflocation: :path: ".symlinks/plugins/flutter_bmflocation/ios" - flutter_qr_reader: - :path: ".symlinks/plugins/flutter_qr_reader/ios" + flutter_scankit: + :path: ".symlinks/plugins/flutter_scankit/ios" fluwx: :path: ".symlinks/plugins/fluwx/ios" - image_cropper: - :path: ".symlinks/plugins/image_cropper/ios" - image_picker: - :path: ".symlinks/plugins/image_picker/ios" + image_pickers: + :path: ".symlinks/plugins/image_pickers/ios" package_info: :path: ".symlinks/plugins/package_info/ios" path_provider: @@ -177,6 +200,7 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/webview_flutter/ios" SPEC CHECKSUMS: + AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce BaiduMapKit: 907c6d9b74f66c3ff4741fc4b568ae0b339917f8 BMKLocationKit: 097814ef672b1e57e86e6c1968d7892fb78002bf Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c @@ -185,28 +209,30 @@ SPEC CHECKSUMS: flutter_baidu_mapapi_search: 4cffaa74e739a4114595c4f82f790e1783bb612d flutter_baidu_mapapi_utils: a5bd582b91ecd35be1bc45558b38f49d5684f70a flutter_bmflocation: 12f1ba91bae4b16d78d4f475023e0254ed351f1c - flutter_qr_reader: d930dde3b2cfe2b3d0bb7d66e5ff3e514300a5e5 - fluwx: c64c2b84b965279aaa251a80b5b6a1cd0ef7bd45 + flutter_scankit: 16936d86b3de3f83c122e763f4c24c5da214c78f + fluwx: c192ef1ea3617badb813fa1a761ffc5c9c12208a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - image_cropper: f1668dd8d2cad2d357955caad15a40547856edcb - image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 + image_pickers: 25c8916d358bc9d2707cb470ba3d57497f105773 mob_sharesdk: c771f001e00739d24301a9fa250247601efe7a3c MOBFoundation: 2abd23c80c33d1337d30dc4b0018ed914cef8f8e package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259 permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 + ScanKitFrameWork: 0ad578f3db0ef9b64dd0f533d10d10a52ce93c80 + SDWebImage: 4dc3e42d9ec0c1028b960a33ac6b637bb432207b shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d sharesdk_plugin: 6d6634bb480174b607030f19fc9d84d68cfbf326 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 SSZipArchive: e7b4f3d9e780c2acc1764cd88fbf2de28f26e5b2 - TOCropViewController: 3105367e808b7d3d886a74ff59bf4804e7d3ab38 TPNS-iOS: 57a146496858ba2fb5d43e5f240feb19243b69cb tpns_flutter_plugin: a366649c8ad71f19dfb864d3c994ed0480b69daa url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e wakelock: bfc7955c418d0db797614075aabbc58a39ab5107 webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 + WechatOpenSDK_Fuck: aa8f4b0af902837e887a1d40c62f06c060c1dc98 + ZLPhotoBrowser-objc: c7657d3bc85ae231884e058d0e3638f619164736 PODFILE CHECKSUM: 7092aa3092b9508e0ccea9e76cd5fa33505dbb46 -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 656c85d9..1d593ab0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -657,6 +657,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 120EAF7195D9AB3BB1E8FA2B /* [CP] Copy Pods Resources */, + 8ADBB1E9F51ACB25060865A4 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -763,6 +764,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 8ADBB1E9F51ACB25060865A4 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -892,7 +910,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -935,8 +953,7 @@ "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"", "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"", "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"", - "\"${PODS_ROOT}/Headers/Public/image_cropper\"", - "\"${PODS_ROOT}/Headers/Public/image_picker\"", + "\"${PODS_ROOT}/Headers/Public/image_pickers\"", "\"${PODS_ROOT}/Headers/Public/path_provider\"", "\"${PODS_ROOT}/Headers/Public/permission_handler\"", "\"${PODS_ROOT}/Headers/Public/shared_preferences\"", @@ -949,6 +966,7 @@ "\"${PODS_ROOT}/Headers/Private/fluwx\"", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -966,8 +984,7 @@ "$(inherited)", "-ObjC", "-l\"c++\"", - "-l\"image_cropper\"", - "-l\"image_picker\"", + "-l\"image_pickers\"", "-l\"path_provider\"", "-l\"flutter_bmflocation\"", "-l\"flutter_baidu_mapapi_utils\"", @@ -1078,7 +1095,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -1128,7 +1145,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -1171,8 +1188,7 @@ "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"", "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"", "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"", - "\"${PODS_ROOT}/Headers/Public/image_cropper\"", - "\"${PODS_ROOT}/Headers/Public/image_picker\"", + "\"${PODS_ROOT}/Headers/Public/image_pickers\"", "\"${PODS_ROOT}/Headers/Public/path_provider\"", "\"${PODS_ROOT}/Headers/Public/permission_handler\"", "\"${PODS_ROOT}/Headers/Public/shared_preferences\"", @@ -1185,6 +1201,7 @@ "\"${PODS_ROOT}/Headers/Private/fluwx\"", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1202,8 +1219,7 @@ "$(inherited)", "-ObjC", "-l\"c++\"", - "-l\"image_cropper\"", - "-l\"image_picker\"", + "-l\"image_pickers\"", "-l\"path_provider\"", "-l\"flutter_bmflocation\"", "-l\"flutter_baidu_mapapi_utils\"", @@ -1300,8 +1316,7 @@ "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"", "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"", "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"", - "\"${PODS_ROOT}/Headers/Public/image_cropper\"", - "\"${PODS_ROOT}/Headers/Public/image_picker\"", + "\"${PODS_ROOT}/Headers/Public/image_pickers\"", "\"${PODS_ROOT}/Headers/Public/path_provider\"", "\"${PODS_ROOT}/Headers/Public/permission_handler\"", "\"${PODS_ROOT}/Headers/Public/shared_preferences\"", @@ -1314,6 +1329,7 @@ "\"${PODS_ROOT}/Headers/Private/fluwx\"", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1331,8 +1347,7 @@ "$(inherited)", "-ObjC", "-l\"c++\"", - "-l\"image_cropper\"", - "-l\"image_picker\"", + "-l\"image_pickers\"", "-l\"path_provider\"", "-l\"flutter_bmflocation\"", "-l\"flutter_baidu_mapapi_utils\"", diff --git a/lib/retrofit/data/base_data.g.dart b/lib/retrofit/data/base_data.g.dart deleted file mode 100644 index 3a4ba372..00000000 --- a/lib/retrofit/data/base_data.g.dart +++ /dev/null @@ -1,37 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'base_data.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -BaseData _$BaseDataFromJson( - Map json, - T Function(Object json) fromJsonT, -) { - return BaseData() - ..code = json['code'] as int - ..data = fromJsonT(json['data']) - ..extra = json['extra'] - ..isError = json['isError'] as bool - ..isSuccess = json['isSuccess'] as bool - ..msg = json['msg'] as String - ..path = json['path'] as String - ..timestamp = json['timestamp'] as String; -} - -Map _$BaseDataToJson( - BaseData instance, - Object Function(T value) toJsonT, -) => - { - 'code': instance.code, - 'data': toJsonT(instance.data), - 'extra': instance.extra, - 'isError': instance.isError, - 'isSuccess': instance.isSuccess, - 'msg': instance.msg, - 'path': instance.path, - 'timestamp': instance.timestamp, - }; diff --git a/lib/retrofit/data/min_order_info.dart b/lib/retrofit/data/min_order_info.dart new file mode 100644 index 00000000..917d4842 --- /dev/null +++ b/lib/retrofit/data/min_order_info.dart @@ -0,0 +1,713 @@ +import 'package:huixiang/retrofit/data/order_product_vo.dart'; +import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; + +class MinOrderInfo { + MinOrderInfo({ + String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String tenantCode, + String storeId, + String storeName, + String tableId, + int orderType, + bool clearTable, + String mid, + String parentId, + String parentCode, + String orderCode, + String dayFlowCode, + int orderStatus, + int sendStatus, + int payStatus, + String memberAccount, + String logisticsId, + String shipperCode, + String logisticsName, + String logisticsNum, + dynamic logisticsCase, + int refundStatus, + dynamic addressExt, + String postFee, + String orderSum, + String paySum, + String paySumSub, + String accountPay, + String couponSubPrice, + String customPrice, + String removeDecimal, + bool isSubscribe, + dynamic subcribeTime, + dynamic sendTime, + dynamic confirmTime, + dynamic returnMoneyTime, + String notes, + dynamic prepayId, + dynamic payTime, + int payChannel, + dynamic payNum, + String promotionId, + String couponId, + int isDelete, + int isTakeOut, + int batch, + String orderDiscountPrice, + String dishesDiscountPrice, + String orderPercentPrice, + String finalPayPrice, + String activityNoPrice, + String activityDiscountPrice, + String totalDiscountPrice, + int orderSource, + dynamic address, + dynamic discountPercent, + dynamic discountAmount, + dynamic discountType, + dynamic discountMoney, + dynamic overTime, + List orderProductVOList, + dynamic moneyReturnList, + dynamic goodsReturnList, + dynamic moneyReturnVOList, + dynamic goodsReturnVOList, + dynamic moneyReturnActionHistoryList, + dynamic goodsReturnActionHistoryList, + String currentTime, + dynamic tablePrice, + String tableName, + String balance, + String money, + dynamic prodNum, + bool onCredit, + OrderInfoVo orderInfoVo, + String endPayTime, + String orderSumPrice,}){ + this.id = id; + this.createTime = createTime; + this.createUser = createUser; + this.updateTime = updateTime; + this.updateUser = updateUser; + this.tenantCode = tenantCode; + this.storeId = storeId; + this.storeName = storeName; + this.tableId = tableId; + this.orderType = orderType; + this.clearTable = clearTable; + this.mid = mid; + this.parentId = parentId; + this.parentCode = parentCode; + this.orderCode = orderCode; + this.dayFlowCode = dayFlowCode; + this.orderStatus = orderStatus; + this.sendStatus = sendStatus; + this.payStatus = payStatus; + this.memberAccount = memberAccount; + this.logisticsId = logisticsId; + this.shipperCode = shipperCode; + this.logisticsName = logisticsName; + this.logisticsNum = logisticsNum; + this.logisticsCase = logisticsCase; + this.refundStatus = refundStatus; + this.addressExt = addressExt; + this.postFee = postFee; + this.orderSum = orderSum; + this.paySum = paySum; + this.paySumSub = paySumSub; + this.accountPay = accountPay; + this.couponSubPrice = couponSubPrice; + this.customPrice = customPrice; + this.removeDecimal = removeDecimal; + this.isSubscribe = isSubscribe; + this.subcribeTime = subcribeTime; + this.sendTime = sendTime; + this.confirmTime = confirmTime; + this.returnMoneyTime = returnMoneyTime; + this.notes = notes; + this.prepayId = prepayId; + this.payTime = payTime; + this.payChannel = payChannel; + this.payNum = payNum; + this.promotionId = promotionId; + this.couponId = couponId; + this.isDelete = isDelete; + this.isTakeOut = isTakeOut; + this.batch = batch; + this.orderDiscountPrice = orderDiscountPrice; + this.dishesDiscountPrice = dishesDiscountPrice; + this.orderPercentPrice = orderPercentPrice; + this.finalPayPrice = finalPayPrice; + this.activityNoPrice = activityNoPrice; + this.activityDiscountPrice = activityDiscountPrice; + this.totalDiscountPrice = totalDiscountPrice; + this.orderSource = orderSource; + this.address = address; + this.discountPercent = discountPercent; + this.discountAmount = discountAmount; + this.discountType = discountType; + this.discountMoney = discountMoney; + this.overTime = overTime; + this.orderProductVOList = orderProductVOList; + this.moneyReturnList = moneyReturnList; + this.goodsReturnList = goodsReturnList; + this.moneyReturnVOList = moneyReturnVOList; + this.goodsReturnVOList = goodsReturnVOList; + this.moneyReturnActionHistoryList = moneyReturnActionHistoryList; + this.goodsReturnActionHistoryList = goodsReturnActionHistoryList; + this.currentTime = currentTime; + this.tablePrice = tablePrice; + this.tableName = tableName; + this.balance = balance; + this.money = money; + this.prodNum = prodNum; + this.onCredit = onCredit; + this.orderInfoVo = orderInfoVo; + this.endPayTime = endPayTime; + this.orderSumPrice = orderSumPrice; +} + + MinOrderInfo.fromJson(dynamic json) { + this.id = json['id']; + this.createTime = json['createTime']; + this.createUser = json['createUser']; + this.updateTime = json['updateTime']; + this.updateUser = json['updateUser']; + this.tenantCode = json['tenantCode']; + this.storeId = json['storeId']; + this.storeName = json['storeName']; + this.tableId = json['tableId']; + this.orderType = json['orderType']; + this.clearTable = json['clearTable']; + this.mid = json['mid']; + this.parentId = json['parentId']; + this.parentCode = json['parentCode']; + this.orderCode = json['orderCode']; + this.dayFlowCode = json['dayFlowCode']; + this.orderStatus = json['orderStatus']; + this.sendStatus = json['sendStatus']; + this.payStatus = json['payStatus']; + this.memberAccount = json['memberAccount']; + this.logisticsId = json['logisticsId']; + this.shipperCode = json['shipperCode']; + this.logisticsName = json['logisticsName']; + this.logisticsNum = json['logisticsNum']; + this.logisticsCase = json['logisticsCase']; + this.refundStatus = json['refundStatus']; + this.addressExt = json['addressExt']; + this.postFee = json['postFee']; + this.orderSum = json['orderSum']; + this.paySum = json['paySum']; + this.paySumSub = json['paySumSub']; + this.accountPay = json['accountPay']; + this.couponSubPrice = json['couponSubPrice']; + this.customPrice = json['customPrice']; + this.removeDecimal = json['removeDecimal']; + this.isSubscribe = json['isSubscribe']; + this.subcribeTime = json['subcribeTime']; + this.sendTime = json['sendTime']; + this.confirmTime = json['confirmTime']; + this.returnMoneyTime = json['returnMoneyTime']; + this.notes = json['notes']; + this.prepayId = json['prepayId']; + this.payTime = json['payTime']; + this.payChannel = json['payChannel']; + this.payNum = json['payNum']; + this.promotionId = json['promotionId']; + this.couponId = json['couponId']; + this.isDelete = json['isDelete']; + this.isTakeOut = json['isTakeOut']; + this.batch = json['batch']; + this.orderDiscountPrice = json['orderDiscountPrice']; + this.dishesDiscountPrice = json['dishesDiscountPrice']; + this.orderPercentPrice = json['orderPercentPrice']; + this.finalPayPrice = json['finalPayPrice']; + this.activityNoPrice = json['activityNoPrice']; + this.activityDiscountPrice = json['activityDiscountPrice']; + this.totalDiscountPrice = json['totalDiscountPrice']; + this.orderSource = json['orderSource']; + this.address = json['address']; + this.discountPercent = json['discountPercent']; + this.discountAmount = json['discountAmount']; + this.discountType = json['discountType']; + this.discountMoney = json['discountMoney']; + this.overTime = json['overTime']; + if (json['orderProductVOList'] != null) { + this.orderProductVOList = []; + json['orderProductVOList'].forEach((v) { + this.orderProductVOList.add(OrderProductListBean.fromJson(v)); + }); + } + this.moneyReturnList = json['moneyReturnList']; + this.goodsReturnList = json['goodsReturnList']; + this.moneyReturnVOList = json['moneyReturnVOList']; + this.goodsReturnVOList = json['goodsReturnVOList']; + this.moneyReturnActionHistoryList = json['moneyReturnActionHistoryList']; + this.goodsReturnActionHistoryList = json['goodsReturnActionHistoryList']; + this.currentTime = json['currentTime']; + this.tablePrice = json['tablePrice']; + this.tableName = json['tableName']; + this.balance = json['balance']; + this.money = json['money']; + this.prodNum = json['prodNum']; + this.onCredit = json['onCredit']; + this.orderInfoVo = json['orderInfoVo'] != null ? OrderInfoVo.fromJson(json['orderInfoVo']) : null; + this.endPayTime = json['endPayTime']; + this.orderSumPrice = json['orderSumPrice']; + } + String id; + String createTime; + String createUser; + String updateTime; + String updateUser; + String tenantCode; + String storeId; + String storeName; + String tableId; + int orderType; + bool clearTable; + String mid; + String parentId; + String parentCode; + String orderCode; + String dayFlowCode; + int orderStatus; + int sendStatus; + int payStatus; + String memberAccount; + String logisticsId; + String shipperCode; + String logisticsName; + String logisticsNum; + dynamic logisticsCase; + int refundStatus; + dynamic addressExt; + String postFee; + String orderSum; + String paySum; + String paySumSub; + String accountPay; + String couponSubPrice; + String customPrice; + String removeDecimal; + bool isSubscribe; + dynamic subcribeTime; + dynamic sendTime; + dynamic confirmTime; + dynamic returnMoneyTime; + String notes; + dynamic prepayId; + dynamic payTime; + int payChannel; + dynamic payNum; + String promotionId; + String couponId; + int isDelete; + int isTakeOut; + int batch; + String orderDiscountPrice; + String dishesDiscountPrice; + String orderPercentPrice; + String finalPayPrice; + String activityNoPrice; + String activityDiscountPrice; + String totalDiscountPrice; + int orderSource; + dynamic address; + dynamic discountPercent; + dynamic discountAmount; + dynamic discountType; + dynamic discountMoney; + dynamic overTime; + List orderProductVOList; + dynamic moneyReturnList; + dynamic goodsReturnList; + dynamic moneyReturnVOList; + dynamic goodsReturnVOList; + dynamic moneyReturnActionHistoryList; + dynamic goodsReturnActionHistoryList; + String currentTime; + dynamic tablePrice; + String tableName; + String balance; + String money; + dynamic prodNum; + bool onCredit; + OrderInfoVo orderInfoVo; + String endPayTime; + String orderSumPrice; + + Map toJson() { + final map = {}; + map['id'] = this.id; + map['createTime'] = this.createTime; + map['createUser'] = this.createUser; + map['updateTime'] = this.updateTime; + map['updateUser'] = this.updateUser; + map['tenantCode'] = this.tenantCode; + map['storeId'] = this.storeId; + map['storeName'] = this.storeName; + map['tableId'] = this.tableId; + map['orderType'] = this.orderType; + map['clearTable'] = this.clearTable; + map['mid'] = this.mid; + map['parentId'] = this.parentId; + map['parentCode'] = this.parentCode; + map['orderCode'] = this.orderCode; + map['dayFlowCode'] = this.dayFlowCode; + map['orderStatus'] = this.orderStatus; + map['sendStatus'] = this.sendStatus; + map['payStatus'] = this.payStatus; + map['memberAccount'] = this.memberAccount; + map['logisticsId'] = this.logisticsId; + map['shipperCode'] = this.shipperCode; + map['logisticsName'] = this.logisticsName; + map['logisticsNum'] = this.logisticsNum; + map['logisticsCase'] = this.logisticsCase; + map['refundStatus'] = this.refundStatus; + map['addressExt'] = this.addressExt; + map['postFee'] = this.postFee; + map['orderSum'] = this.orderSum; + map['paySum'] = this.paySum; + map['paySumSub'] = this.paySumSub; + map['accountPay'] = this.accountPay; + map['couponSubPrice'] = this.couponSubPrice; + map['customPrice'] = this.customPrice; + map['removeDecimal'] = this.removeDecimal; + map['isSubscribe'] = this.isSubscribe; + map['subcribeTime'] = this.subcribeTime; + map['sendTime'] = this.sendTime; + map['confirmTime'] = this.confirmTime; + map['returnMoneyTime'] = this.returnMoneyTime; + map['notes'] = this.notes; + map['prepayId'] = this.prepayId; + map['payTime'] = this.payTime; + map['payChannel'] = this.payChannel; + map['payNum'] = this.payNum; + map['promotionId'] = this.promotionId; + map['couponId'] = this.couponId; + map['isDelete'] = this.isDelete; + map['isTakeOut'] = this.isTakeOut; + map['batch'] = this.batch; + map['orderDiscountPrice'] = this.orderDiscountPrice; + map['dishesDiscountPrice'] = this.dishesDiscountPrice; + map['orderPercentPrice'] = this.orderPercentPrice; + map['finalPayPrice'] = this.finalPayPrice; + map['activityNoPrice'] = this.activityNoPrice; + map['activityDiscountPrice'] = this.activityDiscountPrice; + map['totalDiscountPrice'] = this.totalDiscountPrice; + map['orderSource'] = this.orderSource; + map['address'] = this.address; + map['discountPercent'] = this.discountPercent; + map['discountAmount'] = this.discountAmount; + map['discountType'] = this.discountType; + map['discountMoney'] = this.discountMoney; + map['overTime'] = this.overTime; + if (this.orderProductVOList != null) { + map['orderProductVOList'] = this.orderProductVOList.map((v) => v.toJson()).toList(); + } + map['moneyReturnList'] = this.moneyReturnList; + map['goodsReturnList'] = this.goodsReturnList; + map['moneyReturnVOList'] = this.moneyReturnVOList; + map['goodsReturnVOList'] = this.goodsReturnVOList; + map['moneyReturnActionHistoryList'] = this.moneyReturnActionHistoryList; + map['goodsReturnActionHistoryList'] = this.goodsReturnActionHistoryList; + map['currentTime'] = this.currentTime; + map['tablePrice'] = this.tablePrice; + map['tableName'] = this.tableName; + map['balance'] = this.balance; + map['money'] = this.money; + map['prodNum'] = this.prodNum; + map['onCredit'] = this.onCredit; + if (this.orderInfoVo != null) { + map['orderInfoVo'] = this.orderInfoVo.toJson(); + } + map['endPayTime'] = this.endPayTime; + map['orderSumPrice'] = this.orderSumPrice; + return map; + } + +} + +/// orderNum : 0 +/// productNum : 0 +/// mins : 1 +/// memberVO : {"vipNo":"1406879717390286848","nickname":"","headimg":"","userType":true,"sex":"0","level":1,"addressId":null,"remark":null,"phone":"15827991714","createTime":"2021-07-10 15:44:23","birth":"1993-02-19","balance":"0.00","money":"9999608.09","points":"1147","isBind":true,"memberRankVo":{"id":"1402947503522840576","rankName":"黄金会员","rankOrigin":8888,"rankContent":"","rankImg":"","status":true,"nextId":"1402947503522840577","nextName":"钻石会员","nextOrigin":null},"age":28} +/// postAge : "0.00" +/// price : "208.00" +/// orderSum : "208.00" +/// discountAmount : null +/// promotionInfoList : null +/// couponList : null +/// threshold : "0" +/// freePostAge : "0" +/// orderProductList : null + +class OrderInfoVo { + OrderInfoVo({ + int orderNum, + int productNum, + int mins, + MemberVO memberVO, + String postAge, + String price, + String orderSum, + dynamic discountAmount, + dynamic promotionInfoList, + dynamic couponList, + String threshold, + String freePostAge, + dynamic orderProductList,}){ + this.orderNum = orderNum; + this.productNum = productNum; + this.mins = mins; + this.memberVO = memberVO; + this.postAge = postAge; + this.price = price; + this.orderSum = orderSum; + this.discountAmount = discountAmount; + this.promotionInfoList = promotionInfoList; + this.couponList = couponList; + this.threshold = threshold; + this.freePostAge = freePostAge; + this.orderProductList = orderProductList; +} + + OrderInfoVo.fromJson(dynamic json) { + this.orderNum = json['orderNum']; + this.productNum = json['productNum']; + this.mins = json['mins']; + this.memberVO = json['memberVO'] != null ? MemberVO.fromJson(json['memberVO']) : null; + this.postAge = json['postAge']; + this.price = json['price']; + this.orderSum = json['orderSum']; + this.discountAmount = json['discountAmount']; + this.promotionInfoList = json['promotionInfoList']; + this.couponList = json['couponList']; + this.threshold = json['threshold']; + this.freePostAge = json['freePostAge']; + this.orderProductList = json['orderProductList']; + } + int orderNum; + int productNum; + int mins; + MemberVO memberVO; + String postAge; + String price; + String orderSum; + dynamic discountAmount; + dynamic promotionInfoList; + dynamic couponList; + String threshold; + String freePostAge; + dynamic orderProductList; + + Map toJson() { + final map = {}; + map['orderNum'] = this.orderNum; + map['productNum'] = this.productNum; + map['mins'] = this.mins; + if (this.memberVO != null) { + map['memberVO'] = this.memberVO.toJson(); + } + map['postAge'] = this.postAge; + map['price'] = this.price; + map['orderSum'] = this.orderSum; + map['discountAmount'] = this.discountAmount; + map['promotionInfoList'] = this.promotionInfoList; + map['couponList'] = this.couponList; + map['threshold'] = this.threshold; + map['freePostAge'] = this.freePostAge; + map['orderProductList'] = this.orderProductList; + return map; + } + +} + +/// vipNo : "1406879717390286848" +/// nickname : "" +/// headimg : "" +/// userType : true +/// sex : "0" +/// level : 1 +/// addressId : null +/// remark : null +/// phone : "15827991714" +/// createTime : "2021-07-10 15:44:23" +/// birth : "1993-02-19" +/// balance : "0.00" +/// money : "9999608.09" +/// points : "1147" +/// isBind : true +/// memberRankVo : {"id":"1402947503522840576","rankName":"黄金会员","rankOrigin":8888,"rankContent":"","rankImg":"","status":true,"nextId":"1402947503522840577","nextName":"钻石会员","nextOrigin":null} +/// age : 28 + +class MemberVO { + MemberVO({ + String vipNo, + String nickname, + String headimg, + bool userType, + String sex, + int level, + dynamic addressId, + dynamic remark, + String phone, + String createTime, + String birth, + String balance, + String money, + String points, + bool isBind, + MemberRankVo memberRankVo, + int age,}){ + this.vipNo = vipNo; + this.nickname = nickname; + this.headimg = headimg; + this.userType = userType; + this.sex = sex; + this.level = level; + this.addressId = addressId; + this.remark = remark; + this.phone = phone; + this.createTime = createTime; + this.birth = birth; + this.balance = balance; + this.money = money; + this.points = points; + this.isBind = isBind; + this.memberRankVo = memberRankVo; + this.age = age; +} + + MemberVO.fromJson(dynamic json) { + this.vipNo = json['vipNo']; + this.nickname = json['nickname']; + this.headimg = json['headimg']; + this.userType = json['userType']; + this.sex = json['sex']; + this.level = json['level']; + this.addressId = json['addressId']; + this.remark = json['remark']; + this.phone = json['phone']; + this.createTime = json['createTime']; + this.birth = json['birth']; + this.balance = json['balance']; + this.money = json['money']; + this.points = json['points']; + this.isBind = json['isBind']; + this.memberRankVo = json['memberRankVo'] != null ? MemberRankVo.fromJson(json['memberRankVo']) : null; + this.age = json['age']; + } + String vipNo; + String nickname; + String headimg; + bool userType; + String sex; + int level; + dynamic addressId; + dynamic remark; + String phone; + String createTime; + String birth; + String balance; + String money; + String points; + bool isBind; + MemberRankVo memberRankVo; + int age; + + Map toJson() { + final map = {}; + map['vipNo'] = this.vipNo; + map['nickname'] = this.nickname; + map['headimg'] = this.headimg; + map['userType'] = this.userType; + map['sex'] = this.sex; + map['level'] = this.level; + map['addressId'] = this.addressId; + map['remark'] = this.remark; + map['phone'] = this.phone; + map['createTime'] = this.createTime; + map['birth'] = this.birth; + map['balance'] = this.balance; + map['money'] = this.money; + map['points'] = this.points; + map['isBind'] = this.isBind; + if (this.memberRankVo != null) { + map['memberRankVo'] = this.memberRankVo.toJson(); + } + map['age'] = this.age; + return map; + } + +} + +/// id : "1402947503522840576" +/// rankName : "黄金会员" +/// rankOrigin : 8888 +/// rankContent : "" +/// rankImg : "" +/// status : true +/// nextId : "1402947503522840577" +/// nextName : "钻石会员" +/// nextOrigin : null + +class MemberRankVo { + MemberRankVo({ + String id, + String rankName, + int rankOrigin, + String rankContent, + String rankImg, + bool status, + String nextId, + String nextName, + dynamic nextOrigin,}){ + this.id = id; + this.rankName = rankName; + this.rankOrigin = rankOrigin; + this.rankContent = rankContent; + this.rankImg = rankImg; + this.status = status; + this.nextId = nextId; + this.nextName = nextName; + this.nextOrigin = nextOrigin; +} + + MemberRankVo.fromJson(dynamic json) { + this.id = json['id']; + this.rankName = json['rankName']; + this.rankOrigin = json['rankOrigin']; + this.rankContent = json['rankContent']; + this.rankImg = json['rankImg']; + this.status = json['status']; + this.nextId = json['nextId']; + this.nextName = json['nextName']; + this.nextOrigin = json['nextOrigin']; + } + String id; + String rankName; + int rankOrigin; + String rankContent; + String rankImg; + bool status; + String nextId; + String nextName; + dynamic nextOrigin; + + Map toJson() { + final map = {}; + map['id'] = this.id; + map['rankName'] = this.rankName; + map['rankOrigin'] = this.rankOrigin; + map['rankContent'] = this.rankContent; + map['rankImg'] = this.rankImg; + map['status'] = this.status; + map['nextId'] = this.nextId; + map['nextName'] = this.nextName; + map['nextOrigin'] = this.nextOrigin; + return map; + } + +} diff --git a/lib/retrofit/data/page.g.dart b/lib/retrofit/data/page.g.dart deleted file mode 100644 index e40a14ae..00000000 --- a/lib/retrofit/data/page.g.dart +++ /dev/null @@ -1,41 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'page.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -PageInfo _$PageInfoFromJson( - Map json, - D Function(Object json) fromJsonD, -) { - return PageInfo() - ..pageNum = json['pageNum'] as int - ..current = json['current'] - ..pageSize = json['pageSize'] as int - ..size = json['size'] - ..pages = json['pages'] - ..hasPreviousPage = json['hasPreviousPage'] as bool - ..hasNextPage = json['hasNextPage'] as bool - ..total = json['total'] as String - ..list = (json['list'] as List)?.map(fromJsonD)?.toList() - ..records = (json['records'] as List)?.map(fromJsonD)?.toList(); -} - -Map _$PageInfoToJson( - PageInfo instance, - Object Function(D value) toJsonD, -) => - { - 'pageNum': instance.pageNum, - 'current': instance.current, - 'pageSize': instance.pageSize, - 'size': instance.size, - 'pages': instance.pages, - 'hasPreviousPage': instance.hasPreviousPage, - 'hasNextPage': instance.hasNextPage, - 'total': instance.total, - 'list': instance.list?.map(toJsonD)?.toList(), - 'records': instance.records?.map(toJsonD)?.toList(), - }; diff --git a/lib/retrofit/data/placeOrderFirst.dart b/lib/retrofit/data/placeOrderFirst.dart index da05b643..8ae1e446 100644 --- a/lib/retrofit/data/placeOrderFirst.dart +++ b/lib/retrofit/data/placeOrderFirst.dart @@ -1,5 +1,6 @@ import 'package:huixiang/retrofit/data/down_order.dart'; import 'package:huixiang/retrofit/data/order_product_vo.dart'; +import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; import 'package:huixiang/retrofit/data/shoppingCart.dart'; class PlaceOrderFirst { @@ -20,7 +21,7 @@ class PlaceOrderFirst { PromotionInfoDTOBean promotionInfoDTO; String recMobile; List orderProductVOList; - List shoppingCartSkuItemList; + List shoppingCartSkuItemList; List skuItemDTOList; num source; String storeId; @@ -75,7 +76,7 @@ class PlaceOrderFirst { placeOrderFirst.recMobile = json['recMobile']; placeOrderFirst.shoppingCartSkuItemList = []..addAll( (json['shoppingCartSkuItemList'] as List ?? []) - .map((o) => ShoppingCartSkuItemListBean.fromJson(o))); + .map((o) => OrderProductListBean.fromJson(o))); placeOrderFirst.orderProductVOList = []..addAll( (json['orderProductVOList'] as List ?? []) .map((o) => OrderProductVOList.fromJson(o))); diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 015efc27..1cb07f09 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -10,6 +10,7 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/address.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/down_order.dart'; +import 'package:huixiang/retrofit/data/min_order_info.dart'; import 'package:huixiang/retrofit/data/placeOrderFirst.dart'; import 'package:huixiang/retrofit/data/settlement_bean.dart'; import 'package:huixiang/retrofit/data/wx_pay.dart'; @@ -166,6 +167,10 @@ abstract class MinApiService { @POST("order/getOrderInfo") Future> getOrderInfo(@Body() Map param); + ///查看订单详情 + @POST("order/getOrderDetail") + Future> getOrderDetails(@Body() Map param); + ///查询用户所有收货地址 @GET("address/queryMemberAddress") Future>> queryAddress(); @@ -174,6 +179,10 @@ abstract class MinApiService { @POST("order/placeOrderFirst") Future> placeOrderFirst(@Body() Map param); + ///小程序下单加菜 + @POST("order/addOrder") + Future> addOrder(@Body() Map param); + /// 结算 @POST("order/settlement") Future> settlementWx(@Body() Map param); diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart deleted file mode 100644 index b98fa96b..00000000 --- a/lib/retrofit/min_api.g.dart +++ /dev/null @@ -1,338 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'min_api.dart'; - -// ************************************************************************** -// RetrofitGenerator -// ************************************************************************** - -class _MinApiService implements MinApiService { - _MinApiService(this._dio, {this.baseUrl}) { - ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8765/app/'; - } - - final Dio _dio; - - String baseUrl; - - @override - Future>> findMiNiGroupList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'product/findMiNiGroupList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => FindMiNiGroupList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> miNiDetail(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/product/queryMiNiProductDetail?id=$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => MiNiDetail.fromJson(json), - ); - return value; - } - - @override - Future>> addShoppingCart(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('shoppingcart', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => ShoppingCart.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> getShoppingCart(tableId) async { - ArgumentError.checkNotNull(tableId, 'tableId'); - const _extra = {}; - final queryParameters = {r'tableId': tableId}; - final _data = {}; - final _result = await _dio.request>('shoppingcart', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => ShoppingCart.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> clearShoppingCart() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'shoppingcart/delCart', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as bool, - ); - return value; - } - - @override - Future>> shoppingCart1(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('shoppingcart', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => ShoppingCart.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> shoppingCartSingle(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'shoppingcart/single', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => ShoppingCart.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> getOrderInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'order/getOrderInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => SettleOrderInfo.fromJson(json), - ); - return value; - } - - @override - Future>> queryAddress() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'address/queryMemberAddress', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map
((i) => Address.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> placeOrderFirst(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'order/placeOrderFirst', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => DownOrder.fromJson(json), - ); - return value; - } - - @override - Future> settlementWx(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('order/settlement', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => WxPay.fromJson(json), - ); - return value; - } - - @override - Future> settlementApi(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('order/settlement', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> queryStoreInfo1(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/store/getStore', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> getParentInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/getParentInfo/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } -} diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart deleted file mode 100644 index 4eb8a7c9..00000000 --- a/lib/retrofit/retrofit_api.g.dart +++ /dev/null @@ -1,1349 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'retrofit_api.dart'; - -// ************************************************************************** -// RetrofitGenerator -// ************************************************************************** - -class _ApiService implements ApiService { - _ApiService(this._dio, {this.baseUrl}) { - ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8766/app/'; - } - - final Dio _dio; - - String baseUrl; - - @override - Future> upload(data, folderId) async { - ArgumentError.checkNotNull(data, 'data'); - ArgumentError.checkNotNull(folderId, 'folderId'); - const _extra = {}; - final queryParameters = {}; - final _data = FormData(); - _data.files.add(MapEntry( - 'file', - MultipartFile.fromFileSync(data.path, - filename: data.path.split(Platform.pathSeparator).last))); - if (folderId != null) { - _data.fields.add(MapEntry('folderId', folderId.toString())); - } - final _result = await _dio.request>('/file/upload', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => UploadResult.fromJson(json), - ); - return value; - } - - @override - Future searchPoi(lat, lng, keywords, size, page) async { - ArgumentError.checkNotNull(lat, 'lat'); - ArgumentError.checkNotNull(lng, 'lng'); - ArgumentError.checkNotNull(keywords, 'keywords'); - ArgumentError.checkNotNull(size, 'size'); - ArgumentError.checkNotNull(page, 'page'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request( - 'https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=$lat,$lng&keywords=$keywords&offset={size}&page={page}&extensions=all', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = _result.data; - return value; - } - - @override - Future> memberLogin(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/auth/platform/memberLogin', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> sendVerify(mobile) async { - ArgumentError.checkNotNull(mobile, 'mobile'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/sendVerify/$mobile', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> creditGoods(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditGoods/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Goods.fromJson(json), - ), - ); - return value; - } - - @override - Future>> goodsCategory(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditGoodsCategory/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => GoodsCategory.fromJson(json), - ), - ); - return value; - } - - @override - Future> creditGoodsById(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/creditGoods/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Goods.fromJson(json), - ); - return value; - } - - @override - Future> queryInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/info', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => UserInfo.fromJson(json), - ); - return value; - } - - @override - Future> editInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/editMemberInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> signInInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/signInInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => SignInfo.fromJson(json), - ); - return value; - } - - @override - Future> signIn() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/signIn', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> recharge(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/wallet/recharge', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => WxPay.fromJson(json), - ); - return value; - } - - @override - Future> receiveCoupon(couponId) async { - ArgumentError.checkNotNull(couponId, 'couponId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/coupon/receive?couponId=$couponId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> creditOrderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditOrder/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => ExchangeOrder.fromJson(json), - ), - ); - return value; - } - - @override - Future> creditOrder(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditOrder/create', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> addAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/add', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> deleteAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/delete', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> queryAddress(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/address/detail/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryMemberAddress() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/address/queryMemberAddress', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map
((i) => Address.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> updateAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/update', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryCoupon(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/coupon/centreList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Coupon.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryCard(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/coupon/packageList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Coupon.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryStore(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/store/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => Store.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> informationList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Activity.fromJson(json), - ), - ); - return value; - } - - @override - Future> informationInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/information/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData
.fromJson( - _result.data, - (json) => Article.fromJson(json), - ); - return value; - } - - @override - Future> activityInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/information/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Activity.fromJson(json), - ); - return value; - } - - @override - Future> creditOrderReceive(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/receive/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> queryHome() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/home', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => BrandData.fromJson(json), - ); - return value; - } - - @override - Future> queryStoreInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/store/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryArticle(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo
.fromJson( - json, - (json) => Article.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryBanner(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/banner/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => BannerData.fromJson(json), - ), - ); - return value; - } - - @override - Future> queryHomeBrand() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/brand', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> minLogin(storeId) async { - ArgumentError.checkNotNull(storeId, 'storeId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/mini/login/$storeId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryBillInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/listBill', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => UserBill.fromJson(json), - ), - ); - return value; - } - - @override - Future>> rankList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/rankList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => Rank.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> orderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/order/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => OrderInfo.fromJson(json), - ), - ); - return value; - } - - @override - Future> orderDetail(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/orderDetail?id=$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => OrderInfo.fromJson(json), - ); - return value; - } - - @override - Future> continuePay(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/order/continuePay', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> receiveToCard(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/receive/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> vipList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/vipList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => VipCard.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> vipDetail(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/vipDetail', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => VipCard.fromJson(json), - ); - return value; - } - - @override - Future>> msgList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/app-msg/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Message.fromJson(json), - ), - ); - return value; - } - - @override - Future> queryMsg(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/app-msg/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> informationLikes(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/information/likes/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> memberComment(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/memberComment', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> memberCommentList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/memberComment/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => MemberCommentList.fromJson(json), - ), - ); - return value; - } - - @override - Future> commentLike(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/memberComment/likes/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> delComment(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/memberComment/delete/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> shippingTrace(shipperCode, logisticCode) async { - ArgumentError.checkNotNull(shipperCode, 'shipperCode'); - ArgumentError.checkNotNull(logisticCode, 'logisticCode'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/getShippingTrace/$shipperCode/$logisticCode', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Logistics.fromJson(json), - ); - return value; - } - - @override - Future> report(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>('/other/report', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as bool, - ); - return value; - } - - @override - Future> orderCancel(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/cancel/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as bool, - ); - return value; - } - - @override - Future> settlement(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/order/settlement', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as String, - ); - return value; - } - - @override - Future> trend(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/information/trend', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as bool, - ); - return value; - } - - @override - Future>> trendList(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/information/trend-list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => ComunityComment.fromJson(json), - ), - ); - return value; - } - - @override - Future>> followList(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/member/follow/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => ListData.fromJson(json), - ), - ); - return value; - } - - - @override - Future> follow(followId) async { - ArgumentError.checkNotNull(followId, 'followId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/follow/$followId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> deleteTrend(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/information/trend/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'DELETE', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> socialInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/socialInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => SocialInfo.fromJson(json), - ); - return value; - } -} diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index fb460c2e..6141d9b5 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -9,6 +9,7 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/address.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/down_order.dart'; +import 'package:huixiang/retrofit/data/min_order_info.dart'; import 'package:huixiang/retrofit/data/placeOrderFirst.dart'; import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; import 'package:huixiang/retrofit/data/settlement_bean.dart'; @@ -45,23 +46,35 @@ class _Settlement extends State { MinApiService minService; Function(int type) callback; StoreInfo storeInfo; - ShoppingCart shopCarGoods; + + // ShoppingCart shopCarGoods; SettleOrderInfo settleOrderInfo; + MinOrderInfo minOrderInfo; int selectedBtn = 0; String remakers = ""; + String parentCode = ""; + String parentId = ""; int payChannel = 4; - String tableId = "0"; + int tableId = 0; Address address; CouponListBean couponListBean; PromotionInfoListBean promotion; String mobile; + bool placeOrder = false; + @override void initState() { super.initState(); + tableId = widget.arguments["tableId"] ?? 0; + parentCode = widget.arguments["parentCode"] ?? ""; + parentId = widget.arguments["parentId"] ?? ""; storeInfo = widget.arguments["storeInfo"]; - shopCarGoods = widget.arguments["shoppingCart"]; + + if (tableId == 0) { + placeOrder = true; + } SharedPreferences.getInstance().then((value) { String minToken = value.getString("minToken"); @@ -80,7 +93,12 @@ class _Settlement extends State { ///订单结算信息 queryOrderInfo( - addressId, isTake, memberCouponId, orderId, promotionId) async { + addressId, + isTake, + memberCouponId, + orderId, + promotionId, + ) async { BaseData baseData = await minService.getOrderInfo({ "addressId": addressId, "isTake": isTake, @@ -95,6 +113,18 @@ class _Settlement extends State { } } + ///查看订单详情 + queryOrderDetails(id) async { + BaseData baseData = await minService.getOrderDetails({ + "id": id, + }).catchError((error) {}); + if (baseData != null && baseData.isSuccess) { + setState(() { + minOrderInfo = baseData.data; + }); + } + } + queryAddress(int selectedBtn) async { this.selectedBtn = selectedBtn; if (address != null) { @@ -141,18 +171,21 @@ class _Settlement extends State { } } + PlaceOrderFirst placeOrderFirst; + DownOrder downOrder; + ///小程序下单 queryPlaceOrderFirst() async { - for (int i = 0; i < shopCarGoods.shoppingCartSkuItemList.length; i++) { + for (int i = 0; i < settleOrderInfo.orderProductList.length; i++) { settleOrderInfo.orderProductList.forEach((element1) { - if (shopCarGoods.shoppingCartSkuItemList[i].productId == + if (settleOrderInfo.orderProductList[i].productId == element1.productId) { - shopCarGoods.shoppingCartSkuItemList[i].skuId = element1.skuId; + settleOrderInfo.orderProductList[i].skuId = element1.skuId; } }); } - PlaceOrderFirst placeOrderFirst = PlaceOrderFirst(); + placeOrderFirst = PlaceOrderFirst(); placeOrderFirst.cartNum = settleOrderInfo.orderNum; placeOrderFirst.cartSum = settleOrderInfo.price; placeOrderFirst.addressId = address == null ? null : address.id; @@ -163,8 +196,8 @@ class _Settlement extends State { placeOrderFirst.orderSource = 2; placeOrderFirst.orderType = "0"; placeOrderFirst.orderTypeId = 0; - placeOrderFirst.parentCode = ""; // 火锅加菜 - placeOrderFirst.parentId = "0"; // 火锅加菜 + placeOrderFirst.parentCode = parentCode; // 火锅加菜 + placeOrderFirst.parentId = parentId; // 火锅加菜 placeOrderFirst.payChannel = payChannel; placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); placeOrderFirst.promotionInfoDTO.promotionId = @@ -173,26 +206,66 @@ class _Settlement extends State { couponListBean != null ? couponListBean.id : ""; placeOrderFirst.recMobile = (mobile == null || mobile == "") ? mobile : storeInfo.headMobile; - placeOrderFirst.shoppingCartSkuItemList = - shopCarGoods.shoppingCartSkuItemList; + placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; placeOrderFirst.skuItemDTOList = []; placeOrderFirst.source = 1; placeOrderFirst.storeId = storeInfo.id; placeOrderFirst.subcribeTime = null; - placeOrderFirst.tableId = tableId; - BaseData baseData = await minService - .placeOrderFirst(placeOrderFirst.toJson()) - .catchError((error) { - print("error: $error"); - }); - if (baseData != null && baseData.isSuccess) { - querySettlement(placeOrderFirst, baseData.data); + placeOrderFirst.tableId = "$tableId"; + + if (tableId == 0) {///正常的商店下单 + BaseData baseData = await minService + .placeOrderFirst(placeOrderFirst.toJson()) + .catchError((error) { + print("error: $error"); + }); + if (baseData != null && baseData.isSuccess) { + placeOrder = true; + this.downOrder = baseData.data; + querySettlement(); + } + } else { ///火锅店下单, 等待结算 + BaseData baseData; + if (parentId == "") { + baseData = await minService + .placeOrderFirst(placeOrderFirst.toJson()) + .catchError((error) { + print("error: $error"); + }); + } else { + baseData = await minService + .addOrder(placeOrderFirst.toJson()) + .catchError((error) { + print("error: $error"); + }); + } + if (baseData != null && baseData.isSuccess) { + placeOrder = true; + this.downOrder = baseData.data; + queryOrderDetails(parentId); + setState(() {}); + } } } +//Undefined symbols for architecture armv7: +// "_OBJC_CLASS_$_HmsBitMap", referenced from: +// objc-class-ref in libflutter_scankit.a(FLScanKitView.o) +// objc-class-ref in libflutter_scankit.a(FlutterScankitPlugin.o) +// "_OBJC_CLASS_$_HmsDefaultScanViewController", referenced from: +// objc-class-ref in libflutter_scankit.a(FlutterScankitPlugin.o) +// "_OBJC_CLASS_$_HmsCustomScanViewController", referenced from: +// objc-class-ref in libflutter_scankit.a(FLScanKitView.o) +// "_OBJC_CLASS_$_HmsScanOptions", referenced from: +// objc-class-ref in libflutter_scankit.a(FLScanKitView.o) +// objc-class-ref in libflutter_scankit.a(FlutterScankitPlugin.o) +// ld: symbol(s) not found for architecture armv7 +// clang: error: linker command failed with exit code 1 (use -v to see invocation) + + ///结算 - querySettlement(PlaceOrderFirst placeOrderFirst, DownOrder downOrder) async { - placeOrderFirst.id = downOrder.id; + querySettlement() async { + placeOrderFirst.id = parentId != "" ? parentId : downOrder.id; placeOrderFirst.orderProductVOList = downOrder.orderProductVOList; if (placeOrderFirst.payChannel == 1) { if (!(await Min.isInitialize())) { @@ -236,9 +309,12 @@ class _Settlement extends State { } toOrderDetails(String orderId) { - Navigator.of(context).popAndPushNamed('/router/order_details', arguments: { - "id": orderId, - }); + Navigator.of(context).popAndPushNamed( + '/router/order_details', + arguments: { + "id": orderId, + }, + ); } @override @@ -297,6 +373,7 @@ class _Settlement extends State { SettlementOrderCommodity( selectedBtn, settleOrderInfo, + minOrderInfo, ), ///优惠券/备注 @@ -333,7 +410,9 @@ class _Settlement extends State { ), ), Text( - "¥${settleOrderInfo == null ? "" : settleOrderInfo.price}", + minOrderInfo != null ? + "¥${minOrderInfo.orderSumPrice}" : + "¥${settleOrderInfo == null ? "0" : settleOrderInfo.price}", style: TextStyle( fontSize: 20.sp, fontWeight: MyFontWeight.semi_bold, @@ -346,7 +425,7 @@ class _Settlement extends State { RoundButton( width: 103.w, height: 54.h, - text: S.current.jiesuan, + text: placeOrder ? S.current.jiesuan : "下单", textColor: Colors.white, fontWeight: MyFontWeight.regular, backgroup: Color(0xFF32A060), diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index f4c18d19..8e351e4a 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; +import 'package:huixiang/retrofit/data/min_order_info.dart'; import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -11,13 +11,16 @@ class SettlementOrderCommodity extends StatefulWidget { final int isTakeOut; final SettleOrderInfo settleOrderInfo; + final MinOrderInfo minOrderInfo; - SettlementOrderCommodity(this.isTakeOut, this.settleOrderInfo); + SettlementOrderCommodity( + this.isTakeOut, this.settleOrderInfo, this.minOrderInfo); @override State createState() { return _SettlementOrderCommodity(); } + } class _SettlementOrderCommodity extends State { @@ -67,7 +70,12 @@ class _SettlementOrderCommodity extends State { List commodityList() { if (widget.settleOrderInfo == null) return []; List widgets = []; - if (widget.settleOrderInfo != null) { + + if (widget.minOrderInfo != null) { + widgets.addAll(widget.minOrderInfo.orderProductVOList + .map((e) => commodityItem(e)) + .toList()); + } else if (widget.settleOrderInfo != null) { widgets.addAll(widget.settleOrderInfo.orderProductList .map((e) => commodityItem(e)) .toList()); @@ -76,13 +84,18 @@ class _SettlementOrderCommodity extends State { if (widget.isTakeOut != 0) { // 配送费 - widgets.add(discountItem( + widgets.add( + discountItem( Color(0xFFFF7A1A), widget.isTakeOut == 1 ? S.of(context).peisongfei : S.of(context).yunfei, "", - "+${widget.settleOrderInfo?.postAge ?? "0"}")); + (widget.minOrderInfo != null) + ? "+${widget.minOrderInfo?.postFee ?? "0"}" + : "+${widget.settleOrderInfo?.postAge ?? "0"}", + ), + ); } widgets.add(Container( @@ -310,9 +323,13 @@ class _SettlementOrderCommodity extends State { children: [ Expanded( child: Text( - S.of(context).gongjijianshangpin((widget.settleOrderInfo != null) - ? widget.settleOrderInfo.orderProductList.length - : "0"), + S.of(context).gongjijianshangpin((widget.minOrderInfo != null) + ? ((widget.minOrderInfo != null) + ? widget.minOrderInfo.orderProductVOList.length + : "0") + : (widget.settleOrderInfo != null) + ? widget.settleOrderInfo.orderProductList.length + : "0"), style: TextStyle( fontSize: 10.sp, color: Color(0xFFA29E9E), @@ -323,7 +340,7 @@ class _SettlementOrderCommodity extends State { ), Container( child: Text( - "已优惠:¥${widget.settleOrderInfo.discountAmount}", + "已优惠:¥${(widget.minOrderInfo != null) ? (widget.minOrderInfo.discountAmount ?? "0") : (widget.settleOrderInfo.discountAmount ?? "0")}", style: TextStyle( fontSize: 12.sp, color: Color(0xFF7B7B7B), @@ -362,6 +379,10 @@ class _SettlementOrderCommodity extends State { } String totalPrice() { + if (widget.minOrderInfo != null && + widget.minOrderInfo.orderProductVOList != null) { + return "${widget.minOrderInfo.orderSumPrice}"; + } if (widget.settleOrderInfo.orderProductList == null) return ""; return "${widget.settleOrderInfo.price}"; } diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 24ec32c6..b32bfe60 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -489,7 +489,7 @@ class _StoreOrderPage extends State toDownOrder() async { int num = count(); - if (num == 0) { + if (tableId > 0 && num == 0) { SmartDialog.showToast("请先选择您要购买的商品!~"); return; } diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index 7762ab6e..8f26aeaa 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -302,55 +302,55 @@ class _UnionPage extends State } toScan(Store store) async { - Navigator.of(context).pushNamed( - '/router/store_order', - arguments: { - "id": store.id, - "tenant": store.tenantCode, - "storeName": store.storeName, - "tableId": 1315903669597634560, - }, - ); + // Navigator.of(context).pushNamed( + // '/router/store_order', + // arguments: { + // "id": store.id, + // "tenant": store.tenantCode, + // "storeName": store.storeName, + // "tableId": 1315903669597634560, + // }, + // ); - // if (await Permission.camera.isPermanentlyDenied) { - // showCupertinoDialog( - // context: context, - // builder: (context) { - // return RequestPermission( - // "assets/image/icon_camera_permission_tips.png", - // S.of(context).ninxiangjiquanxianweikaiqi, - // S.of(context).weilekaipaizhaoxuanzhetouxiang, - // S.of(context).kaiqiquanxian, - // (result) async { - // if (result) { - // await openAppSettings(); - // } - // }, - // heightRatioWithWidth: 0.82, - // ); - // }); - // } else if (await Permission.camera.isGranted) { - // var result = await Navigator.of(context).pushNamed('/router/qr_scan'); - // - // if (result != null && result != "") { - // Uri uri = Uri.parse(result); - // String table = uri.queryParameters["tableId"]; - // if (table != null && table != "") { - // int tableId = int.tryParse(table); - // Navigator.of(context).pushNamed( - // '/router/store_order', - // arguments: { - // "id": store.id, - // "tenant": store.tenantCode, - // "storeName": store.storeName, - // "tableId": tableId, - // }, - // ); - // } - // } - // } else { - // await Permission.camera.request(); - // } + if (await Permission.camera.isPermanentlyDenied) { + showCupertinoDialog( + context: context, + builder: (context) { + return RequestPermission( + "assets/image/icon_camera_permission_tips.png", + S.of(context).ninxiangjiquanxianweikaiqi, + S.of(context).weilekaipaizhaoxuanzhetouxiang, + S.of(context).kaiqiquanxian, + (result) async { + if (result) { + await openAppSettings(); + } + }, + heightRatioWithWidth: 0.82, + ); + }); + } else if (await Permission.camera.isGranted) { + var result = await Navigator.of(context).pushNamed('/router/qr_scan'); + + if (result != null && result != "") { + Uri uri = Uri.parse(result); + String table = uri.queryParameters["tableId"]; + if (table != null && table != "") { + int tableId = int.tryParse(table); + Navigator.of(context).pushNamed( + '/router/store_order', + arguments: { + "id": store.id, + "tenant": store.tenantCode, + "storeName": store.storeName, + "tableId": tableId, + }, + ); + } + } + } else { + await Permission.camera.request(); + } } Widget buildSearchItem() { diff --git a/pubspec.yaml b/pubspec.yaml index e657ae81..f6edf240 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,11 +21,9 @@ dependencies: git: url: git://github.com/TencentCloud/TPNS-Flutter-Plugin ref: V1.1.2 - # tpns_flutter_plugin: ^1.1.0 like_button: ^2.0.2 cupertino_icons: ^1.0.2 - # flutter_swiper_null_safety: ^1.0.2 flutter_swiper: ^1.1.6 flutter_staggered_grid_view: ^0.4.0 # Null safety pull_to_refresh: ^2.0.0 # Null safety @@ -54,24 +52,14 @@ dependencies: flutter_smart_dialog: ^2.1.6 barcode_widget: ^2.0.1 -# flutter_qr_reader: ^1.0.5 qr_flutter: ^4.0.0 url_launcher: ^5.0.0 -# image_cropper: ^1.4.1 -# image_picker_gallery_camera: ^0.1.6 - #多图, 裁剪 image_pickers: ^2.0.0 flutter_scankit: ^1.2.0 - # 数量,视频时长 -# images_picker: ^1.2.4 - - # 多图,带UI -# wechat_assets_picker: ^4.2.2 - path_provider: ^1.2.0 cached_network_image: ^2.0.0 @@ -79,7 +67,6 @@ dependencies: webview_flutter: ^1.0.7 chewie_audio: ^1.1.2 -# camera: ^0.5.8+17 photo_view: ^0.11.1 video_player: ^1.0.1 @@ -95,11 +82,8 @@ dependencies: flutter_svg: ^0.20.0-nullsafety.3 font_awesome_flutter: ^9.1.0 -# flutter_bugly: ^0.3.3 -# bitmap: ^0.1.2 -# decimal: ^1.3.0 + ai_decimal_accuracy: ^1.1.0 -# zefyr: ^0.12.0 dev_dependencies: flutter_test: