Browse Source

清空购物车接口bug更改;

选规格弹窗异常处理;
加购物车数量优化;
清空购物车交互优化;
dart3
wurong 5 months ago
parent
commit
286583aa5e
  1. 5
      lib/store/store_view/product_sku.dart
  2. 5
      lib/store/store_view/shop_car.dart

5
lib/store/store_view/product_sku.dart

@ -86,7 +86,7 @@ class _ProductSku extends State<ProductSku> {
return PopScope( return PopScope(
canPop: true, canPop: true,
onPopInvoked: (isPop) { onPopInvoked: (isPop) {
Navigator.of(context).pop(); SmartDialog.dismiss();
}, },
child: StatefulBuilder(builder: (context1, state) { child: StatefulBuilder(builder: (context1, state) {
return Container( return Container(
@ -317,13 +317,14 @@ class _ProductSku extends State<ProductSku> {
backgroup: Color(0xFF32A060), backgroup: Color(0xFF32A060),
fontSize: 16.sp, fontSize: 16.sp,
callback: () { callback: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
// SmartDialog.dismiss(); // SmartDialog.dismiss();
if (!_isTapEd) if (!_isTapEd)
widget.addShopCar( widget.addShopCar(
widget.miNiDetail, widget.miNiDetail,
selectSkus, selectSkus,
(widget.miNiDetail.subscribeParam?.isEnableSubscribe ?? false) ? 1 : count); (widget.miNiDetail.subscribeParam?.isEnableSubscribe ?? false) ? 1 : (count >0? count :1));
}, },
), ),
if (widget.buttonType == 1) if (widget.buttonType == 1)

5
lib/store/store_view/shop_car.dart

@ -77,15 +77,16 @@ class _ShopCar extends State<ShopCar> {
), ),
), ),
InkWell( InkWell(
onTap: () { onTap: () async{
// widget.shopingCar?.shoppingCartSkuItemList?.clear(); // widget.shopingCar?.shoppingCartSkuItemList?.clear();
// state(() {}); // state(() {});
// widget.clearShopCar(); // widget.clearShopCar();
if (widget.shopingCar?.shoppingCartSkuItemList != null) { if (widget.shopingCar?.shoppingCartSkuItemList != null) {
widget.shopingCar?.shoppingCartSkuItemList?.clear(); widget.shopingCar?.shoppingCartSkuItemList?.clear();
} }
await widget.clearShopCar();
state(() {}); state(() {});
widget.clearShopCar(); SmartDialog.dismiss();
}, },
child: Image.asset( child: Image.asset(
"assets/image/delete.webp", "assets/image/delete.webp",

Loading…
Cancel
Save