Zhengcejiedu.php 722 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 政策解读
  7. */
  8. class Zhengcejiedu extends Api
  9. {
  10. protected $noNeedLogin = ['*'];
  11. protected $noNeedRight = ['*'];
  12. public function lists(){
  13. $list = Db::name('zhengcejiedu')->field('id,title,image,updatetime')->where('status',1)->order('weigh','desc')->select();
  14. $list = list_domain_image($list,['image']);
  15. $this->success(1,$list);
  16. }
  17. public function detail(){
  18. $id = input('id');
  19. $info = Db::name('zhengcejiedu')->where('id',$id)->find();
  20. $info = info_domain_image($info,['image','audio_file','video_file','video_image']);
  21. $this->success(1,$info);
  22. }
  23. }