作者 lyh

gx

@@ -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);  
105 - if($info === false){  
106 - $this->fail('error');  
107 - }  
108 - //获取分类名称  
109 - $blogCategoryLogic = new BlogCategoryLogic();  
110 - $info = $blogCategoryLogic->get_category_name($info);  
111 - //获取标签名称  
112 - $blogLabelLogic = new BlogLabelLogic();  
113 - $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']);  
114 - $info['image_link'] = getImageUrl($info['image']);  
115 - //写入缓存  
116 - Common::set_user_cache($info,$this->model->getTable(),$this->param['id']); 101 + $info = $this->model->read($this->param);
  102 + if($info === false){
  103 + $this->fail('error');
117 } 104 }
  105 + $info['category_id'] = explode(',',trim($info['category_id'],','));
  106 + //获取标签名称
  107 + $blogLabelLogic = new BlogLabelLogic();
  108 + $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']);
  109 + $info['image_link'] = getImageUrl($info['image']);
118 return $this->success($info); 110 return $this->success($info);
119 } 111 }
120 112