This commit is contained in:
make
2025-04-10 21:40:35 +08:00
parent f0273ef676
commit a1462a4be5
3 changed files with 350 additions and 22 deletions

View File

@@ -226,17 +226,13 @@ class TemplateSeeder
] ]
], ],
'NOVEL_INFO_URL' => [ 'NOVEL_INFO_URL' => [
'description' => '小说详情URL 替换模板分组ID', 'description' => '小说详情URL 模板1',
'sfg_id' => 29, 'sfg_id' => 29,
'arrSubjectFomart' => [ 'arrSubjectFomart' => [
'/xiaoshuo/{strPinYin}-{intNId}', '/xiaoshuo/{strPinYin}-{intNId}',
// '/novel/{strPinYin}-{intNId}',
// '/book/{strPinYin}-{intNId}',
// '/xiaoshuo-{strPinYin}-{intNId}',
// '/novel-{strPinYin}-{intNId}',
// '/book-{strPinYin}-{intNId}',
] ]
], ],
'KAN_NOVEL_INFO_URL' => [ 'KAN_NOVEL_INFO_URL' => [
'description' => 'kan小说详情URL 替换模板分组ID', 'description' => 'kan小说详情URL 替换模板分组ID',
'sfg_id' => 30, '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 = [ $arrSiteData = [
@@ -375,7 +666,6 @@ class TemplateSeeder
self::initSubjectFomartGroup($arrSubjectFomartGroupData); self::initSubjectFomartGroup($arrSubjectFomartGroupData);
self::initSite($arrSiteData); self::initSite($arrSiteData);
} }
@@ -432,7 +722,6 @@ class TemplateSeeder
// 如果记录存在,更新记录 // 如果记录存在,更新记录
$SubjectFomartModel->where('sf_id', $SubjectFomartModel->sf_id)->update($SubjectFomartItem); $SubjectFomartModel->where('sf_id', $SubjectFomartModel->sf_id)->update($SubjectFomartItem);
}; };
}; };
if (empty($SubjectFomartGroupModel)) { if (empty($SubjectFomartGroupModel)) {

47
doc/Install.md Normal file
View File

@@ -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

View File

@@ -27,11 +27,3 @@
<img class="pre-img lozad" loading="lazy" src="/assets/images/loading_img_bg_default.jpg?v={site:cfg code='STATIC_FILE_VERSION' encode='false'/}" <img class="pre-img lozad" loading="lazy" src="/assets/images/loading_img_bg_default.jpg?v={site:cfg code='STATIC_FILE_VERSION' encode='false'/}"
data-encrypted="true" data-encrypted="true"
data-src="{$vo.sp_fengmian_url}"> data-src="{$vo.sp_fengmian_url}">
# FIXME 分类:男生和女生所对应的分类,看导航展示
# FIXED BY 已经修复
# BUG 数据播种那里,增加个临时播种文件,播种域名, 替换内容分组,替换内容 三个表的数据, 因为你那里增加了替换模板内容,但是我这域名数据里没有模板数据导致无法打开页面