no message
This commit is contained in:
parent
58fcd0d936
commit
283195294c
@ -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);
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
<?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 GithubArticleGithubController extends ListController
|
||||
{
|
||||
|
||||
protected string $sApiPath = "article/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_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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user