|
...
|
...
|
@@ -28,13 +28,14 @@ class AiBlogLogic extends BaseLogic |
|
|
|
* @time :2023/7/5 14:46
|
|
|
|
*/
|
|
|
|
public function blogSave(){
|
|
|
|
if(!empty($this->param['image'])){
|
|
|
|
$this->param['image'] = str_replace_url($this->param['image']);
|
|
|
|
}
|
|
|
|
$this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']);
|
|
|
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('error');
|
|
|
|
try {
|
|
|
|
if(!empty($this->param['image'])){
|
|
|
|
$this->param['image'] = str_replace_url($this->param['image']);
|
|
|
|
}
|
|
|
|
$this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']);
|
|
|
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('保存失败,请联系管理员');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
...
|
...
|
|