From e1e2fe5710a5b5cd9c19bd3aa99c998a1a613ca8 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Sat, 17 Jan 2026 17:58:01 +0800
Subject: [PATCH] 团购组件增加筛选
---
admin/app/common/model/plus/vip/Apply.php | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/admin/app/common/model/plus/vip/Apply.php b/admin/app/common/model/plus/vip/Apply.php
index ac41bf6..ff683ba 100644
--- a/admin/app/common/model/plus/vip/Apply.php
+++ b/admin/app/common/model/plus/vip/Apply.php
@@ -79,7 +79,16 @@
}
// 判断商品是否在设置范围内
$intersect = array_intersect($productIds, $config['become__buy_product_ids']);
- if (empty($intersect)) {
+ $purchase_count=0;
+ foreach ($order['product'] as $product) {
+ // 检查商品是否是指定的分红商品
+ if (in_array($product['product_id'], $config['become__buy_product_ids'])||$product['is_vip']==1) {
+ // 获取商品数量
+ $quantity = $product['total_num'];
+ $purchase_count+=$quantity;
+ }
+ }
+ if ($purchase_count<=0){
return false;
}
--
Gitblit v1.9.2