Browse Source

safety

master
fmk 3 years ago
parent
commit
db51f2a678
  1. 2
      lib/community/community_page.dart
  2. 4
      lib/main_page.dart
  3. 42
      lib/settlement/settlement.dart
  4. 48
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  5. 57
      lib/store/store_order.dart
  6. 82
      lib/store/store_view/product_sku.dart
  7. 1
      lib/store/store_view/shop_car.dart
  8. 86
      lib/store/store_view/shop_goods.dart
  9. 18
      lib/store/store_view/store_order_list.dart

2
lib/community/community_page.dart

@ -32,7 +32,7 @@ class _CommunityPage extends State<CommunityPage>
super.initState(); super.initState();
if (tabcontroller == null) if (tabcontroller == null)
tabcontroller = TabController(length: lables.length, vsync: this); tabcontroller = TabController(length: lables.length, vsync: this, initialIndex: 1);
} }
_toRelease() async { _toRelease() async {

4
lib/main_page.dart

@ -229,7 +229,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
} }
} }
final PageController pageController = PageController(initialPage: 1); final PageController pageController = PageController(initialPage: 0);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -279,7 +279,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
); );
} }
var clickIndex = 1; var clickIndex = 0;
Widget bottomNavigationItem(text, index) { Widget bottomNavigationItem(text, index) {
var isSelected = index == clickIndex; var isSelected = index == clickIndex;

42
lib/settlement/settlement.dart

@ -109,7 +109,8 @@ class _Settlement extends State<Settlement> {
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
settleOrderInfo = baseData.data; settleOrderInfo = baseData.data;
if (settleOrderInfo.orderProductList == null || settleOrderInfo.orderProductList.length == 0) { if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) {
queryOrderDetails(parentId); queryOrderDetails(parentId);
} }
}); });
@ -216,7 +217,8 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.subcribeTime = null; placeOrderFirst.subcribeTime = null;
placeOrderFirst.tableId = "$tableId"; placeOrderFirst.tableId = "$tableId";
if (tableId == 0) {/// if (tableId == 0) {
///
BaseData<DownOrder> baseData = await minService BaseData<DownOrder> baseData = await minService
.placeOrderFirst(placeOrderFirst.toJson()) .placeOrderFirst(placeOrderFirst.toJson())
.catchError((error) { .catchError((error) {
@ -227,7 +229,8 @@ class _Settlement extends State<Settlement> {
this.downOrder = baseData.data; this.downOrder = baseData.data;
querySettlement(); querySettlement();
} }
} else { /// } else {
///
BaseData<DownOrder> baseData; BaseData<DownOrder> baseData;
if (parentId == "") { if (parentId == "") {
baseData = await minService baseData = await minService
@ -368,8 +371,9 @@ class _Settlement extends State<Settlement> {
ActivityCouponRemarks( ActivityCouponRemarks(
couponCart, couponCart,
activityCart, activityCart,
couponListBean, settleOrderInfo,
promotion, coupons,
promotions,
couponCount(), couponCount(),
), ),
@ -398,9 +402,9 @@ class _Settlement extends State<Settlement> {
), ),
), ),
Text( Text(
minOrderInfo != null ? minOrderInfo != null
"${minOrderInfo.orderSumPrice}" : ? "${minOrderInfo.orderSumPrice}"
"${settleOrderInfo == null ? "0" : settleOrderInfo.price}", : "${settleOrderInfo == null ? "0" : settleOrderInfo.price}",
style: TextStyle( style: TextStyle(
fontSize: 20.sp, fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
@ -462,6 +466,9 @@ class _Settlement extends State<Settlement> {
return count; return count;
} }
String coupons = "";
String promotions = "";
/// ///
couponCart() async { couponCart() async {
CouponListBean couponBean = await showModalBottomSheet( CouponListBean couponBean = await showModalBottomSheet(
@ -474,13 +481,15 @@ class _Settlement extends State<Settlement> {
); );
if (couponBean != null) { if (couponBean != null) {
this.couponListBean = couponBean; this.couponListBean = couponBean;
this.promotion = null; coupons = couponListBean.promotionName;
promotions = "";
queryOrderInfo( queryOrderInfo(
address != null ? address.id : null, address != null ? address.id : null,
selectedBtn, selectedBtn,
couponListBean != null ? couponListBean.id : null, couponListBean != null ? couponListBean.id : null,
0, 0,
promotion != null ? promotion.id : null); null,
);
} }
} }
@ -496,11 +505,12 @@ class _Settlement extends State<Settlement> {
); );
if (pro != null) { if (pro != null) {
this.promotion = pro; this.promotion = pro;
this.couponListBean = null; promotions = promotion.name;
coupons = "";
queryOrderInfo( queryOrderInfo(
address != null ? address.id : null, address != null ? address.id : null,
selectedBtn, selectedBtn,
couponListBean != null ? couponListBean.id : null, null,
0, 0,
promotion != null ? promotion.id : null, promotion != null ? promotion.id : null,
); );

48
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -7,15 +7,18 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class ActivityCouponRemarks extends StatefulWidget { class ActivityCouponRemarks extends StatefulWidget {
final Function() couponCart; final Function() couponCart;
final Function() activityCart; final Function() activityCart;
final CouponListBean couponListBean;
final PromotionInfoListBean promotion; final String coupons;
final String promotions;
final SettleOrderInfo settleOrderInfo;
final int couponCount; final int couponCount;
ActivityCouponRemarks( ActivityCouponRemarks(
this.couponCart, this.couponCart,
this.activityCart, this.activityCart,
this.couponListBean, this.settleOrderInfo,
this.promotion, this.coupons,
this.promotions,
this.couponCount, this.couponCount,
); );
@ -26,7 +29,6 @@ class ActivityCouponRemarks extends StatefulWidget {
} }
class _ActivityCouponRemarks extends State<ActivityCouponRemarks> { class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -78,7 +80,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
), ),
Text( Text(
widget.promotion == null ? "*优惠券与活动不可同时选择" : widget.promotion.name, activityText(),
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
@ -116,9 +118,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
), ),
Text( Text(
(widget.couponListBean == null) couponText(),
? ("未使用优惠券")
: widget.couponListBean.promotionName,
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
@ -170,4 +170,34 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
); );
} }
String activityText() {
String promotion = "";
if (widget.promotions == null || widget.promotions == "") {
promotion = "未选择任何活动";
if (widget.settleOrderInfo == null || widget.settleOrderInfo.promotionInfoList == null) {
promotion = "暂无可选活动";
} else if (widget.coupons != null && widget.coupons != "") {
promotion = "活动与优惠券不可同享";
}
} else {
promotion = widget.promotions;
}
return promotion;
}
String couponText() {
String coupon = "";
if (widget.coupons == null || widget.coupons == "") {
coupon = "未选择任何优惠券";
if (widget.settleOrderInfo == null || widget.settleOrderInfo.couponList == null) {
coupon = "暂无可选优惠券";
} else if (widget.promotions != null && widget.promotions != "") {
coupon = "优惠券与活动不可同享";
}
} else {
coupon = widget.coupons;
}
return coupon;
}
} }

57
lib/store/store_order.dart

@ -577,26 +577,13 @@ class _StoreOrderPage extends State<StoreOrderPage>
); );
} }
/// key,UI
GlobalKey shopCartKey = GlobalKey(); GlobalKey shopCartKey = GlobalKey();
/// ///
showShoppingCart() { showShoppingCart() {
queryShopCar().then((value) { queryShopCar().then((value) {
this.shopCarGoods = value; this.shopCarGoods = value;
// showModalBottomSheet(
// context: context,
// backgroundColor: Colors.transparent,
// builder: (context) {
// return ShopCar(
// shopCartKey,
// this.shopCarGoods,
// clearShopCar,
// toDownOrder,
// shopCartAdd,
// shopCartReduce,
// );
// },
// );
dialogShowing = true; dialogShowing = true;
SmartDialog.show( SmartDialog.show(
widget: ShopCar( widget: ShopCar(
@ -626,6 +613,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
/// ///
_queryMiNiDetail(String id) async { _queryMiNiDetail(String id) async {
EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<MiNiDetail> baseData = await minService.miNiDetail(id); BaseData<MiNiDetail> baseData = await minService.miNiDetail(id);
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
showStoreSelector(baseData.data, id); showStoreSelector(baseData.data, id);
@ -634,8 +622,12 @@ class _StoreOrderPage extends State<StoreOrderPage>
/// ///
showStoreSelector(MiNiDetail miNiDetail, String id) async { showStoreSelector(MiNiDetail miNiDetail, String id) async {
dialogShowing = true; if (miNiDetail.attrList != null && miNiDetail.attrList.length == 1) {
SmartDialog.show( _addShopCar(miNiDetail, [], 1);
} else {
EasyLoading.dismiss();
dialogShowing = true;
SmartDialog.show(
widget: ProductSku( widget: ProductSku(
miNiDetail, miNiDetail,
shopCarGoods, shopCarGoods,
@ -647,22 +639,28 @@ class _StoreOrderPage extends State<StoreOrderPage>
onDismiss: () { onDismiss: () {
dialogShowing = false; dialogShowing = false;
}, },
alignmentTemp: Alignment.bottomCenter,); alignmentTemp: Alignment.bottomCenter,
);
}
} }
/// ///
Future _addShopCar(MiNiDetail miNiDetail, selectSkus, int count) async { Future _addShopCar(MiNiDetail miNiDetail, selectSkus, int count) async {
ProductSkuVOListBean productSku = ProductSkuVOListBean productSku;
miNiDetail.productSkuVOList.firstWhere((element) { if (selectSkus!= null && selectSkus.length == 0) {
bool gg = true; productSku = miNiDetail.productSkuVOList.first;
selectSkus.forEach((element1) { } else {
if (element.skuNameStr.indexOf(element1) < 0) { productSku = miNiDetail.productSkuVOList.firstWhere((element) {
gg = false; bool gg = true;
return gg; selectSkus.forEach((element1) {
} if (element.skuNameStr.indexOf(element1) < 0) {
gg = false;
return gg;
}
});
return gg;
}); });
return gg; }
});
if (productSku == null) return; if (productSku == null) return;
String skuId = productSku.id; String skuId = productSku.id;
String skuValue = selectSkus String skuValue = selectSkus
@ -693,6 +691,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
}, },
], ],
}); });
EasyLoading.dismiss();
if (baseDate != null && baseDate.isSuccess) { if (baseDate != null && baseDate.isSuccess) {
queryShopCar().then((value) { queryShopCar().then((value) {
this.shopCarGoods = value; this.shopCarGoods = value;
@ -726,8 +725,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
await minService.shoppingCartSingle(shopCarTemp); await minService.shoppingCartSingle(shopCarTemp);
if (baseDate.isSuccess) { if (baseDate.isSuccess) {
this.shopCarGoods = await queryShopCar(); this.shopCarGoods = await queryShopCar();
print("shopingCar111111: ${this.shopCarGoods.toJson()}");
if (shopCartKey != null) { if (shopCartKey != null) {
shopCartKey.currentState.setState(() {}); shopCartKey.currentState.setState(() {});
} }
@ -746,8 +743,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
await minService.shoppingCartSingle(shopCarTemp); await minService.shoppingCartSingle(shopCarTemp);
if (baseDate.isSuccess) { if (baseDate.isSuccess) {
this.shopCarGoods = await queryShopCar(); this.shopCarGoods = await queryShopCar();
print("shopingCar111111: ${this.shopCarGoods.toJson()}");
if (shopCartKey != null) { if (shopCartKey != null) {
shopCartKey.currentState.setState(() {}); shopCartKey.currentState.setState(() {});
} }

82
lib/store/store_view/product_sku.dart

@ -177,30 +177,32 @@ class _ProductSku extends State<ProductSku> {
), ),
], ],
), ),
SizedBox( if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0)
height: 23, SizedBox(
), height: 23,
Expanded( ),
child: ListView.builder( if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0)
itemCount: widget.miNiDetail.attrList.length, Expanded(
scrollDirection: Axis.vertical, child: ListView.builder(
physics: BouncingScrollPhysics(), itemCount: widget.miNiDetail.attrList.length,
padding: EdgeInsets.zero, scrollDirection: Axis.vertical,
itemBuilder: (context, position) { physics: BouncingScrollPhysics(),
return attrItem( padding: EdgeInsets.zero,
(index) { itemBuilder: (context, position) {
state(() { return attrItem(
selectSkus[position] = widget.miNiDetail (index) {
.attrList[position].attrValueList[index].attrValue; state(() {
buildCount(); selectSkus[position] = widget.miNiDetail
}); .attrList[position].attrValueList[index].attrValue;
}, buildCount();
widget.miNiDetail.attrList[position], });
position, },
); widget.miNiDetail.attrList[position],
}, position,
);
},
),
), ),
),
SizedBox( SizedBox(
height: 24, height: 24,
), ),
@ -286,23 +288,27 @@ class _ProductSku extends State<ProductSku> {
} }
Widget attrItem(Function fc, AttrListBean attrListBean, position) { Widget attrItem(Function fc, AttrListBean attrListBean, position) {
return Column( if (attrListBean.attrValueList != null && attrListBean.attrValueList.length > 0)
crossAxisAlignment: CrossAxisAlignment.start, return Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Padding( children: [
padding: EdgeInsets.only(top: 24, bottom: 16), Padding(
child: Text( padding: EdgeInsets.only(top: 24, bottom: 16),
attrListBean.attrName, child: Text(
style: TextStyle( attrListBean.attrName,
color: Colors.black, style: TextStyle(
fontSize: 14.sp, color: Colors.black,
fontWeight: MyFontWeight.regular, fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
), ),
), ),
), sweetnessStore(fc, attrListBean.attrValueList, position),
sweetnessStore(fc, attrListBean.attrValueList, position), ],
], );
); else {
return Container();
}
} }
Widget sweetnessStore(Function fc, List<AttrValueListBean> arrays, position) { Widget sweetnessStore(Function fc, List<AttrValueListBean> arrays, position) {

1
lib/store/store_view/shop_car.dart

@ -121,6 +121,7 @@ class _ShopCar extends State<ShopCar> {
await widget.shopCartReduce(cart); await widget.shopCartReduce(cart);
setState(() {}); setState(() {});
}, },
isShopCart: true,
count: widget.shopingCar count: widget.shopingCar
.shoppingCartSkuItemList[position].buyNum, .shoppingCartSkuItemList[position].buyNum,
shoppingCartSkuItemListBean: widget.shopingCar shoppingCartSkuItemListBean: widget.shopingCar

86
lib/store/store_view/shop_goods.dart

@ -8,19 +8,21 @@ import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
class ShopGoods extends StatefulWidget { class ShopGoods extends StatefulWidget {
final Function(String id) queryMiNiDetail; final Function(String id) queryMiNiDetail;
final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) add; final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) add;
final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) reduce; final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean)
reduce;
final ProductListBean productListBean; final ProductListBean productListBean;
final ShoppingCartSkuItemListBean shoppingCartSkuItemListBean; final ShoppingCartSkuItemListBean shoppingCartSkuItemListBean;
final int count; final int count;
final bool isShopCart;
ShopGoods( ShopGoods(
this.add, this.add,
this.reduce, { this.reduce, {
this.productListBean, this.productListBean,
this.count = 0, this.count = 0,
this.isShopCart = false,
this.queryMiNiDetail, this.queryMiNiDetail,
this.shoppingCartSkuItemListBean, this.shoppingCartSkuItemListBean,
}); });
@ -48,10 +50,11 @@ class _ShopGoods extends State<ShopGoods> {
children: [ children: [
SizedBox(width: 12.w), SizedBox(width: 12.w),
MImage( MImage(
widget.productListBean != null ? widget.productListBean.imgPath : widget.productListBean != null
(widget.shoppingCartSkuItemListBean != null ? widget.productListBean.imgPath
? widget.shoppingCartSkuItemListBean.skuImg : (widget.shoppingCartSkuItemListBean != null
: ""), ? widget.shoppingCartSkuItemListBean.skuImg
: ""),
width: 70, width: 70,
height: 70, height: 70,
fit: BoxFit.cover, fit: BoxFit.cover,
@ -66,7 +69,9 @@ class _ShopGoods extends State<ShopGoods> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
widget.productListBean != null ? widget.productListBean.productName : widget.shoppingCartSkuItemListBean.productName, widget.productListBean != null
? widget.productListBean.productName
: widget.shoppingCartSkuItemListBean.productName,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 13.sp, fontSize: 13.sp,
@ -76,13 +81,16 @@ class _ShopGoods extends State<ShopGoods> {
SizedBox( SizedBox(
height: 2, height: 2,
), ),
///{"id":"1442420413828169728","productId":"1432652566000304128","productName":"桂花乌龙茶","skuName":null,"buyNum":1,"skuStock":1000,"skuImg":"https://pos.upload.gznl.top/1177/2021/08/f855ffb8-d473-4f5f-93c9-5907b539b2fd.jpg", ///{"id":"1442420413828169728","productId":"1432652566000304128","productName":"桂花乌龙茶","skuName":null,"buyNum":1,"skuStock":1000,"skuImg":"https://pos.upload.gznl.top/1177/2021/08/f855ffb8-d473-4f5f-93c9-5907b539b2fd.jpg",
///"skuPrice":"0.00","selected":1,"storeId":null,"groupId":"1426067376096411648","createTime":"2021-10-20 10:27:46","tableId":null,"platterList":null} ///"skuPrice":"0.00","selected":1,"storeId":null,"groupId":"1426067376096411648","createTime":"2021-10-20 10:27:46","tableId":null,"platterList":null}
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
(widget.productListBean != null ? widget.productListBean.shortName : widget.shoppingCartSkuItemListBean.skuName ?? ""), (widget.productListBean != null
? widget.productListBean.shortName
: widget.shoppingCartSkuItemListBean.skuName ?? ""),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
@ -154,22 +162,48 @@ class _ShopGoods extends State<ShopGoods> {
], ],
), ),
Spacer(), Spacer(),
if (widget.count == 0) if (!widget.isShopCart)
RoundButton( Stack(
width: 49.w, children: [
text: S.of(context).xuanguige, Container(
textColor: Colors.white, margin: EdgeInsets.only(right: 8, top: 4),
fontWeight: MyFontWeight.medium, child: RoundButton(
radius: 11, width: 49.w,
backgroup: Color(0xFF32A060), text: S.of(context).xuanguige,
fontSize: 11.sp, textColor: Colors.white,
padding: EdgeInsets.symmetric(vertical: 5.h), fontWeight: MyFontWeight.medium,
callback: () { radius: 11,
widget.queryMiNiDetail( backgroup: Color(0xFF32A060),
widget.productListBean != null ? widget.productListBean.id : widget.shoppingCartSkuItemListBean.productId); fontSize: 11.sp,
}, padding: EdgeInsets.symmetric(vertical: 5.h),
callback: () {
widget.queryMiNiDetail(
widget.productListBean != null
? widget.productListBean.id
: widget.shoppingCartSkuItemListBean
.productId);
},
),
),
Positioned(
right: 0,
child: Visibility(
visible: widget.count > 0,
child: RoundButton(
width: 17,
height: 17,
text: "${widget.count}",
textColor: Color(0xFF32A060),
fontWeight: MyFontWeight.regular,
backgroup: Colors.white,
fontSize: 12.sp,
radius: 100,
),
),
),
],
), ),
if (widget.count > 0) if (widget.isShopCart)
InkWell( InkWell(
onTap: () { onTap: () {
widget.reduce(widget.shoppingCartSkuItemListBean); widget.reduce(widget.shoppingCartSkuItemListBean);
@ -180,7 +214,7 @@ class _ShopGoods extends State<ShopGoods> {
height: 22, height: 22,
), ),
), ),
if (widget.count > 0) if (widget.isShopCart)
Container( Container(
width: 30, width: 30,
alignment: Alignment.center, alignment: Alignment.center,
@ -193,7 +227,7 @@ class _ShopGoods extends State<ShopGoods> {
), ),
), ),
), ),
if (widget.count > 0) if (widget.isShopCart)
InkWell( InkWell(
onTap: () { onTap: () {
widget.add(widget.shoppingCartSkuItemListBean); widget.add(widget.shoppingCartSkuItemListBean);

18
lib/store/store_view/store_order_list.dart

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart';
import 'package:huixiang/retrofit/data/shoppingCart.dart'; import 'package:huixiang/retrofit/data/shoppingCart.dart';
import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
@ -19,6 +20,7 @@ class StoreOrderListPage extends StatefulWidget {
final StoreInfo storeInfo; final StoreInfo storeInfo;
final ScrollController controller; final ScrollController controller;
final Function(String id) queryMiNiDetail; final Function(String id) queryMiNiDetail;
ShoppingCart shopCarGoods; ShoppingCart shopCarGoods;
StoreOrderListPage( StoreOrderListPage(
@ -44,6 +46,9 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
List<FindMiNiGroupList> appletProducts; List<FindMiNiGroupList> appletProducts;
List<ProductListBean> productListBeans = []; List<ProductListBean> productListBeans = [];
ScrollController controller1 = ScrollController();
ScrollController controller2 = ScrollController();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -83,8 +88,6 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
} }
} }
// RefreshController refreshController;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -114,8 +117,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Container( Container(
width: MediaQuery.of(context).size.width - 100.w, width: MediaQuery.of(context).size.width - 100.w,
child: ListView.builder( child: ListView.builder(
itemCount: itemCount: productListBeans == null ? 0 : productListBeans.length,
productListBeans == null ? 0 : productListBeans.length,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
@ -129,9 +131,6 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
); );
} }
ScrollController controller1 = ScrollController();
ScrollController controller2 = ScrollController();
Widget orderItem(FindMiNiGroupList findMiNiGroupList, int index) { Widget orderItem(FindMiNiGroupList findMiNiGroupList, int index) {
int count = calculateItemCount(findMiNiGroupList); int count = calculateItemCount(findMiNiGroupList);
return Container( return Container(
@ -235,13 +234,14 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
}, },
child: ShopGoods( child: ShopGoods(
(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) { (ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) {
widget.queryMiNiDetail(productListBeans[position].id); // widget.add(productListBeans[position].id);
}, },
(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) { (ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) {
widget.queryMiNiDetail(productListBeans[position].id); // widget.reduce(productListBeans[position].id);
}, },
productListBean: productListBeans[position], productListBean: productListBeans[position],
count: count, count: count,
isShopCart: false,
queryMiNiDetail: widget.queryMiNiDetail, queryMiNiDetail: widget.queryMiNiDetail,
shoppingCartSkuItemListBean: shoppingCartSkuItemListBean, shoppingCartSkuItemListBean: shoppingCartSkuItemListBean,
), ),

Loading…
Cancel
Save