作者 lyh

gx

@@ -445,8 +445,8 @@ class NewsLogic extends BaseLogic @@ -445,8 +445,8 @@ class NewsLogic extends BaseLogic
445 @file_put_contents(storage_path('logs/lyh_error.log'), var_export($newsInfo, true) . PHP_EOL, FILE_APPEND); 445 @file_put_contents(storage_path('logs/lyh_error.log'), var_export($newsInfo, true) . PHP_EOL, FILE_APPEND);
446 $category_ids = explode(',',trim($newsInfo['category_id'],',')); 446 $category_ids = explode(',',trim($newsInfo['category_id'],','));
447 $category_ids_arr = array_values(array_unique(array_merge($category_ids,$this->param['category_id']))); 447 $category_ids_arr = array_values(array_unique(array_merge($category_ids,$this->param['category_id'])));
448 - $category_ids = ','.implode(',',$category_ids_arr).',';  
449 - $rs = $this->model->edit(['category_id'=>$category_ids],['id'=>$id]); 448 + $category_ids_str = ','.implode(',',$category_ids_arr).',';
  449 + $rs = $this->model->edit(['category_id'=>$category_ids_str],['id'=>$id]);
450 @file_put_contents(storage_path('logs/lyh_error.log'), var_export($rs, true) . PHP_EOL, FILE_APPEND); 450 @file_put_contents(storage_path('logs/lyh_error.log'), var_export($rs, true) . PHP_EOL, FILE_APPEND);
451 } 451 }
452 } 452 }