| 1234567891011121314151617181920212223242526272829303132333435 | 
							- <?php
 
- namespace app\api\controller;
 
- use app\common\controller\Api;
 
- use think\Db;
 
- /**
 
-  * 咨询新闻
 
-  */
 
- class News extends Api
 
- {
 
-     protected $noNeedLogin = ['*'];
 
-     protected $noNeedRight = ['*'];
 
-     public function lists(){
 
-         $list = Db::name('news')->field('content',true)->where('is_show',1)->order('weigh desc,id desc')->autopage()->select();
 
-         $list = list_domain_image($list,['image']);
 
-         $this->success('success',$list);
 
-     }
 
-     
 
-     public function info(){
 
-         $id = input('id',0);
 
-         if(!$id){
 
-             $this->error();
 
-         }
 
-         $info = Db::name('news')->where('id',$id)->find();
 
-         $info = info_domain_image($info,['image']);
 
-         $this->success('success',$info);
 
-     }
 
- }
 
 
  |