wupengfei 2 năm trước cách đây
mục cha
commit
d82f7b46bd
2 tập tin đã thay đổi với 45 bổ sung5 xóa
  1. 43 0
      application/api/controller/UserLeave.php
  2. 2 5
      config/apidoc.php

+ 43 - 0
application/api/controller/UserLeave.php

@@ -0,0 +1,43 @@
+<?php
+namespace app\api\controller;
+use app\common\model\LeaveType;
+use think\Db;
+use app\common\model\User;
+/**
+ * @title 员工请假管理
+ * @controller UserLeave
+ * @group base
+ */
+class UserLeave extends Base
+{
+    public function initialize()
+    {
+        parent::initialize();
+        parent::checkLogin();
+    }
+
+    /**
+     * @title 获取请假类型
+     * @desc 个人信息
+     * @author qc
+     * @url /api/User_leave/getLeaveType
+     * @method GET
+     * @tag 个人信息
+     * @header name:Authorization require:1 desc:Token
+     * @return name:id type:int default:-- desc:会员id
+     * @return name:title type:int default:-- desc:类型
+     */
+    public function getLeaveType()
+    {
+        $field = 'id,title';
+        $user_info = LeaveType::field($field)->where('status',1)->where('is_deleted',0)->select()->toArray();
+        $this->success('获取成功',['detail'=>$user_info]);
+    }
+
+
+
+
+
+}
+
+

+ 2 - 5
config/apidoc.php

@@ -6,16 +6,13 @@ return [
     'copyright'=>'Powered By HG',
     //生成文档的控制器
     'controllers' => [
-        'api\\controller\\Appointment',
         'api\\controller\\Area',
-        'api\\controller\\Expedite',
-        'api\\controller\\General',
         'api\\controller\\Login',
         'api\\controller\\Mall',
-        'api\\controller\\Order',
         'api\\controller\\Upload',
         'api\\controller\\UserCenter',
-        'api\\controller\\WashOrder',
+        'api\\controller\\UserLeave',
+
     ],
     // 指定公共注释定义的文件地址