Topichub.php 848 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 话题中心
  7. */
  8. class Topichub extends Api
  9. {
  10. protected $noNeedLogin = [];
  11. protected $noNeedRight = ['*'];
  12. //圈子广场,全部圈子
  13. public function lists(){
  14. $list = Db::name('topic_hub')->where('status',1)->order('weight desc,id desc')->autopage()->select();
  15. $list = list_domain_image($list,['image']);
  16. $this->success('success',$list);
  17. }
  18. //某个圈子详情
  19. public function info(){
  20. $id = input('id',0);
  21. $info = Db::name('topic_hub')->where(['status'=>1,'id'=>$id])->find();
  22. $info = info_domain_image($info,['image']);
  23. $this->success('success',$info);
  24. }
  25. //某个圈子里的动态列表,全部,最新,最热
  26. //放到 topicdongtai.php里了
  27. }