fix admin route html response

This commit is contained in:
apple
2026-05-01 20:54:27 +08:00
parent b15ed12309
commit bb714a598b

View File

@@ -28,7 +28,7 @@ Route::group('/', function () {
$pathInfoArr = explode('/', $pathInfo);
$admin = $pathInfoArr[0] ?? '';
if ($admin === 'admin') {
return __view(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html');
return Response::create(file_get_contents(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html'), 'html');
} else {
return Response::create()->code(404);
}
@@ -55,7 +55,7 @@ Route::group('/', function () {
$pathInfoArr = explode('/', $pathInfo);
$admin = $pathInfoArr[0] ?? '';
if ('kefu' === $admin) {
return __view(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html');
return Response::create(file_get_contents(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html'), 'html');
} else {
return Response::create()->code(404);
}
@@ -91,7 +91,7 @@ Route::group('/', function () {
$pathInfoArr = explode('/', $pathInfo);
$admin = $pathInfoArr[0] ?? '';
if ('supplier' === $admin) {
return __view(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html');
return Response::create(file_get_contents(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html'), 'html');
} else {
return Response::create()->code(404);
}