From 33f004d1196d056b99a3886de070d429315bac39 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Thu, 11 Dec 2025 18:12:38 +0800
Subject: [PATCH] 将分类改为多选 修复活动报名 实现成为vip会员时根据活动报名信息绑定下级
---
admin/app/api/controller/order/Cart.php | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/admin/app/api/controller/order/Cart.php b/admin/app/api/controller/order/Cart.php
index bcc605c..81a51d7 100644
--- a/admin/app/api/controller/order/Cart.php
+++ b/admin/app/api/controller/order/Cart.php
@@ -70,6 +70,13 @@
$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_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