field('id, cover_image, images, name, createtime') ->order('weigh desc') ->paginate(15, true); $this->success('', ['list' => $list]); } /** * 详情 */ public function detail() { if (!$id = input('id/d', '0')) { $this->error('缺少资讯ID'); } if (!$news = NewsModel::where('id', $id)->where('status', CommonStatus::NORMAL)->find()) { $this->error('资讯信息不存在'); } $this->success('', $news); } }