|
|
@ -151,7 +151,8 @@ class _ShoppingCartPage extends State<ShoppingCartPage> |
|
|
|
ShoppingCartSkuItemListBean cartSkuItem,int count,int selected) async { |
|
|
|
ShoppingCartSkuItemListBean cartSkuItem,int count,int selected) async { |
|
|
|
Map<String, dynamic> shopCarTemp = shopCarGoods[0].toJson(); |
|
|
|
Map<String, dynamic> shopCarTemp = shopCarGoods[0].toJson(); |
|
|
|
cartSkuItem.buyNum += count; |
|
|
|
cartSkuItem.buyNum += count; |
|
|
|
cartSkuItem.selected = 0; |
|
|
|
cartSkuItem.selected = selected; |
|
|
|
|
|
|
|
shopCarTemp["selected"] = selected; |
|
|
|
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; |
|
|
|
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; |
|
|
|
BaseData<List<ShoppingCart>> baseDate = |
|
|
|
BaseData<List<ShoppingCart>> baseDate = |
|
|
|
await minService.shoppingCartSingle(shopCarTemp); |
|
|
|
await minService.shoppingCartSingle(shopCarTemp); |
|
|
@ -428,7 +429,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage> |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
onTap: (){ |
|
|
|
onTap: (){ |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
shopCarGoods[0].shoppingCartSkuItemList[index].selected = (shopCarGoods[0].shoppingCartSkuItemList[index].selected == 1) ? 1 : 0; |
|
|
|
shopCarGoods[0].shoppingCartSkuItemList[index].selected = (shopCarGoods[0].shoppingCartSkuItemList[index].selected == 0) ? 1 : 0; |
|
|
|
shopCartAdd(shopCarGoods[0].shoppingCartSkuItemList[index],0,shopCarGoods[0].shoppingCartSkuItemList[index].selected); |
|
|
|
shopCartAdd(shopCarGoods[0].shoppingCartSkuItemList[index],0,shopCarGoods[0].shoppingCartSkuItemList[index].selected); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|