From 097a5f9e524acd965fa2abcfd18db30fc3f00ddb Mon Sep 17 00:00:00 2001
From: huangsijun <1773182001@qq.com>
Date: Thu, 11 Dec 2025 16:25:55 +0800
Subject: [PATCH] 修改阿里云上传的

---
 admin/app/api/controller/order/Cart.php |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/admin/app/api/controller/order/Cart.php b/admin/app/api/controller/order/Cart.php
index bcc605c..9c650db 100644
--- a/admin/app/api/controller/order/Cart.php
+++ b/admin/app/api/controller/order/Cart.php
@@ -70,6 +70,19 @@
         $product_num = $data['total_num'];
         $spec_sku_id = $data['spec_sku_id'];
         $model = $this->model;
+        $product = ProductModel::detail($product_id);
+        if ($product['is_newcomer'] == 1) {
+            return $this->renderError('新人专区商品不能加入购物车');
+        }
+        if ($product['is_vip'] == 1) {
+            return $this->renderError('vip专区商品不能加入购物车');
+        }
+        if ($product['is_vip'] == 1) {
+            return $this->renderError('vip专区商品不能加入购物车');
+        }
+        if ($product['is_repurchase'] == 1) {
+            return $this->renderError('复购专区商品不能加入购物车');
+        }
         if (!$model->add($this->user, $product_id, $product_num, $spec_sku_id)) {
             return $this->renderError($model->getError() ?: '加入购物车失败');
         }

--
Gitblit v1.9.2