作者 lyh

gx

@@ -107,7 +107,7 @@ class BlogLogic extends BaseLogic @@ -107,7 +107,7 @@ class BlogLogic extends BaseLogic
107 foreach ($category as $v){ 107 foreach ($category as $v){
108 $this->getAllFather($v,$str); 108 $this->getAllFather($v,$str);
109 } 109 }
110 - $info['category_id'] = array_unique($str); 110 + $info['category_id'] = array_values(array_unique($str));
111 //获取标签名称 111 //获取标签名称
112 $blogLabelLogic = new BlogLabelLogic(); 112 $blogLabelLogic = new BlogLabelLogic();
113 $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']); 113 $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']);
@@ -157,7 +157,7 @@ class NewsLogic extends BaseLogic @@ -157,7 +157,7 @@ class NewsLogic extends BaseLogic
157 foreach ($category as $v){ 157 foreach ($category as $v){
158 $this->getAllFather($v,$str); 158 $this->getAllFather($v,$str);
159 } 159 }
160 - $info['category_id'] = array_unique($str); 160 + $info['category_id'] = array_values(array_unique($str));
161 $info['image_link'] = getImageUrl($info['image']); 161 $info['image_link'] = getImageUrl($info['image']);
162 return $this->success($info); 162 return $this->success($info);
163 } 163 }