Browse Source

订单结算信息接口更改,+传支付方式

remove_uniapp
w-R 3 years ago
parent
commit
8c42c34df6
  1. 31
      lib/settlement/settlement.dart

31
lib/settlement/settlement.dart

@ -96,6 +96,7 @@ class _Settlement extends State<Settlement> {
null, null,
0, 0,
widget.arguments["pid"], widget.arguments["pid"],
payChannel
); );
} else if (coupons != null && coupons != "" || tableId <= 0) { } else if (coupons != null && coupons != "" || tableId <= 0) {
queryOrderInfo( queryOrderInfo(
@ -104,9 +105,10 @@ class _Settlement extends State<Settlement> {
widget.arguments["cid"], widget.arguments["cid"],
0, 0,
null, null,
payChannel
); );
} else } else
queryOrderInfo(null, selectedBtn, null, 0, null); queryOrderInfo(null, selectedBtn, null, 0, null,payChannel);
}); });
weChatResponseEventHandler.listen((event) async { weChatResponseEventHandler.listen((event) async {
@ -122,13 +124,16 @@ class _Settlement extends State<Settlement> {
memberCouponId, memberCouponId,
orderId, orderId,
promotionId, promotionId,
payChannel,
) async { ) async {
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId, "addressId": addressId,
"isTake": isTake, "isTake": isTake,
"memberCouponId": memberCouponId, "memberCouponId": memberCouponId,
"orderId": orderId, "orderId": orderId,
"promotionId": promotionId "promotionId": promotionId,
"payChannel": payChannel
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
@ -162,7 +167,7 @@ class _Settlement extends State<Settlement> {
this.selectedBtn = selectedBtn; this.selectedBtn = selectedBtn;
}); });
if (address != null) { if (address != null) {
queryOrderInfo(address.id, selectedBtn, null, 0, null); queryOrderInfo(address.id, selectedBtn, null, 0, null,payChannel);
return; return;
} }
BaseData<List<Address>> baseDate = BaseData<List<Address>> baseDate =
@ -206,7 +211,7 @@ class _Settlement extends State<Settlement> {
} }
} }
queryOrderInfo(address.id, selectedBtn, null, 0, null); queryOrderInfo(address.id, selectedBtn, null, 0, null,payChannel);
} }
} }
@ -222,7 +227,7 @@ class _Settlement extends State<Settlement> {
}); });
}); });
queryOrderInfo(address.id, selectedBtn, null, 0, null); queryOrderInfo(address.id, selectedBtn, null, 0, null,payChannel);
} }
} }
@ -438,7 +443,7 @@ class _Settlement extends State<Settlement> {
this.selectedBtn = 0; this.selectedBtn = 0;
}); });
queryOrderInfo(addressId, isTake, queryOrderInfo(addressId, isTake,
memberCouponId, orderId, promotionId); memberCouponId, orderId, promotionId,payChannel);
}, queryAddress, storeInfo, address, }, queryAddress, storeInfo, address,
selectedAddress), selectedAddress),
@ -556,6 +561,14 @@ class _Settlement extends State<Settlement> {
payChannelCheck(int payChannel) { payChannelCheck(int payChannel) {
this.payChannel = payChannel; this.payChannel = payChannel;
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id,
payChannel
);
} }
mobileChange(String mobile) { mobileChange(String mobile) {
@ -597,7 +610,8 @@ class _Settlement extends State<Settlement> {
selectedBtn, selectedBtn,
couponListBean?.id, couponListBean?.id,
0, 0,
promotion?.id, null,
payChannel
); );
// } // }
} }
@ -619,9 +633,10 @@ class _Settlement extends State<Settlement> {
queryOrderInfo( queryOrderInfo(
address?.id, address?.id,
selectedBtn, selectedBtn,
couponListBean?.id, null,
0, 0,
promotion?.id, promotion?.id,
payChannel
); );
// } // }
} }

Loading…
Cancel
Save