You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
use App\Http\Controllers\AdminSpaController;
|
|
|
|
|
|
use App\Http\Controllers\MiniappRadarPageController;
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
| Web Routes
|
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
|
|
|
|
| routes are loaded by the RouteServiceProvider and all of them will
|
|
|
|
|
|
| be assigned to the "web" middleware group. Make something great!
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
Route::redirect('/', '/admin/');
|
|
|
|
|
|
|
|
|
|
|
|
Route::get('/miniapp-radar', [MiniappRadarPageController::class, 'show']);
|
|
|
|
|
|
|
|
|
|
|
|
$webviewVerifyFile = config('services.wechat.mini_program.webview_verify_file');
|
|
|
|
|
|
$webviewVerifyContent = config('services.wechat.mini_program.webview_verify_content');
|
|
|
|
|
|
if ($webviewVerifyFile && $webviewVerifyContent) {
|
|
|
|
|
|
Route::get('/'.$webviewVerifyFile, static fn () => response($webviewVerifyContent, 200, [
|
|
|
|
|
|
'Content-Type' => 'text/plain; charset=UTF-8',
|
|
|
|
|
|
]));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 管理后台 SPA:入口返回 index.html;历史深链 /admin/xxx 重定向到 /admin/#/xxx
|
|
|
|
|
|
Route::get('/admin/{path?}', AdminSpaController::class)->where('path', '.*');
|