Dict.php 967 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace app\admin\controller;
  3. use app\admin\common\AdminController;
  4. use app\common\api\DictApi;
  5. /**
  6. * Description of Dict
  7. *
  8. * @author sgq
  9. */
  10. class Dict extends AdminController {
  11. /**
  12. * @auth {{/dict}}
  13. * @return type
  14. */
  15. public function index() {
  16. return view();
  17. }
  18. /**
  19. * @auth {{/dict/list}}
  20. * @return type
  21. */
  22. public function list() {
  23. $res = DictApi::getList($this->request);
  24. return json($res);
  25. }
  26. /**
  27. * @auth {{/dict/add}}
  28. * @return type
  29. */
  30. public function add() {
  31. if ($this->request->isPost()) {
  32. return json(DictApi::create($this->request->param()));
  33. }
  34. return view();
  35. }
  36. /**
  37. * @auth {{/dict/update}}
  38. * @return type
  39. */
  40. public function edit() {
  41. return view();
  42. }
  43. /**
  44. * @auth {{/dict/delete}}
  45. * @return type
  46. */
  47. public function delete() {
  48. }
  49. }