Jiuyezixun.php 777 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 就业咨询
  7. */
  8. class Jiuyezixun extends Api
  9. {
  10. protected $noNeedLogin = ['*'];
  11. protected $noNeedRight = ['*'];
  12. public function lists(){
  13. $type = input('type',0,'intval');
  14. $list = Db::name('jiuyezixun')->field('id,title,image,updatetime')
  15. ->where('type',$type)->where('status',1)
  16. ->order('weigh','desc')->autopage()->select();
  17. $list = list_domain_image($list,['image']);
  18. $this->success(1,$list);
  19. }
  20. public function detail(){
  21. $id = input('id');
  22. $info = Db::name('jiuyezixun')->where('id',$id)->find();
  23. $info = info_domain_image($info,['image']);
  24. $this->success(1,$info);
  25. }
  26. }