Browse Source

预约商品数量更改

new_revision_app
wurong 2 years ago
parent
commit
2cfa9818f6
  1. 6
      lib/store/store_order.dart
  2. 26
      lib/store/store_view/product_sku.dart

6
lib/store/store_order.dart

@ -859,12 +859,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
// EasyLoading.dismiss(); // EasyLoading.dismiss();
if (baseDate != null && baseDate.isSuccess) { if (baseDate != null && baseDate.isSuccess) {
this.shopCarGoods = await queryShopCar(); this.shopCarGoods = await queryShopCar();
if ((miNiDetail.subscribeParam.isEnableSubscribe ?? false) == true){ if ((miNiDetail.subscribeParam.isEnableSubscribe ?? false) == true)
if(count > 1 && miNiDetail.attrList != null && miNiDetail.attrStyle != 0){
Navigator.of(context).pop();
}
toDownOrder(); toDownOrder();
}
setState(() {}); setState(() {});
} else { } else {
SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center); SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center);

26
lib/store/store_view/product_sku.dart

@ -240,9 +240,11 @@ class _ProductSku extends State<ProductSku> {
onTap: () async { onTap: () async {
if(count == 1) if(count == 1)
return; return;
_isTapEd = true; if((widget?.miNiDetail?.subscribeParam?.isEnableSubscribe ?? false) == false){
EasyLoading.show(status: S.current.zhengzaijiazai); _isTapEd = true;
await widget.reduce(widget.miNiDetail, selectSkus); EasyLoading.show(status: S.current.zhengzaijiazai);
await widget.reduce(widget.miNiDetail, selectSkus);
}
count -= 1; count -= 1;
setState(() {}); setState(() {});
EasyLoading.dismiss(); EasyLoading.dismiss();
@ -266,13 +268,15 @@ class _ProductSku extends State<ProductSku> {
), ),
InkWell( InkWell(
onTap: () async { onTap: () async {
_isTapEd = true; if((widget?.miNiDetail?.subscribeParam?.isEnableSubscribe ?? false) == false){
EasyLoading.show(status: S.current.zhengzaijiazai); _isTapEd = true;
if (count == 1 && realCount == 0) EasyLoading.show(status: S.current.zhengzaijiazai);
await widget.addShopCar( if (count == 1 && realCount == 0)
widget.miNiDetail, selectSkus, 2); await widget.addShopCar(
else widget.miNiDetail, selectSkus, 2);
await widget.add(widget.miNiDetail, selectSkus); else
await widget.add(widget.miNiDetail, selectSkus);
}
count += 1; count += 1;
setState(() {}); setState(() {});
EasyLoading.dismiss(); EasyLoading.dismiss();
@ -302,7 +306,7 @@ class _ProductSku extends State<ProductSku> {
Navigator.of(context).pop(); Navigator.of(context).pop();
// SmartDialog.dismiss(); // SmartDialog.dismiss();
if (!_isTapEd) if (!_isTapEd)
widget.addShopCar(widget.miNiDetail, selectSkus, 1); widget.addShopCar(widget.miNiDetail, selectSkus,((widget?.miNiDetail?.subscribeParam?.isEnableSubscribe ?? false) == false) ? 1 : count);
}, },
), ),
if (widget.buttonType == 1) if (widget.buttonType == 1)

Loading…
Cancel
Save