blog/app/controller/RoleMenuController.php
2024-06-08 15:54:41 +08:00

36 lines
730 B
PHP

<?php
namespace app\controller;
use app\service\RoleMenuService;
use app\util\Result;
use support\Request;
class RoleMenuController
{
/**
* @Inject
* @var Result
*/
private $result;
/**
* @Inject
* @var RoleMenuService
*/
private $roleMenuService;
protected $noNeedLogin = [];
public function save(Request $request)
{
$param = $request->post();
$info = $this->roleMenuService->save($param);
if ($info['result']) return json(retData($this->result::SUCCESS, $info['msg'], $info['data']));
return json(retData($this->result::ERROR, $info['msg']));
}
public function test()
{
return json(retData(0, 'ahahah'));
}
}