|
|
|
@ -18,8 +18,9 @@ class StoreOrderListPage extends StatefulWidget {
|
|
|
|
|
final List<Activity> activitys; |
|
|
|
|
final StoreInfo storeInfo; |
|
|
|
|
final ScrollController controller; |
|
|
|
|
final Function(int allCount, double allPrice) fc; |
|
|
|
|
final Function(ProductListBean plb) fc; |
|
|
|
|
final Function(String id) queryMiNiDetail; |
|
|
|
|
_StoreOrderListPage _storeOrderListPage; |
|
|
|
|
|
|
|
|
|
StoreOrderListPage( |
|
|
|
|
this.arguments, |
|
|
|
@ -27,12 +28,17 @@ class StoreOrderListPage extends StatefulWidget {
|
|
|
|
|
this.storeInfo, |
|
|
|
|
this.controller, |
|
|
|
|
this.queryMiNiDetail, |
|
|
|
|
this.fc, |
|
|
|
|
this.fc |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
State<StatefulWidget> createState() { |
|
|
|
|
return _StoreOrderListPage(); |
|
|
|
|
_storeOrderListPage = _StoreOrderListPage(); |
|
|
|
|
return _storeOrderListPage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void notifyList(List<ProductListBean> product){ |
|
|
|
|
_storeOrderListPage.notifyList(product); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -42,7 +48,18 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
|
|
|
|
|
ApiService apiService; |
|
|
|
|
MinApiService minService; |
|
|
|
|
List<FindMiNiGroupList> appletProducts; |
|
|
|
|
List<ProductListBean> productListBeans; |
|
|
|
|
List<ProductListBean> productListBeans = []; |
|
|
|
|
|
|
|
|
|
void notifyList(List<ProductListBean> product){ |
|
|
|
|
setState(() { |
|
|
|
|
product.forEach((e0) { |
|
|
|
|
productListBeans.forEach((e1) { |
|
|
|
|
if(e0.id == e1.id) |
|
|
|
|
e1.buyNum = e0.buyNum; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
void initState() { |
|
|
|
@ -74,8 +91,9 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
setState(() { |
|
|
|
|
appletProducts = baseData.data; |
|
|
|
|
productListBeans.clear(); |
|
|
|
|
if (appletProducts.length > 0) |
|
|
|
|
productListBeans = appletProducts[0].productList; |
|
|
|
|
productListBeans.addAll(appletProducts[0].productList); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -133,7 +151,8 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
|
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
isSelected = index; |
|
|
|
|
productListBeans = findMiNiGroupList.productList; |
|
|
|
|
productListBeans.clear(); |
|
|
|
|
productListBeans.addAll(findMiNiGroupList.productList); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|