|
|
|
@ -137,8 +137,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
queryMemberInfo() async { |
|
|
|
|
BaseData baseData = await minService.memberInfo() |
|
|
|
|
.catchError((error){debugPrint(error);}); |
|
|
|
|
BaseData baseData = await minService.memberInfo().catchError((error) { |
|
|
|
|
debugPrint(error); |
|
|
|
|
}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
SharedPreferences.getInstance().then( |
|
|
|
|
(value) => { |
|
|
|
@ -150,8 +151,10 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
|
|
|
|
|
///获取父订单(火锅订单加菜前调用) |
|
|
|
|
getParentInfo() async { |
|
|
|
|
BaseData baseData = await minService.getParentInfo("$tableId") |
|
|
|
|
.catchError((error) {debugPrint(error);}); |
|
|
|
|
BaseData baseData = |
|
|
|
|
await minService.getParentInfo("$tableId").catchError((error) { |
|
|
|
|
debugPrint(error); |
|
|
|
|
}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
if (baseData.data != null) { |
|
|
|
|
parentId = baseData.data["id"]; |
|
|
|
@ -182,7 +185,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
|
|
|
|
|
/// 查询店铺信息 |
|
|
|
|
queryStoreInfo() async { |
|
|
|
|
BaseData baseData = await apiService.queryStoreInfo(storeId).catchError((error) { |
|
|
|
|
BaseData baseData = |
|
|
|
|
await apiService.queryStoreInfo(storeId).catchError((error) { |
|
|
|
|
debugPrint(error); |
|
|
|
|
}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
@ -202,8 +206,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
return |
|
|
|
|
WillPopScope( |
|
|
|
|
return WillPopScope( |
|
|
|
|
onWillPop: () async { |
|
|
|
|
if (dialogShowing) { |
|
|
|
|
debugPrint("ssssasdadsasdadasd"); |
|
|
|
@ -213,8 +216,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
Container( |
|
|
|
|
child: Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
child: Stack( |
|
|
|
|
children: [ |
|
|
|
@ -227,14 +229,15 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
controller: controller, |
|
|
|
|
dragStartBehavior: DragStartBehavior.start, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
headerSliverBuilder: (BuildContext context, bool innerScrolled) { |
|
|
|
|
headerSliverBuilder: |
|
|
|
|
(BuildContext context, bool innerScrolled) { |
|
|
|
|
return [ |
|
|
|
|
SliverOverlapAbsorber( |
|
|
|
|
handle: NestedScrollView.sliverOverlapAbsorberHandleFor( |
|
|
|
|
context), |
|
|
|
|
sliver: SliverAppBar( |
|
|
|
|
expandedHeight: |
|
|
|
|
(storeInfo != null && storeInfo.couponVOList != null) |
|
|
|
|
expandedHeight: (storeInfo != null && |
|
|
|
|
storeInfo.couponVOList != null) |
|
|
|
|
? 470.h |
|
|
|
|
: 365.h, |
|
|
|
|
floating: false, |
|
|
|
@ -262,8 +265,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
flexibleSpace: FlexibleSpaceBar( |
|
|
|
|
title: Title( |
|
|
|
|
controller, |
|
|
|
|
title: Title(controller, |
|
|
|
|
storeInfo != null ? storeInfo.storeName : ''), |
|
|
|
|
collapseMode: CollapseMode.pin, |
|
|
|
|
stretchModes: [ |
|
|
|
@ -555,6 +557,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
await Navigator.of(context).pushNamed( |
|
|
|
|
'/router/settlement', |
|
|
|
|
arguments: { |
|
|
|
@ -661,8 +664,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
|
|
|
|
|
///选规格弹窗 |
|
|
|
|
showStoreSelector(MiNiDetail miNiDetail, String id, int count) async { |
|
|
|
|
if (miNiDetail.attrList != null && miNiDetail.attrList.length == 1 |
|
|
|
|
&& miNiDetail.attrList[0].attrValueList.length == 1) { |
|
|
|
|
if (miNiDetail.attrList != null && |
|
|
|
|
miNiDetail.attrList.length == 1 && |
|
|
|
|
miNiDetail.attrList[0].attrValueList.length == 1) { |
|
|
|
|
_addShopCar(miNiDetail, [], count); |
|
|
|
|
} else { |
|
|
|
|
EasyLoading.dismiss(); |
|
|
|
|