作者 lyh

变更数据

@@ -18,7 +18,7 @@ class ProjectAssociationController extends BaseController @@ -18,7 +18,7 @@ class ProjectAssociationController extends BaseController
18 */ 18 */
19 public function save() 19 public function save()
20 { 20 {
21 - $project_id = (int)request()->post('project_id', 0); 21 + $project_id = $this->param['project_id'] ?? 0;
22 if (empty($project_id)) { 22 if (empty($project_id)) {
23 $this->response('请选择项目!', Code::USER_PARAMS_ERROE); 23 $this->response('请选择项目!', Code::USER_PARAMS_ERROE);
24 } 24 }
@@ -48,7 +48,7 @@ class ProjectAssociationController extends BaseController @@ -48,7 +48,7 @@ class ProjectAssociationController extends BaseController
48 */ 48 */
49 public function check() 49 public function check()
50 { 50 {
51 - $project_id = (int)request()->input('project_id', 0); 51 + $project_id = $this->param['project_id'] ?? 0;
52 if (empty($project_id)) { 52 if (empty($project_id)) {
53 $this->response('请输入项目信息!', Code::SERVER_ERROR); 53 $this->response('请输入项目信息!', Code::SERVER_ERROR);
54 } 54 }