作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !3135
@@ -512,12 +512,7 @@ class ProjectController extends BaseController @@ -512,12 +512,7 @@ class ProjectController extends BaseController
512 */ 512 */
513 public function info(ProjectLogic $logic) 513 public function info(ProjectLogic $logic)
514 { 514 {
515 - $this->request->validate([  
516 - 'id' => 'required'  
517 - ], [  
518 - 'id.required' => 'ID不能为空'  
519 - ]);  
520 - $data = $logic->getProjectInfo($this->param['id']); 515 + $data = $logic->getProjectInfo($this->param);
521 $this->response('success', Code::SUCCESS, $data); 516 $this->response('success', Code::SUCCESS, $data);
522 } 517 }
523 518
@@ -86,9 +86,12 @@ class ProjectLogic extends BaseLogic @@ -86,9 +86,12 @@ class ProjectLogic extends BaseLogic
86 * @method :post 86 * @method :post
87 * @time :2023/7/28 17:11 87 * @time :2023/7/28 17:11
88 */ 88 */
89 - public function getProjectInfo($id){ 89 + public function getProjectInfo($id = ''){
  90 + if(!empty($id)){
  91 + $this->param['id'] = $id;
  92 + }
90 $info = $this->model->with(['payment', 'deploy_build', 'deploy_optimize', 'online_check', 93 $info = $this->model->with(['payment', 'deploy_build', 'deploy_optimize', 'online_check',
91 - 'project_after','inquiry_filter_config','web_traffic_config','project_keyword'])->where(['id'=>$id])->first()->toArray(); 94 + 'project_after','inquiry_filter_config','web_traffic_config','project_keyword'])->where($this->param)->first()->toArray();
92 $info['online_check']['name'] = (new Manage())->getName($info['online_check']['created_manage_id'] ?? 0); 95 $info['online_check']['name'] = (new Manage())->getName($info['online_check']['created_manage_id'] ?? 0);
93 $info['init_domain'] = $this->getInitDomain($info['serve_id'])['domain']; 96 $info['init_domain'] = $this->getInitDomain($info['serve_id'])['domain'];
94 if($info['extend_type'] != 0){ 97 if($info['extend_type'] != 0){
@@ -116,13 +119,13 @@ class ProjectLogic extends BaseLogic @@ -116,13 +119,13 @@ class ProjectLogic extends BaseLogic
116 } 119 }
117 //is_product:"0",is_news:"0",is_blogs:"0",is_module:"0" 120 //is_product:"0",is_news:"0",is_blogs:"0",is_module:"0"
118 //获取小语种 121 //获取小语种
119 - $info['minor_languages'] = $this->getProjectMinorLanguages($id); 122 + $info['minor_languages'] = $this->getProjectMinorLanguages($info['id']);
120 //升级项目采集完成时间 123 //升级项目采集完成时间
121 - $info['collect_time'] = $info['is_upgrade'] ? UpdateLog::getProjectUpdate($id) : ''; 124 + $info['collect_time'] = $info['is_upgrade'] ? UpdateLog::getProjectUpdate($info['id']) : '';
122 //升级项目采集的测试站域名 125 //升级项目采集的测试站域名
123 - $info['collect_test_domain'] = $info['is_upgrade'] ? CollectLog::getCollectTestDomain($id) : ''; 126 + $info['collect_test_domain'] = $info['is_upgrade'] ? CollectLog::getCollectTestDomain($info['id']) : '';
124 //获取项目所属行业 127 //获取项目所属行业
125 - $info['deploy_optimize']['industry'] = ProjectIndustryRelated::where('project_id', $id)->pluck('industry_id')->toArray(); 128 + $info['deploy_optimize']['industry'] = ProjectIndustryRelated::where('project_id', $info['id'])->pluck('industry_id')->toArray();
126 return $this->success($info); 129 return $this->success($info);
127 } 130 }
128 131