From e4233b5c4e123c4b79a38d0a9b0c8b60631e1683 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期二, 30 七月 2024 10:40:24 +0800 Subject: [PATCH] update --- sub_pages/customer/shop/shop.vue | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/sub_pages/customer/shop/shop.vue b/sub_pages/customer/shop/shop.vue index 166571f..8808e70 100644 --- a/sub_pages/customer/shop/shop.vue +++ b/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) { -- Gitblit v1.9.3