基础功能、图片上传
This commit is contained in:
35
app/Http/Controllers/Api/MenuController.php
Executable file
35
app/Http/Controllers/Api/MenuController.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\BaseApp\BaseController;
|
||||
use App\Service\MenuService;
|
||||
|
||||
class MenuController extends BaseController
|
||||
{
|
||||
//
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->insertField = [ 'pid', 'title', 'icon', 'path', 'affix_tab', 'keep_alive', 'hide_in_menu', 'sort' ];
|
||||
$this->updateField = [ 'id', 'pid', 'title', 'icon', 'path', 'affix_tab', 'redirect', 'keep_alive', 'hide_in_menu', 'badge_variants', 'sort' ];
|
||||
$this->notRequest = [ 'name', 'badge', 'iframe_src', 'redirect', 'query', 'badge_type', 'badge_variants', 'component' ];
|
||||
$this->service = MenuService::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单树形下拉列表
|
||||
* @Method GET
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
*/
|
||||
public function getTreeOption()
|
||||
{
|
||||
$isSelect = request()->get('is_select', false);
|
||||
return jok(
|
||||
$this->service->getTreeOption($isSelect)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user