From 5563b1da1f8c6ea52d5e951373bde2562cbdb0f9 Mon Sep 17 00:00:00 2001 From: make Date: Wed, 7 May 2025 11:25:47 +0800 Subject: [PATCH] debug --- code/app/home/BaseController.php | 2 +- code/app/services/SiteContext.php | 4 +- code/public/404.html | 5 +-- .../initdata/novel/baseSubjectFomartGroup.php | 8 ++-- .../initdata/novel/urlSubjectFomartGroup.php | 41 ++++++++++++++++++- .../initdata/video/baseSubjectFomartGroup.php | 2 +- 6 files changed, 50 insertions(+), 12 deletions(-) diff --git a/code/app/home/BaseController.php b/code/app/home/BaseController.php index 1b45103..66ccdaa 100644 --- a/code/app/home/BaseController.php +++ b/code/app/home/BaseController.php @@ -92,7 +92,7 @@ abstract class BaseController public function rending($strTemplate = '') { // 全局使用的URL模板 - $strPcUrlTemp = $this->request->DomainModel->getFomartSubject('PC_URL_PATH','',false); + $strPcUrlTemp = $this->request->DomainModel->getFomartSubject('PC_PATH_URL','',false); $strNanUrlTemp = $this->request->DomainModel->getFomartSubject('NAN_SHENG_URL','',false); $strNvUrlTemp = $this->request->DomainModel->getFomartSubject('NV_SHENG_URL','',false); $strCategoryIndexUrlTemp = $this->request->DomainModel->getFomartSubject('CATEGORY_INDEX_URL','',false); diff --git a/code/app/services/SiteContext.php b/code/app/services/SiteContext.php index f74dac3..8bac4ea 100644 --- a/code/app/services/SiteContext.php +++ b/code/app/services/SiteContext.php @@ -112,7 +112,7 @@ class SiteContext { if(config('app.default_app_type') == 'novel'){ // 全局使用的URL模板 - $strPcUrlTemp = $this->DomainModel->getFomartSubject('PC_URL_PATH', '', false); + $strPcUrlTemp = $this->DomainModel->getFomartSubject('PC_PATH_URL', '', false); $strNanUrlTemp = $this->DomainModel->getFomartSubject('NAN_SHENG_URL', '', false); $strNvUrlTemp = $this->DomainModel->getFomartSubject('NV_SHENG_URL', '', false); $strCategoryIndexUrlTemp = $this->DomainModel->getFomartSubject('CATEGORY_INDEX_URL', '', false); @@ -137,7 +137,7 @@ class SiteContext View::assign("strBookShelfUrlTemp", $strBookShelfUrlTemp); View::assign("strUserUrlTemp", $strUserUrlTemp); }else{ - $strPcUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_PC_URL_PATH', '', false); + $strPcUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_PC_PATH_URL', '', false); $strRankUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_RANK_INDEX_URL', '', false); $strSearchListUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_SEARCH_LIST_URL', '', false); $strHistoryUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_HISTORY_LIST_URL', '', false); diff --git a/code/public/404.html b/code/public/404.html index caf616d..85454d6 100644 --- a/code/public/404.html +++ b/code/public/404.html @@ -62,17 +62,16 @@ countdownElement.textContent = countdown; if (countdown <= 0) { clearInterval(interval); - // Check if there is a previous page in history if (document.referrer) { window.history.back(); + } else { - window.location.href = '/'; // Redirect to home if no previous page + window.location.href = '/'; } } }, 1000); } - // Start the countdown when the script loads window.onload = startCountdown; diff --git a/code/public/initdata/novel/baseSubjectFomartGroup.php b/code/public/initdata/novel/baseSubjectFomartGroup.php index 34046df..5e8193a 100644 --- a/code/public/initdata/novel/baseSubjectFomartGroup.php +++ b/code/public/initdata/novel/baseSubjectFomartGroup.php @@ -275,10 +275,10 @@ $arrNovelSubjectFomartGroupData = [ '/user', ] ], - 'PC_URL_PATH' => [ - 'description' => 'pc端URL目录 模板', + 'PC_PATH_URL' => [ + 'description' => 'pc端目录URL 模板1', 'sfg_id' => 107, - 'arrSubjectFomart' => ['/pc', '/web', '/desktop', '/index', '/shouye', '/zhuomian'] + 'arrSubjectFomart' => ['/pc'] ], 'CATEGORY_INDEX_URL' => [ 'description' => '书库首页URL 模板1', @@ -323,7 +323,7 @@ $arrNovelSubjectFomartGroupData = [ ] ], - // 最新替换模板分组id 125 + // 最新替换模板分组id 130 ]; diff --git a/code/public/initdata/novel/urlSubjectFomartGroup.php b/code/public/initdata/novel/urlSubjectFomartGroup.php index 7bc4e07..ab8b645 100644 --- a/code/public/initdata/novel/urlSubjectFomartGroup.php +++ b/code/public/initdata/novel/urlSubjectFomartGroup.php @@ -606,6 +606,45 @@ return [ ] ], - // 最新替换模板分组id 125 + // pc端目录URL + 'PC_PATH_URL_T2' => [ + 'description' => 'pc端目录URL 模板2', + 'sfg_id' => 126, + 'arrSubjectFomart' => [ + '/web', + ] + ], + 'PC_PATH_URL_T3' => [ + 'description' => 'pc端目录URL 模板3', + 'sfg_id' => 127, + 'arrSubjectFomart' => [ + '/desktop', + ] + ], + 'PC_PATH_URL_T4' => [ + 'description' => 'pc端目录URL 模板4', + 'sfg_id' => 128, + 'arrSubjectFomart' => [ + '/index', + ] + ], + 'PC_PATH_URL_T5' => [ + 'description' => 'pc端目录URL 模板5', + 'sfg_id' => 129, + 'arrSubjectFomart' => [ + '/shouye', + ] + ], + 'PC_PATH_URL_T6' => [ + 'description' => 'pc端目录URL 模板6', + 'sfg_id' => 130, + 'arrSubjectFomart' => [ + '/zhuomian', + ] + ], + + + + // 最新替换模板分组id 130 ]; diff --git a/code/public/initdata/video/baseSubjectFomartGroup.php b/code/public/initdata/video/baseSubjectFomartGroup.php index 1ddd1b5..76b9c3c 100644 --- a/code/public/initdata/video/baseSubjectFomartGroup.php +++ b/code/public/initdata/video/baseSubjectFomartGroup.php @@ -355,7 +355,7 @@ $arrVideoSubjectFomartGroupData = [ ] ], - 'VIDEO_PC_URL_PATH' => [ + 'VIDEO_PC_PATH_URL' => [ 'description' => '视频pc端URL目录 模板', 'sfg_id' => 1030, 'arrSubjectFomart' => ['/pc', '/web', '/desktop', '/index', '/shouye', '/zhuomian']