前端页面下载:
1.public下面下载apidoc文件,public下面的apidoc下面的config.js的HOSTS的连接可能自带,需要的话改一下。
2.后端下载终端文件:composer require hg/apidoc-thinkphp,下载完页面还是不对php think再run一下
注意事项:api接口设密去config文件
修改文件:
config下面刚下载的 apidoc.php的文件改需要的参数
地址:http://192.168.10.52:8033/api-doc/index.html#/home
解决办法:重新看下api-doc下载包,更新前后有出入
除了添加title 还要引入use这两个东西 :
use EasyAdmin\annotation\ControllerAnnotation;
use EasyAdmin\annotation\NodeAnotation;
https://hg-code.gitee.io/thinkphp-apidoc/use/
use hg\apidoc\annotation as Apidoc;api控制器别忘了引入这个use
注意:线上的public目录下的apidoc文档不能传到线上