|
...
|
...
|
@@ -65,14 +65,15 @@ class NewsLogic extends BaseLogic |
|
|
|
try {
|
|
|
|
$this->param = $this->paramProcessing($this->param);
|
|
|
|
if (isset($this->param['id']) && !empty($this->param['id'])) {
|
|
|
|
$id = $this->param['id'];
|
|
|
|
$is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0
|
|
|
|
$six_read = $this->param['six_read'] ?? 0;//是否按6.0显示
|
|
|
|
if($is_upgrade == 0 || $six_read == 1) {
|
|
|
|
$this->param['url'] = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $this->param['id'], $this->user['project_id']);
|
|
|
|
$this->param['url'] = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $id, $this->user['project_id']);
|
|
|
|
}
|
|
|
|
//是否更新路由
|
|
|
|
$route = $this->param['url'];
|
|
|
|
$this->edit($this->param, ['id' => $this->param['id']]);
|
|
|
|
$this->edit($this->param, ['id' => $id]);
|
|
|
|
} else {
|
|
|
|
$this->param['sort'] = $this->setNewsSort();
|
|
|
|
$id = $this->model->addReturnId($this->param);
|
|
...
|
...
|
@@ -87,7 +88,7 @@ class NewsLogic extends BaseLogic |
|
|
|
}
|
|
|
|
$this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route);
|
|
|
|
$this->curlDelRoute(['new_route'=>$route]);
|
|
|
|
return $this->success();
|
|
|
|
return $this->success(['id'=>$id]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -227,10 +228,6 @@ class NewsLogic extends BaseLogic |
|
|
|
$str = ','.implode(',',$category).',';
|
|
|
|
}
|
|
|
|
return $str;
|
|
|
|
// foreach ($category as $v){
|
|
|
|
// $str .= $v.',';
|
|
|
|
// }
|
|
|
|
// return !empty(trim($str,',')) ? ','.$str.',' : '';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|