Platform.php 787 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\api\controller;
  3. use think\Db;
  4. use fast\Tree;
  5. use app\common\controller\Api;
  6. /**
  7. * 首页接口
  8. */
  9. class Platform extends Api
  10. {
  11. protected $noNeedLogin = ['*'];
  12. protected $noNeedRight = ['*'];
  13. public function index()
  14. {
  15. $config=$this->config();
  16. $configs=config('site');
  17. $map['ishot']=2;
  18. $map['endtimesjc']=['>',time()];
  19. if(input('uid',0)>0){
  20. $map['uid']=input('uid');
  21. }
  22. $list = model('Platform')
  23. ->with('users')
  24. ->where($map)
  25. ->limit(10)
  26. ->select();
  27. $data=['config'=>$config,'doctor'=>$list];
  28. $this->success('请求成功',$data);
  29. }
  30. public function test(){
  31. $this->success('请求成功');
  32. }
  33. }