This commit is contained in:
make
2025-03-28 22:02:16 +08:00
11 changed files with 277 additions and 58 deletions

View File

@@ -51,3 +51,8 @@ MINIO_BUCKET = test001
# LocalStorage # LocalStorage
STORAGE_LOCAL_DIR = /mnt/gluster STORAGE_LOCAL_DIR = /mnt/gluster
# VIEW
VIEW_DISPLAY_CACHE = false
VIEW_TPL_CACHE = false

View File

@@ -144,6 +144,13 @@ namespace {
throw new Exception("无法写入加密文件: $strOutImgPath"); throw new Exception("无法写入加密文件: $strOutImgPath");
} }
} }
/**
* 中文转码实体字符
*
* @param string $text
* @return string
*/
function customEntities($text) function customEntities($text)
{ {
$result = ''; $result = '';

View File

@@ -2,16 +2,17 @@
declare(strict_types=1); declare(strict_types=1);
use app\home\controller\Novel;
use think\facade\Route; use think\facade\Route;
# 路由别名,可以忽略 # 路由别名,可以忽略
// Route::alias("/index.html", "/")->append(['boolIsMobile' => true]); // Route::alias("/index.html", "/")->append(['boolIsMobile' => true]);
// Route::alias("/pc/index.html", "/")->append(['boolIsMobile' => false]); // Route::alias("/pc/index.html", "/")->append(['boolIsMobile' => false]);
Route::get("/",'Index/index')->ext('html')->append(['boolIsMobile' => true]); Route::get("/", 'Index/index')->ext('html')->append(['boolIsMobile' => true]);
Route::get("/index",'Index/index')->ext('html')->append(['boolIsMobile' => true]); Route::get("/index", 'Index/index')->ext('html')->append(['boolIsMobile' => true]);
Route::get("/pc/index",'Index/getPcIndex')->ext('html')->append(['boolIsMobile' => false]); Route::get("/pc/index", 'Index/getPcIndex')->ext('html')->append(['boolIsMobile' => false]);
Route::get("/pc/",'Index/getPcIndex')->append(['boolIsMobile' => false]); Route::get("/pc/", 'Index/getPcIndex')->append(['boolIsMobile' => false]);
// 书架 // 书架
Route::get('bookshelf', 'User/getBookShelf')->ext('html')->append(['boolIsMobile' => true]); Route::get('bookshelf', 'User/getBookShelf')->ext('html')->append(['boolIsMobile' => true]);
@@ -19,17 +20,17 @@ Route::get('/pc/bookshelf', 'User/getBookShelf')->ext('html')->append(['boolIsMo
//排行榜 //排行榜
Route::get('rank', 'Novel/getNovelRank')->ext('html')->append(['boolIsMobile' => true]); Route::get('rank', 'Novel/getNovelRank')->ext('html')->append(['boolIsMobile' => true]);
Route::get("/pc/rank",'Novel/getNovelRank')->ext('html')->append(['boolIsMobile' => false]); Route::get("/pc/rank", 'Novel/getNovelRank')->ext('html')->append(['boolIsMobile' => false]);
// 男生/女生 // 男生/女生
Route::get('boy', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => true,'strChannel'=>'boys']); Route::get('boy', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('pc/boy', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => false,'strChannel'=>'boys']); Route::get('pc/boy', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
Route::get('girl', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => true,'strChannel'=>'girls']); Route::get('girl', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
Route::get('pc/girl', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => false,'strChannel'=>'girls']); Route::get('pc/girl', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
Route::get('novel-boys-channel', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => true,'strChannel'=>'boys']); Route::get('novel-boys-channel', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('pc/novel-boys-channel', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => false,'strChannel'=>'boys']); Route::get('pc/novel-boys-channel', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => false, 'strChannel' => 'boys']);
Route::get('novel-girls-channel', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => true,'strChannel'=>'girls']); Route::get('novel-girls-channel', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
Route::get('pc/novel-girls-channel', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => false,'strChannel'=>'girls']); Route::get('pc/novel-girls-channel', 'Novel/getNovelChannel')->ext('html')->append(['boolIsMobile' => false, 'strChannel' => 'girls']);
//分类 //分类
Route::get('class', 'Novel/getNovelCategory')->ext('html')->append(['boolIsMobile' => true]); Route::get('class', 'Novel/getNovelCategory')->ext('html')->append(['boolIsMobile' => true]);
@@ -43,7 +44,7 @@ Route::get('/pc/books/[:intCategoryId]-[:intPage]', 'Novel/getNovelCategory')->e
// 书库 // 书库
Route::get('library', 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => true]); Route::get('library', 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => true]);
Route::get("pc/library",'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => false]); Route::get("pc/library", 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => false]);
Route::get('shuku', 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => true]); Route::get('shuku', 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => true]);
Route::get('pc/shuku', 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => false]); Route::get('pc/shuku', 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => false]);
Route::get('shuku/[:strNovelChannel]-[:intCategoryId]-[:strStatus]-[:strTextNumber]-[:strUpdateTime]-[:strSort]-[:intPage]', 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => true]); Route::get('shuku/[:strNovelChannel]-[:intCategoryId]-[:strStatus]-[:strTextNumber]-[:strUpdateTime]-[:strSort]-[:intPage]', 'Novel/getLibrary')->ext('html')->append(['boolIsMobile' => true]);
@@ -60,14 +61,36 @@ Route::get('/article/info-:intArticleId', 'Novel/getArticleInfo')->ext('html')->
Route::get('/pc/article/info-:intArticleId', 'Novel/getArticleInfo')->ext('html')->append(['boolIsMobile' => false]); Route::get('/pc/article/info-:intArticleId', 'Novel/getArticleInfo')->ext('html')->append(['boolIsMobile' => false]);
// 小说详情 // 小说详情
Route::get('/info/:intNovelId', 'Novel/getNovelInfo')->ext('html')->append(['boolIsMobile' => true]); Route::get('/info/:intNovelId', [Novel::class, 'getNovelInfo'])->ext('html')->append(['boolIsMobile' => true]);
Route::get('/pc/info/:intNovelId', 'Novel/getNovelInfo')->ext('html')->append(['boolIsMobile' => false]); Route::get('/pc/info/:intNovelId', [Novel::class, 'getNovelInfo'])->ext('html')->append(['boolIsMobile' => false]);
Route::get('/novel/:intNovelId', 'Novel/getNovelInfo')->ext('html')->append(['boolIsMobile' => true]); Route::get('/novel/:intNovelId', [Novel::class, 'getNovelInfo'])->ext('html')->append(['boolIsMobile' => true]);
Route::get('/pc/novel/:intNovelId', 'Novel/getNovelInfo')->ext('html')->append(['boolIsMobile' => false]); Route::get('/pc/novel/:intNovelId', [Novel::class, 'getNovelInfo'])->ext('html')->append(['boolIsMobile' => false]);
Route::get('/shu/:intNovelId', 'Novel/getNovelInfo')->ext('html')->append(['boolIsMobile' => true]);
Route::get('/pc/shu/:intNovelId', 'Novel/getNovelInfo')->ext('html')->append(['boolIsMobile' => false]); // example
Route::get('/kan/:intNovelId', 'Novel/getNovelInfo')->ext('html')->append(['boolIsMobile' => true]); // /book/{strPinYin}-{intNId}.html
Route::get('/pc/kan/:intNovelId', 'Novel/getNovelInfo')->ext('html')->append(['boolIsMobile' => false]); // /novel/{strPinYin}-{intNId}.html
// /novel-{strPinYin}-{intNId}.html
// /book-{strPinYin}-{intNId}.html
Route::get('/pc/book/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 1])
->pattern(['n_id' => '\d+','name' => '[\w-]+',])
->ext('html');
Route::get('/pc/novel/:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+','name' => '[\w-]+',])
->ext('html');
Route::get('/pc/novel-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 3])
->pattern(['n_id' => '\d+','name' => '[\w-]+',])
->ext('html');
Route::get('/pc/book-:name-:n_id', [Novel::class, 'getNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 4])
->pattern(['n_id' => '\d+','name' => '[\w-]+',])
->ext('html');
// 小说章节 // 小说章节
Route::get('chapter/:intNovelId-:intChapterId-[:intChapterPage]', 'Novel/getNovelChapter')->ext('html')->append(['boolIsMobile' => true]); Route::get('chapter/:intNovelId-:intChapterId-[:intChapterPage]', 'Novel/getNovelChapter')->ext('html')->append(['boolIsMobile' => true]);

View File

@@ -13,7 +13,7 @@ class Novel extends BaseController
{ {
public function index() public function index()
{ {
return View::fetch(); return View::fetch();
} }
@@ -120,10 +120,10 @@ class Novel extends BaseController
} }
// 书库 [:strNovelChannel]-[:intCategoryId]-[:strStatus]-[:strTextNumber]-[:strUpdateTime]-[:strSort] // 书库 [:strNovelChannel]-[:intCategoryId]-[:strStatus]-[:strTextNumber]-[:strUpdateTime]-[:strSort]
public function getLibrary(Request $Request,$strNovelChannel=null,$intCategoryId=null,$strStatus=null,$strTextNumber=null,$strUpdateTime=null,$strSort=null,$intPage=1) public function getLibrary(Request $Request, $strNovelChannel = null, $intCategoryId = null, $strStatus = null, $strTextNumber = null, $strUpdateTime = null, $strSort = null, $intPage = 1)
{ {
$boolIsMobile = $Request->param('boolIsMobile'); $boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据 // 模拟数据
$arrNovel = [ $arrNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'], ['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -147,13 +147,40 @@ class Novel extends BaseController
} }
} }
// 书架
public function getBookShelf(Request $Request)
{
$boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据
$arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
['id' => 2, 'name' => '小说2', 'author' => '作者2'],
['id' => 3, 'name' => '小说3', 'author' => '作者3'],
['id' => 4, 'name' => '小说3', 'author' => '作者3'],
['id' => 5, 'name' => '小说3', 'author' => '作者3'],
['id' => 6, 'name' => '小说3', 'author' => '作者3'],
['id' => 7, 'name' => '小说3', 'author' => '作者3'],
['id' => 8, 'name' => '小说3', 'author' => '作者3'],
];
View::assign([
'arrNewsNovel' => $arrNewsNovel,
'strPageCode' => 'bookshelf'
]);
if ($boolIsMobile) {
return View::fetch();
} else {
return View::fetch('pc/getBookShelf');
}
}
// 男生女生频道 // 男生女生频道
public function getNovelChannel(Request $Request) public function getNovelChannel(Request $Request)
{ {
$boolIsMobile = $Request->param('boolIsMobile'); $boolIsMobile = $Request->param('boolIsMobile');
$strNovelChannel = $Request->param('strChannel'); // 区分男生/女生频道 $strNovelChannel = $Request->param('strChannel'); // 区分男生/女生频道
// 模拟数据-推荐等级为9的连载的男生频道/女生频道, 随机12个小说 // 模拟数据-推荐等级为9的连载的男生频道/女生频道, 随机12个小说
$arrRecommendSerializationNovel = [ $arrRecommendSerializationNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'], ['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -179,8 +206,8 @@ class Novel extends BaseController
['id' => 6, 'name' => '小说3', 'author' => '作者3'], ['id' => 6, 'name' => '小说3', 'author' => '作者3'],
['id' => 7, 'name' => '小说3', 'author' => '作者3'], ['id' => 7, 'name' => '小说3', 'author' => '作者3'],
['id' => 8, 'name' => '小说3', 'author' => '作者3'], ['id' => 8, 'name' => '小说3', 'author' => '作者3'],
]; ];
// 模拟数据-最近更新-随机50 // 模拟数据-最近更新-随机50
$arrNewsUpdateNovel = [ $arrNewsUpdateNovel = [
@@ -219,13 +246,13 @@ class Novel extends BaseController
return View::fetch('pc/getNovelChannel'); return View::fetch('pc/getNovelChannel');
} }
} }
// 分类 // 分类
public function getNovelCategory(Request $Request,$intCategoryId = null ,$intPage = 1) public function getNovelCategory(Request $Request,$intCategoryId = null ,$intPage = 1)
{ {
$boolIsMobile = $Request->param('boolIsMobile'); $boolIsMobile = $Request->param('boolIsMobile');
$strChannel = $Request->param('strChannel'); // 区分男生 / 女生频道 $strChannel = $Request->param('strChannel'); // 区分男生 / 女生频道
// 模拟数据-推荐等级为9的连载的男生频道/女生频道, 随机12个小说 // 模拟数据-推荐等级为9的连载的男生频道/女生频道, 随机12个小说
$arrRecommendSerializationNovel = [ $arrRecommendSerializationNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'], ['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -251,8 +278,8 @@ class Novel extends BaseController
['id' => 6, 'name' => '小说3', 'author' => '作者3'], ['id' => 6, 'name' => '小说3', 'author' => '作者3'],
['id' => 7, 'name' => '小说3', 'author' => '作者3'], ['id' => 7, 'name' => '小说3', 'author' => '作者3'],
['id' => 8, 'name' => '小说3', 'author' => '作者3'], ['id' => 8, 'name' => '小说3', 'author' => '作者3'],
]; ];
// 模拟数据-最近更新-随机50 // 模拟数据-最近更新-随机50
$arrNewsUpdateNovel = [ $arrNewsUpdateNovel = [
@@ -293,10 +320,14 @@ class Novel extends BaseController
} }
// 小说详情 // 小说详情
public function getNovelInfo(Request $Request,$intNovelId = 1) public function getNovelInfo(Request $Request)
{ {
$intNId = $Request->param('n_id');
$boolIsMobile = $Request->param('boolIsMobile'); $boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据-随机推荐数据10条 // 模拟数据-随机推荐数据10条
$arrRecommendNovel = [ $arrRecommendNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'], ['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -313,7 +344,7 @@ class Novel extends BaseController
// 相邻推荐->关联的 kan 数据 // 相邻推荐->关联的 kan 数据
// 精品推荐->同分类随机10条数据 // 精品推荐->同分类随机10条数据
// 最新要点->取新意章节, 随机提取一部分内容 大概150字数 // 最新要点->取新意章节, 随机提取一部分内容 大概150字数
View::assign([ View::assign([
'arrRecommendNovel' => $arrRecommendNovel, 'arrRecommendNovel' => $arrRecommendNovel,
@@ -330,7 +361,7 @@ class Novel extends BaseController
public function getNovelChapter(Request $Request, $intNovelId = 1, $intChapterId = 1, $intChapterPage = 1) public function getNovelChapter(Request $Request, $intNovelId = 1, $intChapterId = 1, $intChapterPage = 1)
{ {
$boolIsMobile = $Request->param('boolIsMobile'); $boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据 // 模拟数据
$arrNewsNovel = [ $arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'], ['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -382,13 +413,13 @@ class Novel extends BaseController
} }
} }
// 小说章节-搜索 // 小说章节-搜索
public function getSearchNovel(Request $Request) public function getSearchNovel(Request $Request)
{ {
$boolIsMobile = $Request->param('boolIsMobile'); $boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据 // 模拟数据
$arrSearchNovel = [ $arrSearchNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'], ['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -413,10 +444,10 @@ class Novel extends BaseController
} }
// 小说章节-文章-自定义页面-列表 // 小说章节-文章-自定义页面-列表
public function getArticleList(Request $Request,$intCategoryId = null ,$intPage = 1) public function getArticleList(Request $Request, $intCategoryId = null, $intPage = 1)
{ {
$boolIsMobile = $Request->param('boolIsMobile'); $boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据 // 模拟数据
$arrNewsNovel = [ $arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'], ['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -441,10 +472,10 @@ class Novel extends BaseController
} }
// 小说章节-文章-自定义页面-详情 // 小说章节-文章-自定义页面-详情
public function getArticleInfo(Request $Request,$intArticleId) public function getArticleInfo(Request $Request, $intArticleId)
{ {
$boolIsMobile = $Request->param('boolIsMobile'); $boolIsMobile = $Request->param('boolIsMobile');
// 模拟数据 // 模拟数据
$arrNewsNovel = [ $arrNewsNovel = [
['id' => 1, 'name' => '小说1', 'author' => '作者1'], ['id' => 1, 'name' => '小说1', 'author' => '作者1'],
@@ -467,7 +498,4 @@ class Novel extends BaseController
return View::fetch('pc/getArticleInfo'); return View::fetch('pc/getArticleInfo');
} }
} }
} }

View File

@@ -48,18 +48,24 @@
<div class="area_head"> <div class="area_head">
<span class="log_line"></span> <span class="log_line"></span>
<h4><s class="book"></s>完本推荐</h4> <h4><s class="book"></s>完本推荐</h4>
<!-- test code start -->
<i>{site:grm domain="Request->DomainModel->d_domain" code="kuangyu-pc-index" line="50" diff="0"/}</i>
<i>{site:wz wz="保存永久访问二维码" /}</i>
<!-- test code end -->
<span class="log_line"></span> <span class="log_line"></span>
</div> </div>
<ul class="f2_list" mod="hot_tj"> <ul class="f2_list" mod="hot_tj">
{foreach $arrRecommendEndNovel as $key=>$Novel} {foreach $arrRecommendEndNovel as $key=>$Novel}
<li> <li>
<a href="/pc/novel/334.html" title="{$Novel->og_novel_book_name}" target="_blank" class="book_cov"> <a href='/pc{site:nurl n_id="$Novel->n_id" n_py="$Novel->og_novel_pin_yin"/}' title="{$Novel->og_novel_book_name}" target="_blank" class="book_cov">
<img class="lazyload_book_cover lazyload-img" <img class="lazyload_book_cover lazyload-img"
src="/static/img/default.jpg" data-src="{$Novel->n_cover_path}" src="/static/img/default.jpg" data-src="{$Novel->n_cover_path}"
alt="{$Novel->og_novel_book_name}"> alt="{$Novel->og_novel_book_name}">
</a> </a>
<div class="book_inf"> <div class="book_inf">
<h3><a href="/pc/novel/334.html" title="{$Novel->og_novel_book_name}" target="_blank">{$Novel->og_novel_book_name}</a></h3> <h3><a href='/pc{site:nurl n_id="$Novel->n_id" n_py="$Novel->og_novel_pin_yin"/}' title="{$Novel->og_novel_book_name}" target="_blank">{$Novel->og_novel_book_name}</a></h3>
<span class="aut">{$Novel->og_novel_author}</span> <span class="aut">{$Novel->og_novel_author}</span>
</div> </div>
</li> </li>

View File

@@ -27,4 +27,24 @@ class DomainModel extends BaseModel
$strKey = "D:" . $strDomain; $strKey = "D:" . $strDomain;
return Cache::delete($strKey); return Cache::delete($strKey);
} }
/**
* Undocumented function
*
* @param string $strWords
* @return string
*/
static public function wordsEncode($strWords): string
{
$Request = request();
$intEncode = $Request->DomainModel->d_content_encode;
if ($intEncode == 1) {
$strWords = customEntities($strWords);
}
return $strWords;
}
} }

View File

@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace app\model;
use DateTime;
use Exception;
use storage\StorageCore;
use think\facade\Cache;
use think\Model;
/**
* @mixin think\Model
*/
class GanRaoMaModel extends MongoModel
{
/**
* Undocumented variable
*
* @var string
*/
protected $strCollection = 'gan_rao_ma';
/**
* Undocumented function
*
* @param string $strDomain
* @param string $strPageCode
* @param int $intLine
* @param string $strDifference
* @return string
*/
static public function getGrmCode($strDomain, $strPageCode, $intLine, $strDifference): string
{
return (string)mt_rand(1, 100);
}
}

View File

@@ -326,4 +326,32 @@ class NovelModel extends MongoModel
return []; return [];
} }
} }
/**
* Undocumented function
*
* @param int $intNId
* @param string $intPinYin
* @return string
*/
static public function getNovelInfoUrl($intNId, $intPinYin): string
{
$Request = request();
$strFomart = $Request->DomainModel->d_novel_info_url_fomart;
return str_replace(
[
'{intNId}',
'{strPinYin}',
],
[
$intNId,
$intPinYin
],
$strFomart
);
return $strUrl;
}
} }

