|
|
@ -656,6 +656,16 @@ class _StoreOrderPage extends State<StoreOrderPage> |
|
|
|
///选规格 |
|
|
|
///选规格 |
|
|
|
_queryMiNiDetail(String id, int count) async { |
|
|
|
_queryMiNiDetail(String id, int count) async { |
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai); |
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai); |
|
|
|
|
|
|
|
if(count < 0){ |
|
|
|
|
|
|
|
shopCarGoods.shoppingCartSkuItemList.forEach((element) { |
|
|
|
|
|
|
|
if(element.productId == id){ |
|
|
|
|
|
|
|
shopCartReduce(element); |
|
|
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
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, count); |
|
|
|
showStoreSelector(baseData.data, id, count); |
|
|
@ -805,11 +815,13 @@ class _StoreOrderPage extends State<StoreOrderPage> |
|
|
|
BaseData<List<ShoppingCart>> baseDate = |
|
|
|
BaseData<List<ShoppingCart>> baseDate = |
|
|
|
await minService.shoppingCartSingle(shopCarTemp); |
|
|
|
await minService.shoppingCartSingle(shopCarTemp); |
|
|
|
if (baseDate.isSuccess) { |
|
|
|
if (baseDate.isSuccess) { |
|
|
|
|
|
|
|
EasyLoading.dismiss(); |
|
|
|
this.shopCarGoods = await queryShopCar(); |
|
|
|
this.shopCarGoods = await queryShopCar(); |
|
|
|
if (shopCartKey != null) { |
|
|
|
if (shopCartKey?.currentState != null) { |
|
|
|
shopCartKey.currentState.setState(() {}); |
|
|
|
shopCartKey.currentState.setState(() {}); |
|
|
|
} |
|
|
|
} |
|
|
|
setState(() {}); |
|
|
|
setState(() { |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
return this.shopCarGoods; |
|
|
|
return this.shopCarGoods; |
|
|
|
} |
|
|
|
} |
|
|
@ -868,9 +880,9 @@ class _StoreOrderPage extends State<StoreOrderPage> |
|
|
|
} |
|
|
|
} |
|
|
|
ShoppingCartSkuItemListBean shopSkuItem = shopCarGoods |
|
|
|
ShoppingCartSkuItemListBean shopSkuItem = shopCarGoods |
|
|
|
.shoppingCartSkuItemList |
|
|
|
.shoppingCartSkuItemList |
|
|
|
.firstWhere((element) => skuId == element.skuId); |
|
|
|
.firstWhere((element) => skuId == element.id); |
|
|
|
int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList |
|
|
|
int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList |
|
|
|
.indexWhere((element) => skuId == element.skuId); |
|
|
|
.indexWhere((element) => skuId == element.id); |
|
|
|
|
|
|
|
|
|
|
|
if (shopSkuItem != null) { |
|
|
|
if (shopSkuItem != null) { |
|
|
|
if (shopSkuItem.buyNum > 1) { |
|
|
|
if (shopSkuItem.buyNum > 1) { |
|
|
|