This commit is contained in:
make
2025-04-21 13:52:41 +08:00
parent 3327907965
commit be2811f022
13 changed files with 105 additions and 27 deletions

View File

@@ -22,7 +22,7 @@ $arrRoutes = [
// H5/PC 端前缀
'prefixes' => [
'pc' => ['/pc', '/web', '/desktop', '/index', '/shouye', '/zhuomian'],
'h5' => '',
'h5' => ['','/nindex'],
],
// 通用路径别名
@@ -191,6 +191,8 @@ $arrRoutes = [
'history' => ['/history', '/reading-history', '/read-record', '/lishi', '/yuedu-lishi', '/browse-past'],
// 首页
'index' => ['/'],
// 首页 - 如果info_id 》 0
'nindex' => ['/nindex'],
],
@@ -392,6 +394,17 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
});
}
break;
case 'nindex':
// 首页
$strView = 'pc/index.html';
if ($platform == 'h5') {
$strView = 'index/index.html';
}
Route::get($strRoute, function () use ($strView) {
return view($strView);
});
break;
}
}
}