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() { List<Widget> classChildItem() {
var widgets = <Widget>[ var widgets = <Widget>[
///banner ///banner
HeadlinesBanner(bannerData,), HeadlinesBanner(bannerData,),
SizedBox(height: 28), SizedBox(height: 28),

3
lib/integral_store/integral_store_details_page.dart

@ -298,7 +298,8 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
: Image.network( : Image.network(
goods.viceImgPaths.elementAt(position), goods.viceImgPaths.elementAt(position),
fit: BoxFit.cover, fit: BoxFit.cover,
); )
;
}, },
itemCount: (goods == null || goods.viceImgPaths == null) itemCount: (goods == null || goods.viceImgPaths == null)
? 1 ? 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:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -72,8 +74,8 @@ class _Settlement extends State<Settlement> {
parentId = widget.arguments["parentId"] ?? ""; parentId = widget.arguments["parentId"] ?? "";
storeInfo = widget.arguments["storeInfo"]; storeInfo = widget.arguments["storeInfo"];
numberOfPeople = widget.arguments["numberOfPeople"] ?? 0; numberOfPeople = widget.arguments["numberOfPeople"] ?? 0;
promotions=widget.arguments["pid"]??""; promotions=widget.arguments["pName"]??"";
coupons=widget.arguments["cid"]??""; coupons=widget.arguments["cName"]??"";
if (tableId == 0) { if (tableId == 0) {
placeOrder = true; placeOrder = true;
} }
@ -89,7 +91,25 @@ class _Settlement extends State<Settlement> {
tenant: tenant, tenant: tenant,
storeId: storeId, 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.payChannel = payChannel;
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId = placeOrderFirst.promotionInfoDTO.promotionId =
promotion != null ? promotion.id : ""; promotion != null ? promotion.id : widget.arguments["pid"]??"";
placeOrderFirst.promotionInfoDTO.couponId = placeOrderFirst.promotionInfoDTO.couponId =
couponListBean != null ? couponListBean.id : ""; couponListBean != null ? couponListBean.id : widget.arguments["cid"]??"";
placeOrderFirst.recMobile = placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; (mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;

16
lib/store/store_order.dart

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

Loading…
Cancel
Save