|
...
|
...
|
@@ -167,7 +167,8 @@ class ProjectLogic extends BaseLogic |
|
|
|
//双向绑定服务器,需放到保存项目的上方
|
|
|
|
$this->setServers($this->param['serve_id'],$this->param['id']);
|
|
|
|
//ai_blog
|
|
|
|
$this->setAiBlog($this->param['id'],$this->param['main_lang_id'],$this->param['is_ai_blog'],$this->param['title']);
|
|
|
|
$this->setAiBlog($this->param['id'],$this->param['main_lang_id'],$this->param['is_ai_blog'],
|
|
|
|
$this->param['title'], $this->param['deploy_optimize']['company_en_name'],$this->param['deploy_optimize']['company_en_description']);
|
|
|
|
//保存项目信息
|
|
|
|
$this->saveProject($this->param);
|
|
|
|
//保存建站部署信息
|
|
...
|
...
|
@@ -202,7 +203,7 @@ class ProjectLogic extends BaseLogic |
|
|
|
* @method :post
|
|
|
|
* @time :2025/2/13 16:02
|
|
|
|
*/
|
|
|
|
public function setAiBlog($project_id,$main_lang_id,$is_ai_blog,$title){
|
|
|
|
public function setAiBlog($project_id,$main_lang_id,$is_ai_blog,$title,$company_en_name,$company_en_description){
|
|
|
|
if(empty($main_lang_id) || empty($is_ai_blog)){
|
|
|
|
return true;
|
|
|
|
}
|
|
...
|
...
|
@@ -217,7 +218,7 @@ class ProjectLogic extends BaseLogic |
|
|
|
$aiSettingInfo = $aiSettingModel->read(['project_id'=>$project_id]);
|
|
|
|
if($aiSettingInfo === false){
|
|
|
|
$aiBlogService = new AiBlogService();
|
|
|
|
$result = $aiBlogService->createProject($projectInfo['company'] ?? $title,$languageInfo['short'],$projectInfo['company']);
|
|
|
|
$result = $aiBlogService->createProject($projectInfo['company'] ?? $title,$languageInfo['short'],$company_en_description,$company_en_name);
|
|
|
|
if(isset($result['status']) && $result['status'] == 200){
|
|
|
|
//查看当前项目是否已有记录
|
|
|
|
$resData = [
|
|
...
|
...
|
@@ -234,7 +235,7 @@ class ProjectLogic extends BaseLogic |
|
|
|
$aiBlogService = new AiBlogService();
|
|
|
|
$aiBlogService->mch_id = $aiSettingInfo['mch_id'];
|
|
|
|
$aiBlogService->key = $aiSettingInfo['key'];
|
|
|
|
$aiBlogService->updatedProject($title,$languageInfo['short']);
|
|
|
|
$aiBlogService->updatedProject($title,$languageInfo['short'],$company_en_description,$company_en_name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
...
|
...
|
|