This commit is contained in:
make
2025-04-20 21:50:58 +08:00
parent 34206fe268
commit 3216cffb5e
15 changed files with 352 additions and 233 deletions

View File

@@ -80,9 +80,12 @@ $arrRoutes = [
// 书库
'library' => [
/**
* /shuku/nansheng-xiaoshuo/all/all/all/page1
* '/:strGender?/:strCategory?/:strStatus?/:strOrder?/:intPage?';
* 完整路由
* 使用: {site:nflurl gender="$strGender" category="$CategoryPinyin" status="all" order="all" page="1"/}
*/
// '/shuku/:strGender?/:strCategory?/:strStatus?/:strOrder?/page:intPage?',
'/shuku/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
'/books/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
'/library/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
@@ -109,12 +112,12 @@ $arrRoutes = [
* 使用 gender 传空/或者不传,控制器会默认值是 all
* {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/}
*/
'/shuku/:strCategory/:strStatus/page:intPage',
'/books/:strCategory/:strStatus/page:intPage',
'/library/:strCategory/:strStatus/page:intPage',
'/fenlei/:strCategory/:strStatus/page:intPage',
'/class/:strCategory/:strStatus/page:intPage',
'/category/:strCategory/:strStatus/page:intPage',
// '/shuku/:strCategory/:strStatus/page:intPage',
// '/books/:strCategory/:strStatus/page:intPage',
// '/library/:strCategory/:strStatus/page:intPage',
// '/fenlei/:strCategory/:strStatus/page:intPage',
// '/class/:strCategory/:strStatus/page:intPage',
// '/category/:strCategory/:strStatus/page:intPage',
/**
* default 模板
@@ -122,12 +125,12 @@ $arrRoutes = [
* 使用 gender 传空/或者不传,控制器会默认值是 all
* {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/}
*/
'/shuku/:strCategory/:strOrder/page:intPage',
'/books/:strCategory/:strOrder/page:intPage',
'/library/:strCategory/:strOrder/page:intPage',
'/fenlei/:strCategory/:strOrder/page:intPage',
'/class/:strCategory/:strOrder/page:intPage',
'/category/:strCategory/:strOrder/page:intPage',
// '/shuku/:strCategory/:strOrder/page:intPage',
// '/books/:strCategory/:strOrder/page:intPage',
// '/library/:strCategory/:strOrder/page:intPage',
// '/fenlei/:strCategory/:strOrder/page:intPage',
// '/class/:strCategory/:strOrder/page:intPage',
// '/category/:strCategory/:strOrder/page:intPage',
/**
@@ -136,12 +139,12 @@ $arrRoutes = [
* 使用 gender 传空/或者不传,控制器会默认值是 all
* {site:nflurl gender="" category="$CategoryPinyin" status="all" order="all" page="1"/}
*/
'/shuku/:strCategory/page:intPage',
'/books/:strCategory/page:intPage',
'/library/:strCategory/page:intPage',
'/fenlei/:strCategory/page:intPage',
'/class/:strCategory/page:intPage',
'/category/:strCategory/page:intPage',
// '/shuku/:strCategory/page:intPage',
// '/books/:strCategory/page:intPage',
// '/library/:strCategory/page:intPage',
// '/fenlei/:strCategory/page:intPage',
// '/class/:strCategory/page:intPage',
// '/category/:strCategory/page:intPage',
/**
* kuangyu 模板
@@ -155,6 +158,13 @@ $arrRoutes = [
'/fenlei/:strGender/:strCategory/:strStatus/page:intPage',
'/class/:strGender/:strCategory/:strStatus/page:intPage',
'/category/:strGender/:strCategory/:strStatus/page:intPage',
// '/shuku/:strGender/page:intPage',
// '/books/:strGender/page:intPage',
// '/library/:strGender/page:intPage',
// '/fenlei/:strGender/page:intPage',
// '/class/:strGender/page:intPage',
// '/category/:strGender/page:intPage',
],
// 书库首页
'library-index' => [
@@ -267,11 +277,14 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
return view($strView);
})
->pattern([
// 'strGender' => '[a-z\-]+',
'strCategory' => '[a-z\-]+',
'strStatus' => 'all|lianzai|wanjie',
// 'strOrder' => '[a-z\-]+',
'intPage' => '\d+'
'strGender' => '[a-z\-]*', // 允许空值
'strCategory' => '[a-z\-]*', // 允许空值
'strStatus' => '(all|lianzai|wanjie)?', // 允许空值
'strOrder' => '[a-z\-]*', // 允许空值
'intPage' => '\d*', // 允许空值
// 'strCategory' => 'all|xuanhuan-xiuzhen|junshi-xiaoshuo|wangyou-xiaoshuo|kehuan-xiaoshuo|zhongsheng-chuanyue|dushi-xiaoshuo|lingyi-xiaoshuo|yanqing-xiaoshuo|qita-xiaoshuo',
]);
break;
@@ -305,7 +318,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
}
Route::get($strRoute, function () use ($strView) {
return view($strView);
})->append(['strChannel' => 'boys']);
})->append(['strChannel' => 'man']);
//Route::get($strRoute, [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => $boolIsMobile, 'strChannel' => 'boys']);
break;
@@ -318,7 +331,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
}
Route::get($strRoute, function () use ($strView) {
return view($strView);
})->append(['strChannel' => 'girls']);
})->append(['strChannel' => 'women']);
//Route::get($strRoute, [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => $boolIsMobile, 'strChannel' => 'girls']);
break;