Browse Source

积分商城兑换成功显示更改,

平台余额显示更改
ff_new
w-R 3 years ago
parent
commit
6bcabaf14d
  1. 2
      lib/community/headlines/article_page.dart
  2. 3
      lib/integral_store/integral_store_details_page.dart
  3. 1752
      lib/order/exchange_order_page.dart
  4. 30
      lib/settlement/settlement.dart
  5. 16
      lib/store/store_order.dart

2
lib/community/headlines/article_page.dart

@ -217,7 +217,7 @@ class _ArticlePage extends State<ArticlePage>
List<Widget> classChildItem() {
var widgets = <Widget>[
///banner
///banner
HeadlinesBanner(bannerData,),
SizedBox(height: 28),

3
lib/integral_store/integral_store_details_page.dart

@ -298,7 +298,8 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
: Image.network(
goods.viceImgPaths.elementAt(position),
fit: BoxFit.cover,
);
)
;
},
itemCount: (goods == null || goods.viceImgPaths == null)
? 1

1752
lib/order/exchange_order_page.dart

File diff suppressed because it is too large Load Diff

30
lib/settlement/settlement.dart

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -72,8 +74,8 @@ class _Settlement extends State<Settlement> {
parentId = widget.arguments["parentId"] ?? "";
storeInfo = widget.arguments["storeInfo"];
numberOfPeople = widget.arguments["numberOfPeople"] ?? 0;
promotions=widget.arguments["pid"]??"";
coupons=widget.arguments["cid"]??"";
promotions=widget.arguments["pName"]??"";
coupons=widget.arguments["cName"]??"";
if (tableId == 0) {
placeOrder = true;
}
@ -89,7 +91,25 @@ class _Settlement extends State<Settlement> {
tenant: tenant,
storeId: storeId,
);
queryOrderInfo(null, selectedBtn, null, 0, null);
if(promotions != null && promotions != ""){
queryOrderInfo(
address != null ? address.id : null,
selectedBtn,
null,
0,
widget.arguments["pid"],
);
}else if(coupons != null && coupons != ""){
queryOrderInfo(
address != null ? address.id : null,
selectedBtn,
widget.arguments["cid"],
0,
null,
);
}
else
queryOrderInfo(null, selectedBtn, null, 0, null);
});
}
@ -209,9 +229,9 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.payChannel = payChannel;
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId =
promotion != null ? promotion.id : "";
promotion != null ? promotion.id : widget.arguments["pid"]??"";
placeOrderFirst.promotionInfoDTO.couponId =
couponListBean != null ? couponListBean.id : "";
couponListBean != null ? couponListBean.id : widget.arguments["cid"]??"";
placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;

16
lib/store/store_order.dart

@ -62,7 +62,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
int numberOfPeople = 0;
///token
String minToken;
String pName;
String pid;
String cName;
String cid;
@override
@ -554,7 +556,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
"tableId": tableId,
"parentCode": parentCode,
"parentId": parentId,
"pName":pName,
"pid":pid,
"cName":cName,
"cid":cid,
"shoppingCart": shopCarGoods,
"numberOfPeople": numberOfPeople,
@ -733,8 +737,10 @@ class _StoreOrderPage extends State<StoreOrderPage>
///
Future<ShoppingCart> queryShopCar() async {
pid="";
cid="";
pName="";//
pid="";//
cName="";//
cid="";//
BaseData<List<ShoppingCart>> baseDate =
await minService.getShoppingCart(tableId);
if (baseDate != null &&
@ -744,13 +750,15 @@ class _StoreOrderPage extends State<StoreOrderPage>
if( baseDate.data[0].selectDiscount ==1){
baseDate.data[0].couponList.forEach((element) {
if(element.isMaxCoupon){
cid = element.promotionName;
cName = element.promotionName;
cid = element.id;
}
});
}else if(baseDate.data[0].selectDiscount==2){
baseDate.data[0].promotionInfoList.forEach((element) {
if(element.isMaxPromotion){
pid=element.name;
pName=element.name;
pid=element.id;
}
});
}

Loading…
Cancel
Save