quguofeng 2 سال پیش
والد
کامیت
6a37f22257
2فایلهای تغییر یافته به همراه5 افزوده شده و 13 حذف شده
  1. 3 10
      application/api/controller/Login.php
  2. 2 3
      config/apidoc.php

+ 3 - 10
application/api/controller/Login.php

@@ -4,17 +4,10 @@ use think\Db;
 use EasyWeChat\Factory;
 use think\facade\App;
 
-use hg\apidoc\annotation\Title;
-use hg\apidoc\annotation\Group;
-use hg\apidoc\annotation\Desc;
-use hg\apidoc\annotation\Author;
-use hg\apidoc\annotation\Url;
-use hg\apidoc\annotation\Tag;
-use hg\apidoc\annotation\Param;
-use hg\apidoc\annotation\Returned;
+use hg\apidoc\annotation as Apidoc;
 /**
- * @Login\Title("基础示例")
- * @Login\Sort(1)
+ * @Apidoc\Title("登录模块")
+ * @Apidoc\Group("api")
  */
 class Login extends Base
 {

+ 2 - 3
config/apidoc.php

@@ -13,10 +13,9 @@ return [
             'path'=>'app\api\controller',
             // (必须)唯一的key
             'key'=>'api',
-            'items'=>[
-                ['title'=>'钉钉OA','path'=>'app\api\controller','key'=>'v1'],
+            'groups' => [
+                ['title' => '接口', 'name' => 'api'],
             ],
-            'controllers'=>['app\controller\Login'],
         ]
     ],
     // (必须)指定通用注释定义的文件地址