正在显示
1 个修改的文件
包含
1 行增加
和
9 行删除
| @@ -98,23 +98,15 @@ class BlogLogic extends BaseLogic | @@ -98,23 +98,15 @@ class BlogLogic extends BaseLogic | ||
| 98 | * @method | 98 | * @method |
| 99 | */ | 99 | */ |
| 100 | public function blogInfo(){ | 100 | public function blogInfo(){ |
| 101 | - //读取缓存 | ||
| 102 | - $info = Common::get_user_cache($this->model->getTable(),$this->param['id']); | ||
| 103 | - if(empty($info)){ | ||
| 104 | $info = $this->model->read($this->param); | 101 | $info = $this->model->read($this->param); |
| 105 | if($info === false){ | 102 | if($info === false){ |
| 106 | $this->fail('error'); | 103 | $this->fail('error'); |
| 107 | } | 104 | } |
| 108 | - //获取分类名称 | ||
| 109 | - $blogCategoryLogic = new BlogCategoryLogic(); | ||
| 110 | - $info = $blogCategoryLogic->get_category_name($info); | 105 | + $info['category_id'] = explode(',',trim($info['category_id'],',')); |
| 111 | //获取标签名称 | 106 | //获取标签名称 |
| 112 | $blogLabelLogic = new BlogLabelLogic(); | 107 | $blogLabelLogic = new BlogLabelLogic(); |
| 113 | $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']); | 108 | $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']); |
| 114 | $info['image_link'] = getImageUrl($info['image']); | 109 | $info['image_link'] = getImageUrl($info['image']); |
| 115 | - //写入缓存 | ||
| 116 | - Common::set_user_cache($info,$this->model->getTable(),$this->param['id']); | ||
| 117 | - } | ||
| 118 | return $this->success($info); | 110 | return $this->success($info); |
| 119 | } | 111 | } |
| 120 | 112 |
-
请 注册 或 登录 后发表评论