$base = model('newbase')->base('4','2','0');
$this->assign('seo', $base['seo']);
$this->assign('plug', $base['swt']);
$this->assign('basic', $base['tel']);
return $this->fetch();
}
//获取关键词搜索列表
public function getNewsResult($request)
{
$id = $request['id'];
$pageSize = '10';
//搜索所有含有关键词id的资讯id
$newsData = db('newnews')->field('id,keywords,title,push_time,look_num,old,image,content,description')->where("is_del='0' and type!='9' and type!='2' and is_show='1' and find_in_set('$id',keywords)")->order('push_time', 'DESC')->paginate($pageSize,false,[
'path'=>'/index/news/article_result/id/'.$id.'/page/[PAGE].html#test',
]);
$newsList = $newsData->toArray();
$result = model('newbase')->getNewsData($newsList['data']);
$result = ['id' => $id, 'newsList' => $result,'newsData'=>$newsData];
return $result;