From dd6fdd9bcff3c2b3dcebdb0db3f80bc9dd469bc4 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Thu, 25 Dec 2025 10:00:15 +0800
Subject: [PATCH] 1.	添加滚动效果 2.	修复供应方无法开通权限

---
 admin/app/api/model/plus/release/SupplyProject.php |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/admin/app/api/model/plus/release/SupplyProject.php b/admin/app/api/model/plus/release/SupplyProject.php
index e22e939..6122f8a 100644
--- a/admin/app/api/model/plus/release/SupplyProject.php
+++ b/admin/app/api/model/plus/release/SupplyProject.php
@@ -33,7 +33,7 @@
     /**
      * 新增记录
      */
-    public function add($postdata,$supply,$pay_price)
+    public function add($postdata,$supply,$pay_price,$publish_rewards)
     {
         $data = json_decode($postdata["formData"],true);
         if (empty($data['name'])) {
@@ -73,7 +73,7 @@
             $save_data["finish_time"] = '';
         }
 
-          return $this->transaction(function () use ($data, $save_data,$pay_price) {
+          return $this->transaction(function () use ($data, $save_data,$pay_price,$publish_rewards) {
             // 记录内容
             $this->save($save_data);
             // 记录图片
@@ -90,6 +90,11 @@
                     'describe' => "发布供应消耗连盟币",
                     'app_id' => $save_data['app_id'],
                 ]);
+
+            }
+            if($publish_rewards>0){
+                $user=(new UserModel())->where('user_id', '=', $save_data['user_id'])->find();
+                $user->setIncConsumption($publish_rewards,'发布供应奖励消费券');
             }
             
             return $this['project_id'];

--
Gitblit v1.9.2