From 04102f7237efefa744090ed7c25f7b5d0807b679 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Thu, 05 Feb 2026 18:11:57 +0800
Subject: [PATCH] 完成运营中心提现和运营中心权限管理

---
 admin/app/api/controller/plus/operations/Cash.php |   62 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/admin/app/api/controller/plus/operations/Cash.php b/admin/app/api/controller/plus/operations/Cash.php
new file mode 100644
index 0000000..938e7f6
--- /dev/null
+++ b/admin/app/api/controller/plus/operations/Cash.php
@@ -0,0 +1,62 @@
+<?php
+
+namespace app\api\controller\plus\operations;
+
+use app\api\controller\Controller;
+use app\api\model\plus\operations\Setting;
+use app\api\model\plus\operations\Operations as operationsUserModel;
+use app\api\model\plus\operations\Cash as CashModel;
+
+/**
+ * 队长提现
+ */
+class Cash extends Controller
+{
+    private $user;
+
+    private $operations;
+    private $setting;
+
+    /**
+     * 构造方法
+     */
+    public function initialize()
+    {
+        // 用户信息
+        $this->user = $this->getUser();
+        // 队长用户信息
+        $this->operations = operationsUserModel::detail($this->user['user_id']);
+        // 队长设置
+        $this->setting = Setting::getAll();
+    }
+
+    /**
+     * 提交提现申请
+     */
+    public function submit($data)
+    {
+        $formData = json_decode(htmlspecialchars_decode($data), true);
+
+        $model = new CashModel;
+        if ($model->submit($this->operations, $formData)) {
+            return $this->renderSuccess('申请提现成功');
+        }
+        return $this->renderError($model->getError() ?: '提交失败');
+    }
+
+    /**
+     * 队长提现明细
+     */
+    public function lists($status = -1)
+    {
+
+        $model = new CashModel;
+        return $this->renderSuccess('', [
+            // 提现明细列表
+            'list' => $model->getList($this->user['user_id'], (int)$status,$this->postData()),
+            // 页面文字
+            'words' => $this->setting['words']['values'],
+        ]);
+    }
+
+}
\ No newline at end of file

--
Gitblit v1.9.2