SchoolSpeciality.php 701 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\api\controller;
  3. use app\api\model\SchoolSpeciality as SchoolSpecialityModel;
  4. use think\response\Json;
  5. /**
  6. * 学校专业控制器
  7. * Class SchoolSpeciality
  8. * @package app\api\controller
  9. */
  10. class SchoolSpeciality extends Controller
  11. {
  12. /**
  13. * 学校列表
  14. * @return \think\response\Json
  15. * @throws \think\db\exception\DbException
  16. */
  17. public function list()
  18. {
  19. // 获取列表数据
  20. $model = new SchoolSpecialityModel;
  21. $pageSize = $this->request->param('pageSize', 12);
  22. $list = $model->getList($this->request->param(), $pageSize);
  23. return $this->renderSuccess(compact('list'));
  24. }
  25. }