From 69110c094343fa111eee75b0a56fef7dd7995f8a Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Tue, 25 Nov 2025 18:09:45 +0800
Subject: [PATCH] 修复优惠券点击立即使用弹出二维码问题 商家后台添加分销和超级分红 添加活动分享功能 添加商户提现功能
---
admin/app/common/model/plus/vip/Apply.php | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/admin/app/common/model/plus/vip/Apply.php b/admin/app/common/model/plus/vip/Apply.php
index e0d50db..ac41bf6 100644
--- a/admin/app/common/model/plus/vip/Apply.php
+++ b/admin/app/common/model/plus/vip/Apply.php
@@ -3,6 +3,8 @@
namespace app\common\model\plus\vip;
use app\common\model\BaseModel;
+use app\common\model\plus\agent\Referee as agentReferee;
+use app\common\model\plus\agent\User as agentUser;
use app\common\model\user\User as UserModel;
use app\common\model\plus\agent\Referee as AgentRefereeModel;
@@ -80,12 +82,18 @@
if (empty($intersect)) {
return false;
}
-
+
// 检查用户是否已经是VIP用户
if(User::isVipUser($userId)) {
return false;
}
-
+ //同时成为分销商
+ $referee_id = agentReferee::getRefereeUserId($userId, 1);
+
+ agentUser::add($userId, [
+ 'referee_id' => $referee_id,
+ 'app_id' => $appId,
+ ]);
// 新增VIP用户
User::add($userId, [
'referee_id' => AgentRefereeModel::getRefereeUserId($userId, 1),
--
Gitblit v1.9.2