View File

@@ -22,4 +22,17 @@ return [
'taglib_begin' => '{', 'taglib_begin' => '{',
// 标签库标签结束标记 // 标签库标签结束标记
'taglib_end' => '}', 'taglib_end' => '}',
// 自定义标签
'taglib_pre_load' => '\\template\\taglib\\Ad,\\template\\taglib\\Site,\\template\\taglib\\Rs',
// 模板渲染缓存
'display_cache' => env('VIEW_DISPLAY_CACHE', false),
// 是否开启模板编译缓存,设为false则每次都会重新编译
'tpl_cache' => env('VIEW_TPL_CACHE', true),
]; ];

View File

@@ -66,10 +66,16 @@ CREATE TABLE `domain` (
`d_title` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT '', `d_title` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT '',
`d_keywords` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `d_keywords` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`d_description` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `d_description` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`d_statis` text COLLATE utf8mb4_unicode_ci COMMENT '单域名统计',
`d_logo_type` tinyint(1) DEFAULT NULL,
`d_text_log` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`d_img_log` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`d_novel_info_url_fomart` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`d_content_encode` tinyint unsigned DEFAULT '0',
PRIMARY KEY (`d_id`), PRIMARY KEY (`d_id`),
KEY `t_id` (`t_id`), KEY `t_id` (`t_id`),
KEY `d_domain` (`d_domain`) KEY `d_domain` (`d_domain`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='域名表'; ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='域名表';
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -163,12 +169,10 @@ CREATE TABLE `plan_task` (
`pt_enable` tinyint unsigned NOT NULL DEFAULT '1', `pt_enable` tinyint unsigned NOT NULL DEFAULT '1',
`pt_limit` int unsigned NOT NULL DEFAULT '0', `pt_limit` int unsigned NOT NULL DEFAULT '0',
`pt_last_exec` int unsigned NOT NULL DEFAULT '0', `pt_last_exec` int unsigned NOT NULL DEFAULT '0',
`site_id` int DEFAULT '1' COMMENT '站点ID',
PRIMARY KEY (`pt_id`) USING BTREE, PRIMARY KEY (`pt_id`) USING BTREE,
KEY `pt_code` (`pt_code`) USING BTREE, KEY `pt_code` (`pt_code`) USING BTREE,
KEY `pt_enable` (`pt_enable`) USING BTREE, KEY `pt_enable` (`pt_enable`) USING BTREE
KEY `site_id` (`site_id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -186,7 +190,7 @@ CREATE TABLE `system_config` (
`site_id` int DEFAULT '1' COMMENT '站点ID', `site_id` int DEFAULT '1' COMMENT '站点ID',
PRIMARY KEY (`sc_id`), PRIMARY KEY (`sc_id`),
KEY `site_id` (`site_id`) KEY `site_id` (`site_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -232,4 +236,4 @@ CREATE TABLE `zi_yuan_duan_dian` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2025-03-18 22:53:36 -- Dump completed on 2025-03-28 21:52:16

View File

@@ -12,6 +12,8 @@ class Site extends TagLib
'seotdk' => ['attr' => 'code,encode,valcode', 'close' => 0], 'seotdk' => ['attr' => 'code,encode,valcode', 'close' => 0],
'site' => ['attr' => 'code,encode,valcode', 'close' => 0], 'site' => ['attr' => 'code,encode,valcode', 'close' => 0],
'wz' => ['attr' => 'wz', 'close' => 0], 'wz' => ['attr' => 'wz', 'close' => 0],
'nurl' => ['attr' => 'n_id', 'close' => 0],
'grm' => ['attr' => 'domain,code,line,diff', 'close' => 0],
]; ];
/** /**
@@ -89,7 +91,7 @@ EOD;
return $parse; return $parse;
} }
/** /**
* seotdk 标签处理函数 * seotdk 标签处理函数
* *
@@ -131,10 +133,55 @@ EOD;
$parse = <<<EOD $parse = <<<EOD
<?php <?php
\$strCfgVal = \\template\\ziku\\WordsEntities::getWords("{$strWords}"); \$strEncodeWords = \\app\\model\\DomainModel::wordsEncode("{$strWords}");
echo \$strCfgVal; echo \$strEncodeWords;
?> ?>
EOD; EOD;
return $parse; return $parse;
} }
/**
* 小说详情URL生成器
*
* @param array $n_id
* @return string
*/
public function tagNUrl($tag)
{
$intNId = isset($tag['n_id']) ? $tag['n_id'] : '';
$strNPy = isset($tag['n_py']) ? $tag['n_py'] : '';
$strParse = <<<EOD
<?php
\$strUrl = \\app\\model\\NovelModel::getNovelInfoUrl("{$intNId}","{$strNPy}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
/**
* 干扰码
*
* @param array $n_id
* @return string
*/
public function tagGrm($tag)
{
$strDomain = isset($tag['domain']) ? $tag['domain'] : '';
$strPageCode = isset($tag['code']) ? $tag['code'] : '';
$intLine = isset($tag['line']) ? $tag['line'] : 0;
$strDifference = isset($tag['diff']) ? $tag['diff'] : '';
$strParse = <<<EOD
<?php
\$strUrl = \\app\\model\\GanRaoMaModel::getGrmCode("{$strDomain}","{$strPageCode}","{$intLine}","{$strDifference}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
} }