正在显示
5 个修改的文件
包含
68 行增加
和
41 行删除
| @@ -83,7 +83,7 @@ class Common | @@ -83,7 +83,7 @@ class Common | ||
| 83 | $data = [ | 83 | $data = [ |
| 84 | 'messages'=>[ | 84 | 'messages'=>[ |
| 85 | ['role'=>'system','content'=>$info['scene']], | 85 | ['role'=>'system','content'=>$info['scene']], |
| 86 | - ['role'=>'assistant','content'=>$content.$str], | 86 | + ['role'=>'user','content'=>$content.$str], |
| 87 | ] | 87 | ] |
| 88 | ]; | 88 | ]; |
| 89 | return http_post($url,json_encode($data)); | 89 | return http_post($url,json_encode($data)); |
| @@ -5,7 +5,9 @@ namespace App\Http\Controllers\Aside; | @@ -5,7 +5,9 @@ namespace App\Http\Controllers\Aside; | ||
| 5 | 5 | ||
| 6 | use App\Enums\Common\Code; | 6 | use App\Enums\Common\Code; |
| 7 | use App\Http\Logic\Aside\LoginLogic; | 7 | use App\Http\Logic\Aside\LoginLogic; |
| 8 | +use App\Models\Domain\DomainInfo; | ||
| 8 | use App\Models\Manage\Manage; | 9 | use App\Models\Manage\Manage; |
| 10 | +use App\Models\Project\Project; | ||
| 9 | use App\Models\Sms\SmsLog; | 11 | use App\Models\Sms\SmsLog; |
| 10 | use App\Rules\Mobile; | 12 | use App\Rules\Mobile; |
| 11 | use Illuminate\Http\Request; | 13 | use Illuminate\Http\Request; |
| @@ -99,4 +101,29 @@ class LoginController extends BaseController | @@ -99,4 +101,29 @@ class LoginController extends BaseController | ||
| 99 | $this->response('success'); | 101 | $this->response('success'); |
| 100 | } | 102 | } |
| 101 | 103 | ||
| 104 | + public function ceshi(){ | ||
| 105 | + $projectModel = new Project(); | ||
| 106 | + $info = $projectModel->with('payment')->with('deploy_build') | ||
| 107 | + ->with('deploy_optimize')->where(['id'=>1])->first()->toArray(); | ||
| 108 | + $url = 'https://form.globalso.com/api/globalsov6'; | ||
| 109 | + $data = [ | ||
| 110 | + 'id' => $info['from_order_id'], | ||
| 111 | + 'company_name'=>$info['company'], | ||
| 112 | + 'token'=>md5($info['from_order_id'].'qqs'.date('Y-m-d')), | ||
| 113 | + ]; | ||
| 114 | + if(!empty($info['mobile'])){ | ||
| 115 | + $data['mobile'] = $info['mobile']; | ||
| 116 | + } | ||
| 117 | + if(!empty($info['deploy_optimize']['domain'])){ | ||
| 118 | + $domainModel = new DomainInfo(); | ||
| 119 | + $data['main_url'] = $domainModel->getDomain($info['deploy_optimize']['domain']); | ||
| 120 | + } | ||
| 121 | + if($info['deploy_build']['test_domain']){ | ||
| 122 | + $data['test_url'] = $info['deploy_build']['test_domain']; | ||
| 123 | + } | ||
| 124 | + $header = array( | ||
| 125 | + "charset=utf-8" | ||
| 126 | + ); | ||
| 127 | + return http_post($url,$data,$header); | ||
| 128 | + } | ||
| 102 | } | 129 | } |
| @@ -669,31 +669,5 @@ class ProjectController extends BaseController | @@ -669,31 +669,5 @@ class ProjectController extends BaseController | ||
| 669 | $this->response('success',Code::SUCCESS,$lists); | 669 | $this->response('success',Code::SUCCESS,$lists); |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | - /** | ||
| 673 | - * @remark :A端同步项目信息 | ||
| 674 | - * @name :syncProjectDetails | ||
| 675 | - * @author :lyh | ||
| 676 | - * @method :post | ||
| 677 | - * @time :2023/10/26 14:32 | ||
| 678 | - */ | ||
| 679 | - public function syncProjectDetails($project_id){ | ||
| 680 | - $projectModel = new Project(); | ||
| 681 | - $info = $projectModel->with('payment')->with('deploy_build') | ||
| 682 | - ->with('deploy_optimize')->where(['id'=>$project_id])->first()->toArray(); | ||
| 683 | - $url = 'https://form.globalso.com/api/globalsov6'; | ||
| 684 | - $data = [ | ||
| 685 | - 'id' => $info['from_order_id'], | ||
| 686 | - 'company_name'=>$info['company'], | ||
| 687 | - 'emails'=> '', | ||
| 688 | - 'phones'=>$info['mobile'], | ||
| 689 | - 'plan'=>Project::planMap()[$info['plan']], | ||
| 690 | - 'main_url'=>$info['domain'], | ||
| 691 | - 'test_url'=>$info['test_domain'], | ||
| 692 | - 'token'=>md5($info['from_order_id'].'qqs'.date('Y-m-d')), | ||
| 693 | - ]; | ||
| 694 | - $header = array( | ||
| 695 | - "charset=utf-8" | ||
| 696 | - ); | ||
| 697 | - return http_post($url,$data,$header); | ||
| 698 | - } | 672 | + |
| 699 | } | 673 | } |
| @@ -12,7 +12,7 @@ use App\Models\Ai\AiLog; | @@ -12,7 +12,7 @@ use App\Models\Ai\AiLog; | ||
| 12 | class AiCommandController extends BaseController | 12 | class AiCommandController extends BaseController |
| 13 | { | 13 | { |
| 14 | //获取文本内容 | 14 | //获取文本内容 |
| 15 | - public $chat_url = 'v2/openai_chat'; | 15 | + public $chat_url = 'v2/openai_chat_qqs'; |
| 16 | /** | 16 | /** |
| 17 | * @name :ai生成 | 17 | * @name :ai生成 |
| 18 | * @author :liyuhang | 18 | * @author :liyuhang |
| @@ -114,6 +114,10 @@ class ProjectLogic extends BaseLogic | @@ -114,6 +114,10 @@ class ProjectLogic extends BaseLogic | ||
| 114 | //创建站点 | 114 | //创建站点 |
| 115 | $this->createSite($this->param); | 115 | $this->createSite($this->param); |
| 116 | } | 116 | } |
| 117 | + //同步项目数据到询盘系统(完成建站后同步数据) | ||
| 118 | + if(in_array($this->map['type'], [Project::TYPE_TWO, Project::TYPE_THREE])){ | ||
| 119 | + $this->syncProjectDetails($this->param['id']); | ||
| 120 | + } | ||
| 117 | DB::commit(); | 121 | DB::commit(); |
| 118 | }catch (\Exception $e){ | 122 | }catch (\Exception $e){ |
| 119 | DB::rollBack(); | 123 | DB::rollBack(); |
| @@ -264,18 +268,6 @@ class ProjectLogic extends BaseLogic | @@ -264,18 +268,6 @@ class ProjectLogic extends BaseLogic | ||
| 264 | if($param['type'] == Project::TYPE_ONE){ | 268 | if($param['type'] == Project::TYPE_ONE){ |
| 265 | //改为异步 | 269 | //改为异步 |
| 266 | NoticeLog::createLog(NoticeLog::TYPE_INIT_PROJECT, ['project_id' => $param['id']]); | 270 | NoticeLog::createLog(NoticeLog::TYPE_INIT_PROJECT, ['project_id' => $param['id']]); |
| 267 | -// //初始化数据库 | ||
| 268 | -// if(isset($param['mysql_id']) && !empty($param['mysql_id'])){ | ||
| 269 | -// $this->initializationMysql($param['id']); | ||
| 270 | -// } | ||
| 271 | -// //初始账号 | ||
| 272 | -// if(isset($param['mobile']) && !empty($param['mobile'])){ | ||
| 273 | -// $this->createUser($param['mobile'],$param['id'],$param['lead_name']); | ||
| 274 | -// } | ||
| 275 | -// //更改服务器状态 | ||
| 276 | -// if(isset($param['serve_id']) && !empty($param['serve_id'])){ | ||
| 277 | -// $this->updateServe($param['serve_id']); | ||
| 278 | -// } | ||
| 279 | } | 271 | } |
| 280 | return $this->success(); | 272 | return $this->success(); |
| 281 | } | 273 | } |
| @@ -523,4 +515,38 @@ class ProjectLogic extends BaseLogic | @@ -523,4 +515,38 @@ class ProjectLogic extends BaseLogic | ||
| 523 | } | 515 | } |
| 524 | } | 516 | } |
| 525 | } | 517 | } |
| 518 | + | ||
| 519 | + /** | ||
| 520 | + * @remark :A端同步项目信息 | ||
| 521 | + * @name :syncProjectDetails | ||
| 522 | + * @author :lyh | ||
| 523 | + * @method :post | ||
| 524 | + * @time :2023/10/26 14:32 | ||
| 525 | + */ | ||
| 526 | + public function syncProjectDetails($project_id){ | ||
| 527 | + $projectModel = new Project(); | ||
| 528 | + $info = $projectModel->with('payment')->with('deploy_build') | ||
| 529 | + ->with('deploy_optimize')->where(['id'=>$project_id])->first()->toArray(); | ||
| 530 | + $url = 'https://form.globalso.com/api/globalsov6'; | ||
| 531 | + $data = [ | ||
| 532 | + 'id' => $info['from_order_id'], | ||
| 533 | + 'company_name'=>$info['company'], | ||
| 534 | + 'token'=>md5($info['from_order_id'].'qqs'.date('Y-m-d')), | ||
| 535 | + ]; | ||
| 536 | + if(!empty($info['mobile'])){ | ||
| 537 | + $data['mobile'] = $info['mobile']; | ||
| 538 | + } | ||
| 539 | + if(!empty($info['deploy_optimize']['domain'])){ | ||
| 540 | + $domainModel = new DomainInfo(); | ||
| 541 | + $data['main_url'] = $domainModel->getDomain($info['deploy_optimize']['domain']); | ||
| 542 | + } | ||
| 543 | + if($info['deploy_build']['test_domain']){ | ||
| 544 | + $data['test_url'] = $info['deploy_build']['test_domain']; | ||
| 545 | + } | ||
| 546 | + $header = array( | ||
| 547 | + "charset=utf-8" | ||
| 548 | + ); | ||
| 549 | + return http_post($url,$data,$header); | ||
| 550 | + } | ||
| 551 | + | ||
| 526 | } | 552 | } |
-
请 注册 或 登录 后发表评论