request); return json($res); } /** * @auth {{/dict/add}} * @return type */ public function add() { if ($this->request->isPost()) { return json(DictApi::create($this->request->param())); } return view(); } /** * @auth {{/dict/update}} * @return type */ public function edit() { if ($this->request->isPost()) { return json(DictApi::update($this->request->param())); } $dict = DictApi::getOne($this->request->param("id")); return view("", ["dict" => $dict]); } /** * @auth {{/dict/delete}} * @return type */ public function delete() { if ($this->request->isPost()) { return json(DictApi::delete($this->request->param("dictId"))); } } public function findChildDictByCode(){ return json(DictApi::findChildDictByCode($this->request->param("code"))); } }