作者 lyh

gx创建作者

@@ -45,7 +45,7 @@ class AiBlogLogic extends BaseLogic @@ -45,7 +45,7 @@ class AiBlogLogic extends BaseLogic
45 * @time :2023/7/5 14:46 45 * @time :2023/7/5 14:46
46 */ 46 */
47 public function blogSave(){ 47 public function blogSave(){
48 -// try { 48 + try {
49 if(!empty($this->param['image'])){ 49 if(!empty($this->param['image'])){
50 $this->param['image'] = str_replace_url($this->param['image']); 50 $this->param['image'] = str_replace_url($this->param['image']);
51 } 51 }
@@ -56,9 +56,9 @@ class AiBlogLogic extends BaseLogic @@ -56,9 +56,9 @@ class AiBlogLogic extends BaseLogic
56 $aiBlogService->mch_id = $aiSettingInfo['mch_id']; 56 $aiBlogService->mch_id = $aiSettingInfo['mch_id'];
57 $aiBlogService->key = $aiSettingInfo['key']; 57 $aiBlogService->key = $aiSettingInfo['key'];
58 $aiBlogService->updateDetail(['title'=>$this->param['new_title'],'thumb'=>$this->param['image'],'route'=>$this->param['route'],'author_id'=>$this->param['author_id']]); 58 $aiBlogService->updateDetail(['title'=>$this->param['new_title'],'thumb'=>$this->param['image'],'route'=>$this->param['route'],'author_id'=>$this->param['author_id']]);
59 -// }catch (\Exception $e){  
60 -// $this->fail('保存失败,请联系管理员');  
61 -// } 59 + }catch (\Exception $e){
  60 + $this->fail('保存失败,请联系管理员');
  61 + }
62 return $this->success(); 62 return $this->success();
63 } 63 }
64 64
@@ -70,7 +70,7 @@ class AiBlogLogic extends BaseLogic @@ -70,7 +70,7 @@ class AiBlogLogic extends BaseLogic
70 * @time :2025/2/21 14:46 70 * @time :2025/2/21 14:46
71 */ 71 */
72 public function saveBlogAuthor(){ 72 public function saveBlogAuthor(){
73 - try { 73 +// try {
74 $aiAuthorModel = new AiBlogAuthor(); 74 $aiAuthorModel = new AiBlogAuthor();
75 if(!empty($this->param['image'])){ 75 if(!empty($this->param['image'])){
76 $this->param['image'] = str_replace_url($this->param['image']); 76 $this->param['image'] = str_replace_url($this->param['image']);
@@ -79,9 +79,9 @@ class AiBlogLogic extends BaseLogic @@ -79,9 +79,9 @@ class AiBlogLogic extends BaseLogic
79 $aiAuthorModel->edit($this->param,['id'=>$this->param['id']]); 79 $aiAuthorModel->edit($this->param,['id'=>$this->param['id']]);
80 $aiBlogService = new AiBlogService(); 80 $aiBlogService = new AiBlogService();
81 $aiBlogService->updateAuthorInfo(['author_id'=>$this->param['author_id'],'title'=>$this->param['title'],'picture'=>$this->param['image'],'description'=>$this->param['description']]); 81 $aiBlogService->updateAuthorInfo(['author_id'=>$this->param['author_id'],'title'=>$this->param['title'],'picture'=>$this->param['image'],'description'=>$this->param['description']]);
82 - }catch (\Exception $e){  
83 - $this->fail('保存失败,请联系管理员');  
84 - } 82 +// }catch (\Exception $e){
  83 +// $this->fail('保存失败,请联系管理员');
  84 +// }
85 return $this->success(); 85 return $this->success();
86 } 86 }
87 87