diff --git a/app/Http/Controllers/Web/Nasa/V1/FnCategoryHubController.php b/app/Http/Controllers/Web/Nasa/V1/FnCategoryHubController.php new file mode 100644 index 00000000..e367e983 --- /dev/null +++ b/app/Http/Controllers/Web/Nasa/V1/FnCategoryHubController.php @@ -0,0 +1,50 @@ +sSiteWww = config("path.url_github_base") ?? ''; +// $this->sSiteWww = "fn-b.loc"; + } + + public function index(NasaQueryRequest $oRequest) + { + $sSiteCodeShort = $oRequest->route('nick'); + +// $this->sSiteWww = $sNick.'.'.$this->sSiteWww; + $this->sSiteWww = config("path.url_fn.".$sSiteCodeShort); +// $this->sSiteWww = "fn-b.loc"; + + $aCleanQuery = $oRequest->cleanQuery(); + $oResponse = Http::nasa($this->sSiteWww)->get($this->sApiPath, $aCleanQuery); + $aResponse = $oResponse->json(); + $aResponse['sApiPath'] = $this->sApiPath; + $aResponse['sSiteWww'] = $this->sSiteWww; + $aResponse['sHeaderActionView'] = $this->sHeaderActionView; + $aResponse['sListView'] = $this->sListView; + $aResponse['cNasaBook'] = $this->getNasaBook(); + $aResponse['aCustom'] = $this->aCustom ?? []; + + return view($this->sView, $aResponse); + } + +} diff --git a/app/Http/Controllers/Web/Nasa/V1/MasterPanelNavController.php b/app/Http/Controllers/Web/Nasa/V1/MasterPanelNavController.php index 1184cdec..c629852a 100644 --- a/app/Http/Controllers/Web/Nasa/V1/MasterPanelNavController.php +++ b/app/Http/Controllers/Web/Nasa/V1/MasterPanelNavController.php @@ -15,6 +15,9 @@ class MasterPanelNavController extends ListController protected string $sView = 'nasa._commons.list'; protected string $sSiteWww; protected string $sHeaderActionView = 'nasa.v1._actions.nav'; + protected array $aBookCode = [ + "扩展站点说明", + ]; public function __construct() { diff --git a/config/path.php b/config/path.php index 4c07ed64..b9155ef8 100755 --- a/config/path.php +++ b/config/path.php @@ -6,4 +6,10 @@ return [ "url_github_base" => env("url_github_base"), "url_ship_fu_base" => env("url_ship_fu_base"), "url_resource_base" => env("url_resource_base"), + 'url_fn' => [ + 'cfn' => env('url_fn_cfn', 'clashfreenode.com'), + 'vfn' => env('url_fn_vfn', 'v2rayfreenode.com'), + 'cvf' => env('url_fn_cvf', 'clashv2rayfree.com'), + 'vcf' => env('url_fn_vcf', 'v2rayclashfree.com') + ], ]; diff --git a/routes/web.php b/routes/web.php index 2b7b1b73..b78edd2c 100755 --- a/routes/web.php +++ b/routes/web.php @@ -51,6 +51,7 @@ use App\Http\Controllers\Web\Nasa\V1\ResourceUploadimagesBaseController as NasaR use App\Http\Controllers\Web\Nasa\V1\ActionsController as NasaActionsController; use App\Http\Controllers\Web\Nasa\V1\GithubArticleGithubController as NasaGithubArticleGithubController; use App\Http\Controllers\SakaiFnController; +use App\Http\Controllers\Web\Nasa\V1\FnCategoryHubController as NasaFnCategoryHubController; Route::prefix('sakai')->group(function() { Route::get('fn/looktrans/{client}/{xieyi}/{like?}', [SakaiFnController::class, 'looktrans']); // like可以空怎么表示 @@ -115,6 +116,10 @@ Route::prefix('nasa')->middleware(['auth'])->group(function () { Route::get('/github/article/github-4', [NasaGithubArticleGithubController::class, 'index'])->defaults('nick', 'github-4')->name('nasa.github.article.github-4'); Route::get('/github/article/github-5', [NasaGithubArticleGithubController::class, 'index'])->defaults('nick', 'github-5')->name('nasa.github.article.github-5'); Route::get('/github/article/github-6', [NasaGithubArticleGithubController::class, 'index'])->defaults('nick', 'github-6')->name('nasa.github.article.github-6'); + Route::get('/fn/category/cfn', [NasaFnCategoryHubController::class, 'index'])->defaults('nick', 'cfn')->name('nasa.fn.category.cfn'); + Route::get('/fn/category/cvf', [NasaFnCategoryHubController::class, 'index'])->defaults('nick', 'cvf')->name('nasa.fn.category.cvf'); + Route::get('/fn/category/vcf', [NasaFnCategoryHubController::class, 'index'])->defaults('nick', 'vcf')->name('nasa.fn.category.vcf'); + Route::get('/fn/category/vfn', [NasaFnCategoryHubController::class, 'index'])->defaults('nick', 'vfn')->name('nasa.fn.category.vfn'); Route::get('demo')->name('nasa.demo'); Route::prefix('demo')->group(function() {