From b8961f178740f99ce54cfcbfd88235eaf8b79872 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Fri, 12 Dec 2025 18:59:02 +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