field('id, name')->select(); $this->success(1, $list); } public function newslist(){ $type_id = input('type_id',0); //是否屏蔽 $map = []; if($this->auth->isLogin()){ $screen_ids = Db::name('zzz_news_screen')->where('user_id',$this->auth->id)->column('news_id'); if(!empty($screen_ids)){ $map['id'] = ['NOTIN',$screen_ids]; } } $list = Db::name('zzz_news')->field('content',true)->where('type_id',$type_id)->where($map)->autopage()->select(); $list = list_domain_image($list,['image']); $this->success(1, $list); } public function newsinfo(){ $id = input('id',0); $info = Db::name('zzz_news')->where('id',$id)->find(); $info = info_domain_image($info,['image']); $this->success(1, $info); } //举报 public function report(){ $this->success('举报成功,客服人员即将处理'); } //不感兴趣 public function screen(){ $id = input('id',0); $data = [ 'news_id' => $id, 'user_id' => $this->auth->id, ]; Db::name('zzz_news_screen')->insertGetId($data); $this->success(); } }