AppIcon.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. use think\Db;
  6. class AppIcon extends Base
  7. {
  8. // 新增
  9. public function save(){
  10. model('AppIcon')->add();
  11. HelpHander::success([],'操作成功');
  12. }
  13. // 编辑
  14. public function update(){
  15. model('AppIcon')->add();
  16. HelpHander::success([],'操作成功');
  17. }
  18. // 详情
  19. public function detail(){
  20. $id = input('id/d',0);
  21. $ret = model('AppIcon')->info($id);
  22. HelpHander::success($ret);
  23. }
  24. // 列表
  25. public function list(){
  26. $page = input('page/d',1);
  27. $size = input('size/d',10);
  28. $ret = model('AppIcon')->lists($page,$size);
  29. HelpHander::success($ret);
  30. }
  31. // 删除
  32. public function del(){
  33. $id = input('id/d',0);
  34. model('AppIcon')->del($id);
  35. HelpHander::success([],'操作成功');
  36. }
  37. // 修改状态
  38. public function changeStatus(){
  39. $id = input('id/d',0);
  40. $enable = input('enable/d',0);
  41. model('AppIcon')->changeStatus($id,$enable);
  42. HelpHander::success([],'操作成功');
  43. }
  44. //APP常用功能icon列表
  45. public function queryUserAllIcon(){
  46. $page = input('page/d',1);
  47. $size = input('size/d',10);
  48. $ret = model('AppIcon')->queryUserAllIcon($page,$size,$this->userId,$this->orgId);
  49. HelpHander::success($ret);
  50. }
  51. }