no message
This commit is contained in:
parent
b8d91ad982
commit
8c5daf2abb
50
app/Http/Controllers/Web/Nasa/V1/FnCategoryHubController.php
Normal file
50
app/Http/Controllers/Web/Nasa/V1/FnCategoryHubController.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Web\Nasa\V1;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Requests\Nasa\NasaQueryRequest;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use App\Http\Controllers\Web\Nasa\V1\Base\ListController;
|
||||
use Illuminate\Routing\Events\RouteMatched;
|
||||
|
||||
class FnCategoryHubController extends ListController
|
||||
{
|
||||
|
||||
protected string $sApiPath = "category/base";
|
||||
protected string $sView = 'nasa._commons.list';
|
||||
protected string $sSiteWww;
|
||||
protected string $sHeaderActionView = 'nasa.v1._actions.list';
|
||||
protected array $aBookCode = [
|
||||
// "fn爬取说明书",
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// $this->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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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()
|
||||
{
|
||||
|
||||
@ -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')
|
||||
],
|
||||
];
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user