From a1462a4be5faaa98acae7c13b64783495e962204 Mon Sep 17 00:00:00 2001 From: make Date: Thu, 10 Apr 2025 21:40:35 +0800 Subject: [PATCH] debug --- code/database/seeders/TemplateSeeder.php | 317 ++++++++++++++++++++++- doc/Install.md | 47 ++++ doc/TemplateTag.md | 8 - 3 files changed, 350 insertions(+), 22 deletions(-) create mode 100644 doc/Install.md diff --git a/code/database/seeders/TemplateSeeder.php b/code/database/seeders/TemplateSeeder.php index f9427aa..cbc7bbf 100644 --- a/code/database/seeders/TemplateSeeder.php +++ b/code/database/seeders/TemplateSeeder.php @@ -124,7 +124,7 @@ class TemplateSeeder 'description' => '目录Description 替换模板分组ID', 'sfg_id' => 15, 'arrSubjectFomart' => [ - + '{strSiteName}提供{strNovelName}章节目录免费查看,第{intPage}页包含最新{strNovelStatus}章节,{strNovelAuthor}创作,畅享{strSiteDomain}!', ] ], @@ -173,7 +173,7 @@ class TemplateSeeder '{strSiteName}提供小说排行榜,第{intPage}页精选热门小说免费阅读,最新排行一览无余,畅享{strSiteDomain}!', ] ], - + 'NOVEL@GETSEARCHNOVEL@TITLE' => [ 'description' => '搜索页Title 替换模板分组ID', 'sfg_id' => 22, @@ -226,17 +226,13 @@ class TemplateSeeder ] ], 'NOVEL_INFO_URL' => [ - 'description' => '小说详情URL 替换模板分组ID', + 'description' => '小说详情URL 模板1', 'sfg_id' => 29, 'arrSubjectFomart' => [ '/xiaoshuo/{strPinYin}-{intNId}', - // '/novel/{strPinYin}-{intNId}', - // '/book/{strPinYin}-{intNId}', - // '/xiaoshuo-{strPinYin}-{intNId}', - // '/novel-{strPinYin}-{intNId}', - // '/book-{strPinYin}-{intNId}', ] ], + 'KAN_NOVEL_INFO_URL' => [ 'description' => 'kan小说详情URL 替换模板分组ID', 'sfg_id' => 30, @@ -297,6 +293,301 @@ class TemplateSeeder ], ]; + // 公共的替换模板分组 + $arrPublicSubjectFomartGroupData = [ + // URL + // 分类书库URL url + 'CATEGORY_INFO_URL_T2' => [ + 'description' => '分类书库URL 模板2', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/books/{strGender}/{strCategory}/{strStatus}/page{intPage}', + ] + ], + 'CATEGORY_INFO_URL_T3' => [ + 'description' => '分类书库URL 模板3', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/library/{strGender}/{strCategory}/{strStatus}/page{intPage}', + ] + ], + 'CATEGORY_INFO_URL_T4' => [ + 'description' => '分类书库URL 模板4', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/fenlei/{strGender}/{strCategory}/{strStatus}/page{intPage}', + ] + ], + 'CATEGORY_INFO_URL_T5' => [ + 'description' => '分类书库URL 模板5', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/class/{strGender}/{strCategory}/{strStatus}/page{intPage}', + ] + ], + 'CATEGORY_INFO_URL_T6' => [ + 'description' => '分类书库URL 模板6', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/category/{strGender}/{strCategory}/{strStatus}/page{intPage}', + ] + ], + + // 男生小说频道URL 模板1 + 'NAN_SHENG_URL_T2' => [ + 'description' => '男生小说频道URL 模板2', + 'sfg_id' => 26, + 'arrSubjectFomart' => [ + '/boys-novel' + ] + ], + 'NAN_SHENG_URL_T3' => [ + 'description' => '男生小说频道URL 模板3', + 'sfg_id' => 26, + 'arrSubjectFomart' => [ + '/nansheng-shu' + ] + ], + 'NAN_SHENG_URL_T4' => [ + 'description' => '男生小说频道URL 模板4', + 'sfg_id' => 26, + 'arrSubjectFomart' => [ + '/man-read' + ] + ], + 'NAN_SHENG_URL_T5' => [ + 'description' => '男生小说频道URL 模板5', + 'sfg_id' => 26, + 'arrSubjectFomart' => [ + '/nansheng-book' + ] + ], + 'NAN_SHENG_URL_T6' => [ + 'description' => '男生小说频道URL 模板6', + 'sfg_id' => 26, + 'arrSubjectFomart' => [ + '/male-novels' + ] + ], + + 'NV_SHENG_URL' => [ + 'description' => '女生URL 替换模板分组ID', + 'sfg_id' => 27, + 'arrSubjectFomart' => [ + '/nvsheng-xiaoshuo', + ] + ], + 'RANK_INFO_URL' => [ + 'description' => '排行榜URL 替换模板分组ID', + 'sfg_id' => 28, + 'arrSubjectFomart' => [ + '/paihang/all', + ] + ], + + // 小说详情 url + 'NOVEL_INFO_URL_T2' => [ + 'description' => '小说详情URL 模板2', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/novel/{strPinYin}-{intNId}', + ] + ], + 'NOVEL_INFO_URL_T3' => [ + 'description' => '小说详情URL 模板3', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/book/{strPinYin}-{intNId}', + ] + ], + 'NOVEL_INFO_URL_T4' => [ + 'description' => '小说详情URL 模板4', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/xiaoshuo-{strPinYin}-{intNId}', + ] + ], + 'NOVEL_INFO_URL_T5' => [ + 'description' => '小说详情URL 模板5', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/novel-{strPinYin}-{intNId}', + ] + ], + 'NOVEL_INFO_URL_T6' => [ + 'description' => '小说详情URL 模板6', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/book-{strPinYin}-{intNId}', + ] + ], + + // 伪小说详情 url + 'KAN_NOVEL_INFO_URL_T2' => [ + 'description' => '伪小说详情URL 模板2', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/kan-novel/{strPinYin}-{intNId}', + ] + ], + 'KAN_NOVEL_INFO_URL_T3' => [ + 'description' => '伪小说详情URL 模板3', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/kan-book/{strPinYin}-{intNId}', + ] + ], + 'KAN_NOVEL_INFO_URL_T4' => [ + 'description' => '伪小说详情URL 模板4', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/kan-xiaoshuo-{strPinYin}-{intNId}', + ] + ], + 'KAN_NOVEL_INFO_URL_T5' => [ + 'description' => '伪小说详情URL 模板5', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/kan-novel-{strPinYin}-{intNId}', + ] + ], + 'KAN_NOVEL_INFO_URL_T6' => [ + 'description' => '伪小说详情URL 模板6', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/kan-book-{strPinYin}-{intNId}', + ] + ], + + // 小说详情目录 url + 'TABLE_INFO_URL_T2' => [ + 'description' => '小说目录URL 模板2', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/novel/{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}', + ] + ], + 'TABLE_INFO_URL_T3' => [ + 'description' => '小说目录URL 模板3', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/book/{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}', + ] + ], + 'TABLE_INFO_URL_T4' => [ + 'description' => '小说目录URL 模板4', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/xiaoshuo-{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}', + ] + ], + 'TABLE_INFO_URL_T5' => [ + 'description' => '小说目录URL 模板5', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/novel-{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}', + ] + ], + 'TABLE_INFO_URL_T6' => [ + 'description' => '小说目录URL 模板6', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/book-{strPinYin}-{intNId}/mulu/{strOrder}/{intPage}', + ] + ], + + // 小说章节 url + 'CONTENT_INFO_T2' => [ + 'description' => '内容章节URL 模板2', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/novel/{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}', + ] + ], + 'CONTENT_INFO_T3' => [ + 'description' => '内容章节URL 模板3', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/book/{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}', + ] + ], + 'CONTENT_INFO_T4' => [ + 'description' => '内容章节URL 模板4', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/xiaoshuo-{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}', + ] + ], + 'CONTENT_INFO_T5' => [ + 'description' => '内容章节URL 模板5', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/novel-{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}', + ] + ], + 'CONTENT_INFO_T6' => [ + 'description' => '内容章节URL 模板6', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/book-{strPinYin}-{intNId}/zhang-{intChapterSort}/{intChapterPage}', + ] + ], + + /** + * 小说最新内容 url + * '/xiaoshuo/{strPinYin}-{intNId}/chapter/latest', + * '/novel/{strPinYin}-{intNId}/chapter/latest', + * '/book/{strPinYin}-{intNId}/chapter/latest', + * '/xiaoshuo-{strPinYin}-{intNId}/chapter/latest', + * '/novel-{strPinYin}-{intNId}/chapter/latest', + * '/book-{strPinYin}-{intNId}/chapter/latest', + */ + 'NEWS_CONTENT_INFO_T2' => [ + 'description' => '最新内容章节URL 模板2', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/novel/{strPinYin}-{intNId}/chapter/latest', + ] + ], + 'NEWS_CONTENT_INFO_T3' => [ + 'description' => '最新内容章节URL 模板3', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/book/{strPinYin}-{intNId}/chapter/latest', + ] + ], + 'NEWS_CONTENT_INFO_T4' => [ + 'description' => '最新内容章节URL 模板4', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/xiaoshuo-{strPinYin}-{intNId}/chapter/latest', + ] + ], + 'NEWS_CONTENT_INFO_T5' => [ + 'description' => '最新内容章节URL 模板5', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/novel-{strPinYin}-{intNId}/chapter/latest', + ] + ], + 'NEWS_CONTENT_INFO_T6' => [ + 'description' => '最新内容章节URL 模板6', + 'sfg_id' => 29, + 'arrSubjectFomart' => [ + '/book-{strPinYin}-{intNId}/chapter/latest', + ] + ], + + + 'SEARCH_INFO_URL' => [ + 'description' => '搜索页URL 替换模板分组ID', + 'sfg_id' => 34, + 'arrSubjectFomart' => [ + '/search.html?keywords={strSearchKeywords}&page={intPage}', + ] + ], + ]; + /** * 视图模板 数据播种 */ @@ -337,7 +628,7 @@ class TemplateSeeder ]; - /** + /** * 站点列表 数据播种 */ $arrSiteData = [ @@ -369,13 +660,12 @@ class TemplateSeeder ], ]; - + self::initTemplate($arrTemplateData); self::initSubjectFomartGroup($arrSubjectFomartGroupData); self::initSite($arrSiteData); - } @@ -432,9 +722,8 @@ class TemplateSeeder // 如果记录存在,更新记录 $SubjectFomartModel->where('sf_id', $SubjectFomartModel->sf_id)->update($SubjectFomartItem); }; - }; - + if (empty($SubjectFomartGroupModel)) { SubjectFomartGroupModel::insert($SubjectFomartGroupItem); } else { @@ -456,7 +745,7 @@ class TemplateSeeder { foreach ($arrSiteData as $arrSite) { $SiteModel = DomainModel::where('d_id', $arrSite['d_id'])->find(); - + if (empty($SiteModel)) { DomainModel::insert($arrSite); } else { diff --git a/doc/Install.md b/doc/Install.md new file mode 100644 index 0000000..7fedabd --- /dev/null +++ b/doc/Install.md @@ -0,0 +1,47 @@ + + + +### Nginx 配置 + +```shell +location / { + if (!-f $request_filename) { + rewrite ^(.*)$ /index.php?s=/$1 last; + } +} +``` + + +### 部署 + +- 1. 克隆代码 +- 2. 安装扩展 `composer install` +- 3. 配置env文件 `cp .example.env .env` +- 4. 上传logo 等图片到img public/statics/img/* +- 5. 初始化数据库 `php think db:manage init` + + + +### 升级 +- 1. 拉取代码 +- 2. 数据库升级 `php think migrate:run` +- 2. 数据库升级 `php think mongo:manage` +- 2. 数据播种 `php think db:manage seed` +- 3. 关闭服务 `php think task stop` +- 4. 启动服务 `php think task start -d` + + + + + +- 7. 创建migrate //执行命令,创建一个操作文件,一定要用大驼峰写法,如下 +php think migrate:create AnyClassNameYouWant +### + /admin/system/initadminuser + + keys "task:novel_source_id:*" + +## 其它配置 +- 1. 统计代码要在广告配置添加 +- 2. 系统配置要吸怪对应的战斗信息 +- 3. seoTdk 管理要修改对应的tdk diff --git a/doc/TemplateTag.md b/doc/TemplateTag.md index 37aa82a..e8a7d30 100644 --- a/doc/TemplateTag.md +++ b/doc/TemplateTag.md @@ -27,11 +27,3 @@ - - -# FIXME 分类:男生和女生所对应的分类,看导航展示 -# FIXED BY 已经修复 - - - -# BUG 数据播种那里,增加个临时播种文件,播种域名, 替换内容分组,替换内容 三个表的数据, 因为你那里增加了替换模板内容,但是我这域名数据里没有模板数据导致无法打开页面 \ No newline at end of file