From 64cbe2329308ffd9c16ca935ea5c6250fdee7661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Fri, 16 Dec 2022 16:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E5=90=8E=E5=8F=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E4=BB=A3=E7=A0=81=EF=BC=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/adminapi/controller/v1/user/User.php | 78 +++++++------------ 1 file changed, 26 insertions(+), 52 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/user/User.php b/crmeb/app/adminapi/controller/v1/user/User.php index 9387d9486..db138eb9b 100644 --- a/crmeb/app/adminapi/controller/v1/user/User.php +++ b/crmeb/app/adminapi/controller/v1/user/User.php @@ -15,7 +15,6 @@ use app\adminapi\controller\AuthController; use think\exception\ValidateException; use think\facade\App; - class User extends AuthController { /** @@ -30,21 +29,8 @@ class User extends AuthController } /** - * 显示资源列表头部 - * - * @return \think\Response - */ - public function type_header() - { - $list = $this->services->typeHead(); - return app('json')->success(compact('list')); - } - - - /** - * 显示资源列表 - * - * @return \think\Response + * 用户列表 + * @return mixed */ public function index() { @@ -75,9 +61,9 @@ class User extends AuthController } /** - * 显示创建资源表单页. - * - * @return \think\Response + * 添加用户表单 + * @return mixed + * @throws \FormBuilder\Exception\FormBuilderException */ public function create() { @@ -86,7 +72,7 @@ class User extends AuthController /** * 添加编辑用户信息时候的信息 - * @param int $uid + * @param $uid * @return mixed * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException @@ -99,10 +85,9 @@ class User extends AuthController } /** - * 保存新建的资源 - * - * @param \think\Request $request - * @return \think\Response + * 保存新建用户 + * @return mixed + * @throws \think\Exception */ public function save() { @@ -180,10 +165,9 @@ class User extends AuthController } /** - * 显示指定的资源 - * - * @param int $id - * @return \think\Response + * 获取用户账户详情 + * @param $id + * @return mixed */ public function read($id) { @@ -194,21 +178,21 @@ class User extends AuthController } /** - * 赠送会员等级 - * @param int $uid + * 赠送会员等级表单 + * @param $id * @return mixed - * */ + */ public function give_level($id) { if (!$id) return app('json')->fail(100100); return app('json')->success($this->services->giveLevel((int)$id)); } - /* + /** * 执行赠送会员等级 - * @param int $uid + * @param $id * @return mixed - * */ + */ public function save_give_level($id) { if (!$id) return app('json')->fail(100100); @@ -219,21 +203,21 @@ class User extends AuthController } /** - * 赠送付费会员时长 - * @param int $uid + * 赠送付费会员时长表单 + * @param $id * @return mixed - * */ + */ public function give_level_time($id) { if (!$id) return app('json')->fail(100100); return app('json')->success($this->services->giveLevelTime((int)$id)); } - /* + /** * 执行赠送付费会员时长 - * @param int $uid + * @param $id * @return mixed - * */ + */ public function save_give_level_time($id) { if (!$id) return app('json')->fail(100100); @@ -245,8 +229,8 @@ class User extends AuthController /** * 清除会员等级 - * @param int $uid - * @return json + * @param $id + * @return mixed */ public function del_level($id) { @@ -256,12 +240,7 @@ class User extends AuthController /** * 设置会员分组 - * @param $id * @return mixed - * @throws \FormBuilder\Exception\FormBuilderException - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException */ public function set_group() { @@ -274,7 +253,6 @@ class User extends AuthController /** * 保存会员分组 - * @param $id * @return mixed */ public function save_set_group() @@ -292,10 +270,6 @@ class User extends AuthController /** * 设置用户标签 * @return mixed - * @throws \FormBuilder\Exception\FormBuilderException - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException */ public function set_label() {