Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
4 个修改的文件
包含
9 行增加
和
18 行删除
| @@ -272,7 +272,7 @@ class ProjectLogic extends BaseLogic | @@ -272,7 +272,7 @@ class ProjectLogic extends BaseLogic | ||
| 272 | $company = $param['company'] ?? ''; | 272 | $company = $param['company'] ?? ''; |
| 273 | $company_en_name = $param['deploy_optimize']['company_en_name'] ?? ''; | 273 | $company_en_name = $param['deploy_optimize']['company_en_name'] ?? ''; |
| 274 | $company_en_description = $param['deploy_optimize']['company_en_description'] ?? ''; | 274 | $company_en_description = $param['deploy_optimize']['company_en_description'] ?? ''; |
| 275 | - if($is_ai_blog == 1 || $is_ai_video){ | 275 | + if($is_ai_blog == 1 || $is_ai_video == 1){ |
| 276 | if(empty($main_lang_id) || empty($company) || empty($company_en_name) || empty($company_en_description)){ | 276 | if(empty($main_lang_id) || empty($company) || empty($company_en_name) || empty($company_en_description)){ |
| 277 | $this->fail('开启ai博客/视频功能--请填写主语种+公司名称+公司英文名称+公司英文介绍'); | 277 | $this->fail('开启ai博客/视频功能--请填写主语种+公司名称+公司英文名称+公司英文介绍'); |
| 278 | } | 278 | } |
| @@ -57,12 +57,14 @@ class AiBlogLogic extends BaseLogic | @@ -57,12 +57,14 @@ class AiBlogLogic extends BaseLogic | ||
| 57 | $this->param['image'] = str_replace_url($this->param['image']); | 57 | $this->param['image'] = str_replace_url($this->param['image']); |
| 58 | } | 58 | } |
| 59 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_BLOG, $this->param['id'], $this->user['project_id']); | 59 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_BLOG, $this->param['id'], $this->user['project_id']); |
| 60 | + $anchor = $this->param['anchor'] ?? []; | ||
| 61 | + $this->param['anchor'] = json_encode($this->param['anchor'],true); | ||
| 60 | $this->model->edit($this->param,['id'=>$this->param['id']]); | 62 | $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 61 | $aiSettingInfo = $this->getProjectAiSetting(); | 63 | $aiSettingInfo = $this->getProjectAiSetting(); |
| 62 | $aiBlogService = new AiBlogService(); | 64 | $aiBlogService = new AiBlogService(); |
| 63 | $aiBlogService->mch_id = $aiSettingInfo['mch_id']; | 65 | $aiBlogService->mch_id = $aiSettingInfo['mch_id']; |
| 64 | $aiBlogService->key = $aiSettingInfo['key']; | 66 | $aiBlogService->key = $aiSettingInfo['key']; |
| 65 | - $aiBlogService->updateDetail(['task_id'=>$this->param['task_id'],'title'=>$this->param['new_title'],'thumb'=>$this->param['image'],'route'=>$this->param['route'],'author_id'=>$this->param['author_id']]); | 67 | + $aiBlogService->updateDetail(['task_id'=>$this->param['task_id'],'title'=>$this->param['new_title'],'thumb'=>$this->param['image'],'route'=>$this->param['route'],'author_id'=>$anchor]); |
| 66 | }catch (\Exception $e){ | 68 | }catch (\Exception $e){ |
| 67 | $this->fail('保存失败,请联系管理员'); | 69 | $this->fail('保存失败,请联系管理员'); |
| 68 | } | 70 | } |
| @@ -29,21 +29,6 @@ class AiVideoLogic extends BaseLogic | @@ -29,21 +29,6 @@ class AiVideoLogic extends BaseLogic | ||
| 29 | $this->model = new AiVideo(); | 29 | $this->model = new AiVideo(); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | - /** | ||
| 33 | - * @remark :获取配置信息 | ||
| 34 | - * @name :getProjectAiSetting | ||
| 35 | - * @author :lyh | ||
| 36 | - * @method :post | ||
| 37 | - * @time :2025/2/21 14:51 | ||
| 38 | - */ | ||
| 39 | - public function getProjectAiSetting(){ | ||
| 40 | - $projectAiSettingModel = new ProjectAiSetting(); | ||
| 41 | - $aiSettingInfo = $projectAiSettingModel->read(['project_id'=>$this->user['project_id']]); | ||
| 42 | - if($aiSettingInfo === false){ | ||
| 43 | - $this->fail('请先联系管理员开启Ai配置'); | ||
| 44 | - } | ||
| 45 | - return $aiSettingInfo; | ||
| 46 | - } | ||
| 47 | 32 | ||
| 48 | /** | 33 | /** |
| 49 | * @remark :ai发布博客 | 34 | * @remark :ai发布博客 |
| @@ -55,10 +40,13 @@ class AiVideoLogic extends BaseLogic | @@ -55,10 +40,13 @@ class AiVideoLogic extends BaseLogic | ||
| 55 | public function videoSave(){ | 40 | public function videoSave(){ |
| 56 | try { | 41 | try { |
| 57 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_VIDEO, $this->param['id'], $this->user['project_id']); | 42 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_VIDEO, $this->param['id'], $this->user['project_id']); |
| 43 | + $anchor = $this->param['anchor'] ?? []; | ||
| 44 | + $this->param['anchor'] = json_encode($this->param['anchor'],true); | ||
| 45 | + $this->param['images'] = json_encode($this->param['images'],true); | ||
| 58 | $this->model->edit($this->param,['id'=>$this->param['id']]); | 46 | $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 59 | $aiVideoService = new AiVideoService($this->user['project_id']); | 47 | $aiVideoService = new AiVideoService($this->user['project_id']); |
| 60 | $aiVideoService->updateDetail(['task_id'=>$this->param['task_id'],'title'=>$this->param['title'], | 48 | $aiVideoService->updateDetail(['task_id'=>$this->param['task_id'],'title'=>$this->param['title'], |
| 61 | - 'content'=>$this->param['content'] ?? '','video_url'=>$this->param['video_url'],'thumb'=>$this->param['image'],'url'=>$this->param['route'],'author_id'=>$this->param['author_id']]); | 49 | + 'content'=>$this->param['content'] ?? '','video_url'=>$this->param['video_url'],'anchor'=>$anchor,'thumb'=>$this->param['image'],'url'=>$this->param['route'],'author_id'=>$this->param['author_id']]); |
| 62 | }catch (\Exception $e){ | 50 | }catch (\Exception $e){ |
| 63 | $this->fail('保存失败,请联系管理员'); | 51 | $this->fail('保存失败,请联系管理员'); |
| 64 | } | 52 | } |
| @@ -157,6 +157,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -157,6 +157,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 157 | Route::any('/', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'lists'])->name('ai_video_lists'); | 157 | Route::any('/', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'lists'])->name('ai_video_lists'); |
| 158 | Route::any('/getInfo', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'getInfo'])->name('ai_video_getInfo'); | 158 | Route::any('/getInfo', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'getInfo'])->name('ai_video_getInfo'); |
| 159 | Route::any('/sendTask', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'sendTask'])->name('ai_video_sendTask'); | 159 | Route::any('/sendTask', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'sendTask'])->name('ai_video_sendTask'); |
| 160 | + Route::any('/save', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'save'])->name('ai_video_save'); | ||
| 160 | Route::any('/del', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'delete'])->name('ai_video_delete'); | 161 | Route::any('/del', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'delete'])->name('ai_video_delete'); |
| 161 | }); | 162 | }); |
| 162 | //ai | 163 | //ai |
-
请 注册 或 登录 后发表评论