正在显示
3 个修改的文件
包含
43 行增加
和
0 行删除
| @@ -817,11 +817,41 @@ class ProjectController extends BaseController | @@ -817,11 +817,41 @@ class ProjectController extends BaseController | ||
| 817 | * @time :2023/11/17 15:23 | 817 | * @time :2023/11/17 15:23 |
| 818 | */ | 818 | */ |
| 819 | public function saveOtherProject(ProjectLogic $logic){ | 819 | public function saveOtherProject(ProjectLogic $logic){ |
| 820 | + $this->request->validate([ | ||
| 821 | + 'id'=>'required', | ||
| 822 | + 'aicc'=>'required', | ||
| 823 | + 'hagro'=>'required', | ||
| 824 | + 'exclusive_aicc_day'=>'required', | ||
| 825 | + 'exclusive_hagro_day'=>'required', | ||
| 826 | + ],[ | ||
| 827 | + 'id.required' => 'id不能为空', | ||
| 828 | + 'aicc.required' => 'aicc是否开启不能为空', | ||
| 829 | + 'hagro.required' => 'hagro是否开启不能为空', | ||
| 830 | + 'exclusive_aicc_day.required' => '服务天数不能为空', | ||
| 831 | + 'exclusive_hagro_day.required' => '服务天数不能为空', | ||
| 832 | + ]); | ||
| 820 | $logic->saveOtherProject(); | 833 | $logic->saveOtherProject(); |
| 821 | $this->response('success'); | 834 | $this->response('success'); |
| 822 | } | 835 | } |
| 823 | 836 | ||
| 824 | /** | 837 | /** |
| 838 | + * @remark :获取其他项目配置 | ||
| 839 | + * @name :getOtherProject | ||
| 840 | + * @author :lyh | ||
| 841 | + * @method :post | ||
| 842 | + * @time :2023/11/17 15:23 | ||
| 843 | + */ | ||
| 844 | + public function getOtherProject(ProjectLogic $logic){ | ||
| 845 | + $this->request->validate([ | ||
| 846 | + 'id'=>'required', | ||
| 847 | + ],[ | ||
| 848 | + 'id.required' => 'id不能为空', | ||
| 849 | + ]); | ||
| 850 | + $info = $logic->getOtherProject(); | ||
| 851 | + $this->response('success',Code::SUCCESS,$info); | ||
| 852 | + } | ||
| 853 | + | ||
| 854 | + /** | ||
| 825 | * @remark :获取渠道信息 | 855 | * @remark :获取渠道信息 |
| 826 | * @name :getChannel | 856 | * @name :getChannel |
| 827 | * @author :lyh | 857 | * @author :lyh |
| @@ -710,4 +710,16 @@ class ProjectLogic extends BaseLogic | @@ -710,4 +710,16 @@ class ProjectLogic extends BaseLogic | ||
| 710 | return $this->success($this->param); | 710 | return $this->success($this->param); |
| 711 | } | 711 | } |
| 712 | 712 | ||
| 713 | + /** | ||
| 714 | + * @remark :获取其他配置 | ||
| 715 | + * @name :getOtherProject | ||
| 716 | + * @author :lyh | ||
| 717 | + * @method :post | ||
| 718 | + * @time :2023/11/21 15:45 | ||
| 719 | + */ | ||
| 720 | + public function getOtherProject(){ | ||
| 721 | + $info = $this->model->read(['id'=>$this->param['id']],['aicc','hagro','exclusive_aicc_day','exclusive_hagro_day']); | ||
| 722 | + return $this->success($info); | ||
| 723 | + } | ||
| 724 | + | ||
| 713 | } | 725 | } |
| @@ -172,6 +172,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -172,6 +172,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 172 | Route::any('/copyProject', [Aside\Project\ProjectController::class, 'copyProject'])->name('admin.project_copyProject'); | 172 | Route::any('/copyProject', [Aside\Project\ProjectController::class, 'copyProject'])->name('admin.project_copyProject'); |
| 173 | Route::any('/site_token', [Aside\Project\ProjectController::class, 'site_token'])->name('admin.project_site_token'); | 173 | Route::any('/site_token', [Aside\Project\ProjectController::class, 'site_token'])->name('admin.project_site_token'); |
| 174 | Route::any('/saveOtherProject', [Aside\Project\ProjectController::class, 'saveOtherProject'])->name('admin.project_saveOtherProject');//其他项目设置 | 174 | Route::any('/saveOtherProject', [Aside\Project\ProjectController::class, 'saveOtherProject'])->name('admin.project_saveOtherProject');//其他项目设置 |
| 175 | + Route::any('/getOtherProject', [Aside\Project\ProjectController::class, 'getOtherProject'])->name('admin.project_getOtherProject');//获取其他项目设置 | ||
| 175 | Route::any('/getChannel', [Aside\Project\ProjectController::class, 'getChannel'])->name('admin.project_getChannel');//其他项目设置 | 176 | Route::any('/getChannel', [Aside\Project\ProjectController::class, 'getChannel'])->name('admin.project_getChannel');//其他项目设置 |
| 176 | //获取关键词前缀和后缀 | 177 | //获取关键词前缀和后缀 |
| 177 | Route::prefix('keyword')->group(function () { | 178 | Route::prefix('keyword')->group(function () { |
-
请 注册 或 登录 后发表评论