Menu.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2025 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types=1);
  12. namespace app\store\controller\store;
  13. use think\response\Json;
  14. use app\store\controller\Controller;
  15. use app\store\model\store\Menu as MenuModel;
  16. /**
  17. * 商家后台菜单管理
  18. * Class Menu
  19. * @package app\store\controller\store
  20. */
  21. class Menu extends Controller
  22. {
  23. /**
  24. * 菜单列表
  25. * @return Json
  26. * @throws \think\db\exception\DataNotFoundException
  27. * @throws \think\db\exception\DbException
  28. * @throws \think\db\exception\ModelNotFoundException
  29. */
  30. public function list(): Json
  31. {
  32. $model = new MenuModel;
  33. $list = $model->getList();
  34. return $this->renderSuccess(compact('list'));
  35. }
  36. }