|
...
|
...
|
@@ -45,7 +45,7 @@ class AiBlogLogic extends BaseLogic |
|
|
|
* @time :2023/7/5 14:46
|
|
|
|
*/
|
|
|
|
public function blogSave(){
|
|
|
|
// try {
|
|
|
|
try {
|
|
|
|
if(!empty($this->param['image'])){
|
|
|
|
$this->param['image'] = str_replace_url($this->param['image']);
|
|
|
|
}
|
|
...
|
...
|
@@ -56,9 +56,9 @@ class AiBlogLogic extends BaseLogic |
|
|
|
$aiBlogService->mch_id = $aiSettingInfo['mch_id'];
|
|
|
|
$aiBlogService->key = $aiSettingInfo['key'];
|
|
|
|
$aiBlogService->updateDetail(['title'=>$this->param['new_title'],'thumb'=>$this->param['image'],'route'=>$this->param['route'],'author_id'=>$this->param['author_id']]);
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// $this->fail('保存失败,请联系管理员');
|
|
|
|
// }
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('保存失败,请联系管理员');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -70,7 +70,7 @@ class AiBlogLogic extends BaseLogic |
|
|
|
* @time :2025/2/21 14:46
|
|
|
|
*/
|
|
|
|
public function saveBlogAuthor(){
|
|
|
|
try {
|
|
|
|
// try {
|
|
|
|
$aiAuthorModel = new AiBlogAuthor();
|
|
|
|
if(!empty($this->param['image'])){
|
|
|
|
$this->param['image'] = str_replace_url($this->param['image']);
|
|
...
|
...
|
@@ -79,9 +79,9 @@ class AiBlogLogic extends BaseLogic |
|
|
|
$aiAuthorModel->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
$aiBlogService = new AiBlogService();
|
|
|
|
$aiBlogService->updateAuthorInfo(['author_id'=>$this->param['author_id'],'title'=>$this->param['title'],'picture'=>$this->param['image'],'description'=>$this->param['description']]);
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('保存失败,请联系管理员');
|
|
|
|
}
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// $this->fail('保存失败,请联系管理员');
|
|
|
|
// }
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|