From fdcbc21046fa4be7e5ac4cbc78e2ed8cf920b4ab Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Sat, 19 Nov 2022 15:32:55 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8A=A9=E5=86=9C=E7=A7=AF=E5=88=86=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E9=80=89=E6=8B=A9=E6=9B=B4=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/settlement/settlement.dart | 25 ++++++++++++++++--- .../settlement_view/pay_method.dart | 4 +-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 7bd3cbf4..c5855001 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -84,6 +84,7 @@ class _Settlement extends State { bool orderButton = false; bool useVipPriceSelect = false; bool showVipTips = false; + bool isRaiseChannel = false; @override void initState() { @@ -187,6 +188,7 @@ class _Settlement extends State { tableId) async { try { EasyLoading.show(status: S.current.zhengzaijiazai); + BaseData baseData = await minService.getOrderInfo({ "addressId": addressId, "isTake": isTake, @@ -198,7 +200,7 @@ class _Settlement extends State { "actProductSkuId": actProductSkuId, "useVipPrice":useVipPriceSelect, "buyNum": buyNum, - "payChannel": payChannel, + "payChannel":payChannel, "tableId": tableId }).catchError((error) {}); this.promotion = null; @@ -229,6 +231,22 @@ class _Settlement extends State { queryOrderDetails( pageType != null ? widget.arguments["orderId"] : parentId); } + if(!isRaiseChannel && settleOrderInfo.isRaise){ + isRaiseChannel = true; + queryOrderInfo( + address?.id, + selectedBtn, + couponListBean?.id, + 0, + promotion?.id ?? productId, + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + useVipPriceSelect, + count1, + settleOrderInfo.isRaise ? 7 :payChannel, + tableId); + } } else { SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } @@ -466,7 +484,7 @@ class _Settlement extends State { placeOrderFirst.orderTypeId = 0; placeOrderFirst.parentCode = parentCode; // 火锅加菜 placeOrderFirst.parentId = parentId; // 火锅加菜 - placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : payChannel); + placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : (settleOrderInfo.isRaise ? 7:payChannel)); placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); placeOrderFirst.promotionInfoDTO.promotionId = (promotion != null && tableId <= 0) ? promotion.id : ""; @@ -544,6 +562,7 @@ class _Settlement extends State { placeOrderFirst.orderProductVOList = (downOrder == null) ? minOrderInfo.orderProductVOList : downOrder.orderProductVOList; + if (placeOrderFirst.payChannel == 1) { if (Platform.isAndroid) { if (!(await Min.isInitialize())) { @@ -790,7 +809,7 @@ class _Settlement extends State { } ), - if (placeOrder && joinA != JoinActivity.BargainBug) + if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug) ///支付方式 PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo), ], diff --git a/lib/settlement/settlement_view/pay_method.dart b/lib/settlement/settlement_view/pay_method.dart index 692bae15..481e1fb1 100644 --- a/lib/settlement/settlement_view/pay_method.dart +++ b/lib/settlement/settlement_view/pay_method.dart @@ -34,6 +34,7 @@ class _PayMethod extends State { @override void initState() { super.initState(); + checkIndex = (widget?.settleOrderInfo?.isRaise ?? false) ? 4:5; SharedPreferences.getInstance().then((value) { Map memberInfo = jsonDecode(value.getString("minMember")); @@ -41,7 +42,6 @@ class _PayMethod extends State { money = memberInfo["money"]; mGreenMoney = memberInfo["greenMoney"]; mRaiseMoney = memberInfo["raiseMoney"]; - checkIndex = (widget?.settleOrderInfo?.isRaise ?? false) ? 5:4; setState(() {}); }); } @@ -268,7 +268,7 @@ class _PayMethod extends State { width: 10, ), Text( - "助农积分", + S.of(context).zhunongjifen, style: TextStyle( fontSize: 14.sp, color: Color(0xff353535),