|
...
|
...
|
@@ -224,4 +224,27 @@ class OptimizeController extends BaseController |
|
|
|
}
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :设置开关
|
|
|
|
* @name :setRobots
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/11/20 9:42
|
|
|
|
*/
|
|
|
|
public function setRobots(){
|
|
|
|
$this->request->validate([
|
|
|
|
'robots'=>'required',
|
|
|
|
'project_id'=>'required',
|
|
|
|
],[
|
|
|
|
'robots.required' => 'robots不能为空',
|
|
|
|
'project_id.required' => 'project_id不能为空',
|
|
|
|
]);
|
|
|
|
$projectModel = new Project();
|
|
|
|
$rs = $projectModel->edit(['robots'=>$this->param['robots']],['project_id'=>$this->param['project_id']]);
|
|
|
|
if($rs === false){
|
|
|
|
$this->response('系统错误,请联系管理员',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|