作者 lyh

gx

... ... @@ -817,11 +817,41 @@ class ProjectController extends BaseController
* @time :2023/11/17 15:23
*/
public function saveOtherProject(ProjectLogic $logic){
$this->request->validate([
'id'=>'required',
'aicc'=>'required',
'hagro'=>'required',
'exclusive_aicc_day'=>'required',
'exclusive_hagro_day'=>'required',
],[
'id.required' => 'id不能为空',
'aicc.required' => 'aicc是否开启不能为空',
'hagro.required' => 'hagro是否开启不能为空',
'exclusive_aicc_day.required' => '服务天数不能为空',
'exclusive_hagro_day.required' => '服务天数不能为空',
]);
$logic->saveOtherProject();
$this->response('success');
}
/**
* @remark :获取其他项目配置
* @name :getOtherProject
* @author :lyh
* @method :post
* @time :2023/11/17 15:23
*/
public function getOtherProject(ProjectLogic $logic){
$this->request->validate([
'id'=>'required',
],[
'id.required' => 'id不能为空',
]);
$info = $logic->getOtherProject();
$this->response('success',Code::SUCCESS,$info);
}
/**
* @remark :获取渠道信息
* @name :getChannel
* @author :lyh
... ...
... ... @@ -710,4 +710,16 @@ class ProjectLogic extends BaseLogic
return $this->success($this->param);
}
/**
* @remark :获取其他配置
* @name :getOtherProject
* @author :lyh
* @method :post
* @time :2023/11/21 15:45
*/
public function getOtherProject(){
$info = $this->model->read(['id'=>$this->param['id']],['aicc','hagro','exclusive_aicc_day','exclusive_hagro_day']);
return $this->success($info);
}
}
... ...
... ... @@ -172,6 +172,7 @@ Route::middleware(['aloginauth'])->group(function () {
Route::any('/copyProject', [Aside\Project\ProjectController::class, 'copyProject'])->name('admin.project_copyProject');
Route::any('/site_token', [Aside\Project\ProjectController::class, 'site_token'])->name('admin.project_site_token');
Route::any('/saveOtherProject', [Aside\Project\ProjectController::class, 'saveOtherProject'])->name('admin.project_saveOtherProject');//其他项目设置
Route::any('/getOtherProject', [Aside\Project\ProjectController::class, 'getOtherProject'])->name('admin.project_getOtherProject');//获取其他项目设置
Route::any('/getChannel', [Aside\Project\ProjectController::class, 'getChannel'])->name('admin.project_getChannel');//其他项目设置
//获取关键词前缀和后缀
Route::prefix('keyword')->group(function () {
... ...