Browse Source

Merge remote-tracking branch 'origin/new_revision_app' into new_revision_app

dart3_last
boom 2 years ago
parent
commit
e84e78887f
  1. 23
      lib/settlement/settlement.dart
  2. 4
      lib/settlement/settlement_view/pay_method.dart

23
lib/settlement/settlement.dart

@ -84,6 +84,7 @@ class _Settlement extends State<Settlement> {
bool orderButton = false;
bool useVipPriceSelect = false;
bool showVipTips = false;
bool isRaiseChannel = false;
@override
void initState() {
@ -187,6 +188,7 @@ class _Settlement extends State<Settlement> {
tableId) async {
try {
EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
@ -229,6 +231,22 @@ class _Settlement extends State<Settlement> {
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<Settlement> {
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<Settlement> {
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<Settlement> {
}
),
if (placeOrder && joinA != JoinActivity.BargainBug)
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo),
],

4
lib/settlement/settlement_view/pay_method.dart

@ -34,6 +34,7 @@ class _PayMethod extends State<PayMethod> {
@override
void initState() {
super.initState();
checkIndex = (widget?.settleOrderInfo?.isRaise ?? false) ? 4:5;
SharedPreferences.getInstance().then((value) {
Map<String, dynamic> memberInfo =
jsonDecode(value.getString("minMember"));
@ -41,7 +42,6 @@ class _PayMethod extends State<PayMethod> {
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<PayMethod> {
width: 10,
),
Text(
"助农积分",
S.of(context).zhunongjifen,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),

Loading…
Cancel
Save