正在显示
3 个修改的文件
包含
31 行增加
和
2 行删除
| @@ -71,4 +71,21 @@ class ProjectCountryController extends BaseController | @@ -71,4 +71,21 @@ class ProjectCountryController extends BaseController | ||
| 71 | $projectCountryLogic->country_custom_del(); | 71 | $projectCountryLogic->country_custom_del(); |
| 72 | $this->response('success'); | 72 | $this->response('success'); |
| 73 | } | 73 | } |
| 74 | + | ||
| 75 | + /** | ||
| 76 | + * 获取语种自定义跳转链接详情 | ||
| 77 | + * @param ProjectCountryLogic $projectCountryLogic | ||
| 78 | + * @author Akun | ||
| 79 | + * @date 2024/03/06 14:37 | ||
| 80 | + */ | ||
| 81 | + public function custom_info(ProjectCountryLogic $projectCountryLogic){ | ||
| 82 | + $this->request->validate([ | ||
| 83 | + 'language_id'=>'required' | ||
| 84 | + ],[ | ||
| 85 | + 'language_id.required' => 'language_id不能为空' | ||
| 86 | + ]); | ||
| 87 | + | ||
| 88 | + $info = $projectCountryLogic->country_custom_info(); | ||
| 89 | + $this->response('success',Code::SUCCESS,$info); | ||
| 90 | + } | ||
| 74 | } | 91 | } |
| @@ -31,8 +31,6 @@ class ProjectCountryLogic extends BaseLogic | @@ -31,8 +31,6 @@ class ProjectCountryLogic extends BaseLogic | ||
| 31 | $lists['country_lists'] = $this->countryListsFormat($lists['country_lists']); | 31 | $lists['country_lists'] = $this->countryListsFormat($lists['country_lists']); |
| 32 | $lists['country_sort'] = $this->countrySortFormat($lists['country_sort']); | 32 | $lists['country_sort'] = $this->countrySortFormat($lists['country_sort']); |
| 33 | 33 | ||
| 34 | - $custom_model = new CountryCustom(); | ||
| 35 | - $lists['country_custom'] = $custom_model->list(['project_id'=>$this->user['project_id']],'id',['language_id','custom_domain','is_create','type','private_key','private_cert']); | ||
| 36 | return $this->success($lists); | 34 | return $this->success($lists); |
| 37 | } | 35 | } |
| 38 | 36 | ||
| @@ -90,6 +88,19 @@ class ProjectCountryLogic extends BaseLogic | @@ -90,6 +88,19 @@ class ProjectCountryLogic extends BaseLogic | ||
| 90 | return $this->success(); | 88 | return $this->success(); |
| 91 | } | 89 | } |
| 92 | 90 | ||
| 91 | + /** | ||
| 92 | + * 获取语种自定义跳转详情 | ||
| 93 | + * @return array|bool | ||
| 94 | + * @author Akun | ||
| 95 | + * @date 2024/03/06 14:38 | ||
| 96 | + */ | ||
| 97 | + public function country_custom_info(){ | ||
| 98 | + $custom_model = new CountryCustom(); | ||
| 99 | + $info = $custom_model->read(['project_id'=>$this->user['project_id'],'language_id'=>$this->param['language_id']],['language_id','custom_domain','is_create','type','private_key','private_cert']); | ||
| 100 | + | ||
| 101 | + return $this->success($info?:[]); | ||
| 102 | + } | ||
| 103 | + | ||
| 93 | protected function countryListsFormat($country_lists) | 104 | protected function countryListsFormat($country_lists) |
| 94 | { | 105 | { |
| 95 | if(empty($country_lists)){ | 106 | if(empty($country_lists)){ |
| @@ -158,6 +158,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -158,6 +158,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 158 | Route::any('/save', [\App\Http\Controllers\Bside\Setting\ProjectCountryController::class, 'save'])->name('web_setting_country_save'); | 158 | Route::any('/save', [\App\Http\Controllers\Bside\Setting\ProjectCountryController::class, 'save'])->name('web_setting_country_save'); |
| 159 | Route::any('/custom_save', [\App\Http\Controllers\Bside\Setting\ProjectCountryController::class, 'custom_save'])->name('web_setting_country_custom_save'); | 159 | Route::any('/custom_save', [\App\Http\Controllers\Bside\Setting\ProjectCountryController::class, 'custom_save'])->name('web_setting_country_custom_save'); |
| 160 | Route::any('/custom_del', [\App\Http\Controllers\Bside\Setting\ProjectCountryController::class, 'custom_del'])->name('web_setting_country_custom_del'); | 160 | Route::any('/custom_del', [\App\Http\Controllers\Bside\Setting\ProjectCountryController::class, 'custom_del'])->name('web_setting_country_custom_del'); |
| 161 | + Route::any('/custom_info', [\App\Http\Controllers\Bside\Setting\ProjectCountryController::class, 'custom_info'])->name('web_setting_country_custom_info'); | ||
| 161 | }); | 162 | }); |
| 162 | //客服设置 | 163 | //客服设置 |
| 163 | Route::prefix('service')->group(function () { | 164 | Route::prefix('service')->group(function () { |
-
请 注册 或 登录 后发表评论