36 lines
730 B
PHP
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'));
|
|
}
|
|
} |