//$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 | 61412 |
module_name | index |
article | { "content": "" } |
condition | keywords like "%%" |
related | [ { "id": 94706, "title": "\u5e73\u5b89\u4eba\u5bff\u5e7f\u897f\u4e0b\u5c5e\u4e2d\u652f\u516c\u53f8\u4eca\u5e74\u5df2\u88ab\u7f5a\u8d8515\u4e07 \u603b\u7ecf\u7406\u5218\u5929\u4e1c\u5173\u6ce8\u5417\uff1f", "image": "http:\/\/image.cfyys.com.cn\/171169630615417436a0aed6.jpeg", "publish_time": 1711696317 }, { "id": 94704, "title": "\u602a\u517d\u5145\u7535\u4e0a\u5e02\u4e09\u5e74\u6765\u9996\u6b21\u5206\u7ea2800\u4e07\u7f8e\u5143\u591a\u5417\uff1f CEO\u8521\u5149\u6e0a\u80fd\u5206\u5f97\u591a\u5c11\uff1f", "image": "http:\/\/image.cfyys.com.cn\/17116949367325c41c838adb.jpeg", "publish_time": 1711694976 }, { "id": 94699, "title": "\u8499\u725b\u603b\u88c1\u5362\u654f\u653e\u4e1a\u7ee9\u4e0d\u9519\u5374\u4e3a\u4f55\u5378\u4efb\uff1f\u4eca\u5e7455\u5c81\u5e74\u9f84\u4e5f\u4e0d\u7b97\u5927\u5440 ", "image": "http:\/\/image.cfyys.com.cn\/17116832241180095e1a54b.jpeg", "publish_time": 1711683331 }, { "id": 94696, "title": "1TB+\u72ec\u5bb6\u53cc\u6a21\u53cc\u5411\u536b\u661f\u901a\u4fe1 OPPO Find X7 Ultra \u536b\u661f\u901a\u4fe1\u7248\u9884\u552e\u5f00\u542f", "image": "http:\/\/image.cfyys.com.cn\/17116797751397e0d9bf337a.jpeg", "publish_time": 1711680087 } ] |