|
...
|
...
|
@@ -179,16 +179,15 @@ class BlogLogic extends BaseLogic |
|
|
|
public function paramProcessing($param){
|
|
|
|
if(isset($this->param['id'])){
|
|
|
|
$param['operator_id'] = $this->user['id'];
|
|
|
|
if(isset($param['category_id']) && !empty($param['category_id'])){
|
|
|
|
$param['category_id'] = $this->getCategory($param['category_id']);
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$param['create_id'] = $this->user['id'];
|
|
|
|
$param['operator_id'] = $this->user['id'];
|
|
|
|
$param['project_id'] = $this->user['project_id'];
|
|
|
|
if(isset($param['category_id']) && !empty($param['category_id'])){
|
|
|
|
$param['category_id'] = $this->getCategory($param['category_id']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(isset($param['category_id']) && !empty($param['category_id'])){
|
|
|
|
$param['category_id'] = $this->getCategory($param['category_id']);
|
|
|
|
}else{
|
|
|
|
$param['category_id'] = '';
|
|
|
|
}
|
|
|
|
return $this->success($param);
|
|
|
|
}
|
|
...
|
...
|
@@ -201,11 +200,8 @@ class BlogLogic extends BaseLogic |
|
|
|
* @time :2023/10/20 9:02
|
|
|
|
*/
|
|
|
|
public function getCategory($category){
|
|
|
|
$str = '';
|
|
|
|
foreach ($category as $v){
|
|
|
|
$str .= $v.',';
|
|
|
|
}
|
|
|
|
return !empty(trim($str,',')) ? ','.$str.',' : '';
|
|
|
|
$str = implode(',',$category);
|
|
|
|
return !empty(trim(trim($str,','),',')) ? ','.$str.',' : '';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|