| 1234567891011121314151617181920212223242526272829303132333435 | 
							- <?php
 
- namespace app\api\controller;
 
- use app\common\controller\Api;
 
- use think\Db;
 
- /**
 
-  * 话题中心
 
-  */
 
- class Topichub extends Api
 
- {
 
-     protected $noNeedLogin = [];
 
-     protected $noNeedRight = ['*'];
 
-     //话题列表
 
-     public function lists(){
 
-         $list = Db::name('topic_hub')->where('status',1)->order('weight desc,id desc')->autopage()->select();
 
-         $list = list_domain_image($list,['image']);
 
-         $this->success('success',$list);
 
-     }
 
-     //某个话题详情
 
-     public function info(){
 
-         $id   = input('id',0);
 
-         $info = Db::name('topic_hub')->where(['status'=>1,'id'=>$id])->find();
 
-         $info = info_domain_image($info,['image']);
 
-         $this->success('success',$info);
 
-     }
 
- }
 
 
  |