Api文档
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
749 B

<?php
namespace Plugins\ApiDoc\Admin\Controller;
use App\Common\Util\Response;
use Plugins\ApiDoc\Admin\Service\ApiDocService;
/**
* 文档控制器
*
* Class DocumentController
*/
class DocumentController
{
/**
* @return string
*/
public function view(): string
{
return Response::render("plugins/ApiDoc/Document/view");
}
public function requestCode(): string
{
return Response::render("plugins/ApiDoc/Document/request_code");
}
/**
* 文档数据
*
* @return \think\Response
* @throws \Exception
*/
public function doc(): \think\Response
{
return Response::json()->success(
ApiDocService::aop(false)->get()
);
}
}