xuxueyang
2024-07-30 badafedccb814258fa54156b558458fa04191f8d
sub_pages/customer/shop/shop.vue
@@ -315,6 +315,13 @@
            }
            if (!item.shopnum) {
               item.shopnum = 0
            }
            if (!item.stock) {
               item.stock = 0
            }
            if (item.shopnum + addnum > item.stock) {
               this.$message.showToast('库存不足,无法添加')
               return
            }
            if (item.shopnum + addnum >= 0) {
@@ -332,9 +339,9 @@
            })
            this.$message.hideLoading()
            if (code === 0) {
               item.shopnum += addnum
               item.shopnum += addnum
               this.$forceUpdate()
            }
            this.$forceUpdate()
         },
      }