作者 lyh

gx

... ... @@ -193,8 +193,11 @@ class BlogLogic extends BaseLogic
* @time :2023/10/20 9:02
*/
public function getCategory($category){
if(empty($category)){
return '';
}
$str = implode(',',$category);
return !empty(trim(trim($str,','),',')) ? ','.$str.',' : '';
return !empty(trim(trim($str,','),',')) ? ','.trim(trim($str,','),',').',' : '';
}
/**
... ...
... ... @@ -213,7 +213,7 @@ class NewsLogic extends BaseLogic
*/
public function getCategory($category){
$str = implode(',',$category);
return !empty(trim(trim($str,','),',')) ? ','.$str.',' : '';
return !empty(trim(trim($str,','),',')) ? ','.trim(trim($str,','),',').',' : '';
}
/**
... ...