//$category_names = Db::name('category')->where('id','in',$article['category_ids'])->column('name');
//$this->view->assign('category_names',$category_names);
$article['content'] = str_replace('<br>', '',$article['content']);
$article['content'] = str_replace('src="../uploads','src="/uploads',$article['content']);
$article['content'] = str_replace('<span style="font-size: 18px; line-height: 36px;"><br></span>', '',$article['content']);
$article['content'] = str_replace('<span style="font-size: 14px;"><br></span>', '',$article['content']);
$this->view->assign('article',$article);
$this->view->assign('title',isset($article['seotitle'])?$article['seotitle']:$article['title']);
//相关专题处理
if(!$this->redis->has('topic_'.$id))
{
$topics = Db::name('topic')->field('id,title')->where("article_ids like '%$id%'")->select();
$this->redis->set('topic_'.$id,$topics,186400);
}else{
$topics = $this->redis->get('topic_'.$id);
id | 56169 |
module_name | index |
article | { "content": "" } |
condition | keywords like "%%" |
related | [ { "id": 94718, "title": "\u6b63\u5f0f\u8fc8\u8fdb5G-A\u65f6\u4ee3 \u4e0a\u6d77\u79fb\u52a8\u503e\u529b\u6253\u9020\u5168\u74035G-A\u5546\u7528\u9886\u5148\u57ce\u5e02\uff01", "image": "http:\/\/image.cfyys.com.cn\/17117065398815132559183b.jpeg", "publish_time": 1711706544 }, { "id": 94716, "title": "\u96c5\u8fea2023\u5e74\u770b\u4f3c\u5f88\u8d5a\u94b1\u5374\u6bdb\u5229\u7387\u4e0b\u6ed1\u6709\u9690\u5fe7? \u9020\u6c7d\u8f66\u662f\u8bef\u4f20", "image": "http:\/\/image.cfyys.com.cn\/17117059129935c93c6c211b.jpeg", "publish_time": 1711705978 }, { "id": 94715, "title": "\u5c0f\u725b\u7535\u52a8\u8f662023\u5e74\u76ee\u6807\u53c8\u6ca1\u8fbe\u6210\u53cd\u800c\u9500\u91cf\u5927\u964d CEO\u674e\u5f66\u53c8\u8ba2\u65b0\u76ee\u6807", "image": "http:\/\/image.cfyys.com.cn\/171170549541090e44c30323.jpeg", "publish_time": 1711705542 }, { "id": 94714, "title": "\u76d8\u70b9\u4e2d\u56fd\u79fb\u52a8\u7701\u516c\u53f8\u5e02\u573a\u90e8\u603b\u7ecf\u7406\uff1a\u8fd9\u5bb6\u5f53\u5730\u5e02\u573a\u4efd\u989d\u6bd4\u4e0d\u4e0a\u8054\u901a", "image": "http:\/\/image.cfyys.com.cn\/17117050951770583de87636.jpeg", "publish_time": 1711705177 } ] |