From 283195294cb8021557a71769a623225c38d275a4 Mon Sep 17 00:00:00 2001 From: hellcat Date: Fri, 7 Aug 2026 19:31:03 +0800 Subject: [PATCH] no message --- .../Web/Nasa/V1/Base/ListController.php | 2 +- .../Nasa/V1/GithubArticleGithubController.php | 47 +++++++++++++++++++ routes/web.php | 6 +++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 app/Http/Controllers/Web/Nasa/V1/GithubArticleGithubController.php diff --git a/app/Http/Controllers/Web/Nasa/V1/Base/ListController.php b/app/Http/Controllers/Web/Nasa/V1/Base/ListController.php index 9d9ff8c5..6097b734 100644 --- a/app/Http/Controllers/Web/Nasa/V1/Base/ListController.php +++ b/app/Http/Controllers/Web/Nasa/V1/Base/ListController.php @@ -47,7 +47,7 @@ class ListController return $cNasaBook; } - public function index(NasaQueryRequest $oRequest): View + public function index(NasaQueryRequest $oRequest) { $aCleanQuery = $oRequest->cleanQuery(); $oResponse = Http::nasa($this->sSiteWww)->get($this->sApiPath, $aCleanQuery); diff --git a/app/Http/Controllers/Web/Nasa/V1/GithubArticleGithubController.php b/app/Http/Controllers/Web/Nasa/V1/GithubArticleGithubController.php new file mode 100644 index 00000000..7e1acb45 --- /dev/null +++ b/app/Http/Controllers/Web/Nasa/V1/GithubArticleGithubController.php @@ -0,0 +1,47 @@ +sSiteWww = config("path.url_master_base") ?? ''; + } + + public function index(NasaQueryRequest $oRequest) + { + $sNick = $oRequest->route('nick'); + + $this->sSiteWww = $sNick.'.'.$this->sSiteWww; + + $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/routes/web.php b/routes/web.php index f729318b..020d7e4b 100755 --- a/routes/web.php +++ b/routes/web.php @@ -49,6 +49,7 @@ use App\Http\Controllers\Web\Nasa\V1\MasterTelegramKeysController as NasaMasterT use App\Http\Controllers\Web\Nasa\V1\ResourceArticleBaseController as NasaResourceArticleBaseController; use App\Http\Controllers\Web\Nasa\V1\ResourceUploadimagesBaseController as NasaResourceUploadimagesBaseController; use App\Http\Controllers\Web\Nasa\V1\ActionsController as NasaActionsController; +use App\Http\Controllers\Web\Nasa\V1\GithubArticleGithubController as NasaGithubArticleGithubController; Route::get('/birds/create', [BirdController::class, 'create'])->name('birds.create'); // 录入界面 Route::get('/birds/{id}', [BirdController::class, 'show'])->name('birds.show'); // 详情展示界面 @@ -103,6 +104,11 @@ Route::prefix('nasa')->middleware(['auth'])->group(function () { Route::get('/fu/mail/mustlog', [NasaFuMailMustlogController::class, 'index'])->name('nasa.fu.mail.mustlog'); Route::get('/fu/ann/base', [NasaFuAnnBaseController::class, 'index'])->name('nasa.fu.ann.base'); Route::get('/tests/fn/subfile', [NasaTestsFnSubfileController::class, 'index'])->name('nasa.tests.fn.subfile'); + Route::get('/github/article/github-1', [NasaGithubArticleGithubController::class, 'index'])->defaults('nick', 'github-1')->name('nasa.github.article.github-1'); + Route::get('/github/article/github-2', [NasaGithubArticleGithubController::class, 'index'])->defaults('nick', 'github-2')->name('nasa.github.article.github-2'); + Route::get('/github/article/github-3', [NasaGithubArticleGithubController::class, 'index'])->defaults('nick', 'github-3')->name('nasa.github.article.github-3'); + 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('demo')->name('nasa.demo'); Route::prefix('demo')->group(function() {