Browse Source

预约商品数量更改

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

6
lib/store/store_order.dart

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

6
lib/store/store_view/product_sku.dart

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

Loading…
Cancel
Save