debug
This commit is contained in:
@@ -14,89 +14,34 @@ use app\Request;
|
|||||||
|
|
||||||
class Index extends BaseController
|
class Index extends BaseController
|
||||||
{
|
{
|
||||||
// 首页-H5
|
/**
|
||||||
|
* 首页-H5
|
||||||
|
*
|
||||||
|
* @param Request $Request
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function index(Request $Request)
|
public function index(Request $Request)
|
||||||
{
|
{
|
||||||
// 获取路由附加的参数
|
// 获取路由附加的参数
|
||||||
$boolIsMobile = $Request->param('boolIsMobile');
|
$boolIsMobile = $Request->param('boolIsMobile');
|
||||||
|
|
||||||
// 模拟数据-推荐等级为9的 随机8个小说
|
$NovelModel = new NovelModel;
|
||||||
$arrRecommendNovel = [
|
|
||||||
['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'],
|
|
||||||
|
|
||||||
];
|
// 推荐等级为9的连载的 随机15个小说
|
||||||
|
$strKey = $Request->DomainModel->d_domain . ':H5:';
|
||||||
|
$arrRecommendNovel = $NovelModel->getHighLevelNovelOnCache($strKey, 8);
|
||||||
|
|
||||||
// 模拟数据-最新 随机8个小说
|
$arrNewsNovel = $NovelModel->getSexNovelOnCache($strKey, 8, 0);
|
||||||
$arrNewsNovel = [
|
|
||||||
['id' => 1, 'name' => '小说1', 'author' => '作者1'],
|
$arrDayRankNovel = $NovelModel->getRankNovelOnCache($strKey, 10, 0, 'daily');
|
||||||
['id' => 2, 'name' => '小说2', 'author' => '作者2'],
|
|
||||||
['id' => 3, 'name' => '小说3', 'author' => '作者3'],
|
$arrWeekRankNovel = $NovelModel->getRankNovelOnCache($strKey, 10, 0, 'weekly');
|
||||||
['id' => 4, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
['id' => 5, 'name' => '小说3', 'author' => '作者3'],
|
$arrMoonRankNovel = $NovelModel->getRankNovelOnCache($strKey, 10, 0, 'monthly');
|
||||||
['id' => 6, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
['id' => 7, 'name' => '小说3', 'author' => '作者3'],
|
$strStatus = '已完结';
|
||||||
['id' => 8, 'name' => '小说3', 'author' => '作者3'],
|
$arrEndNovelRankNovel = $NovelModel->getRankNovelOnCache($strKey, 10, 0, 'total',$strStatus);
|
||||||
];
|
|
||||||
|
|
||||||
// 模拟数据-日排行榜 随机10个小说
|
|
||||||
$arrDayRankNovel = [
|
|
||||||
['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'],
|
|
||||||
['id' => 9, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
['id' => 10, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
];
|
|
||||||
// 模拟数据-周排行榜 随机10个小说
|
|
||||||
$arrWeekRankNovel = [
|
|
||||||
['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'],
|
|
||||||
['id' => 9, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
['id' => 10, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
];
|
|
||||||
// 模拟数据-月排行榜 随机10个小说
|
|
||||||
$arrMoonRankNovel = [
|
|
||||||
['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'],
|
|
||||||
['id' => 9, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
['id' => 10, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
];
|
|
||||||
// 模拟数据-完结小说 总排行榜 随机10个小说
|
|
||||||
$arrEndNovelRankNovel = [
|
|
||||||
['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'],
|
|
||||||
['id' => 9, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
['id' => 10, 'name' => '小说3', 'author' => '作者3'],
|
|
||||||
];
|
|
||||||
|
|
||||||
View::assign([
|
View::assign([
|
||||||
'arrRecommendNovel' => $arrRecommendNovel,
|
'arrRecommendNovel' => $arrRecommendNovel,
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ use template\page\CusteomPage02;
|
|||||||
|
|
||||||
class Novel extends BaseController
|
class Novel extends BaseController
|
||||||
{
|
{
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
|
|
||||||
return View::fetch();
|
/**
|
||||||
}
|
* 小说排行
|
||||||
|
*
|
||||||
// 小说排行
|
* @param Request $Request
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function getNovelRank(Request $Request)
|
public function getNovelRank(Request $Request)
|
||||||
{
|
{
|
||||||
$boolIsMobile = $Request->param('boolIsMobile');
|
$boolIsMobile = $Request->param('boolIsMobile');
|
||||||
@@ -219,25 +219,17 @@ class Novel extends BaseController
|
|||||||
return View::fetch($strTemplate);
|
return View::fetch($strTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 书架
|
/**
|
||||||
|
* 书架
|
||||||
|
*
|
||||||
|
* @param Request $Request
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function getBookShelf(Request $Request)
|
public function getBookShelf(Request $Request)
|
||||||
{
|
{
|
||||||
$boolIsMobile = $Request->param('boolIsMobile');
|
$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([
|
View::assign([
|
||||||
'arrNewsNovel' => $arrNewsNovel,
|
|
||||||
'strPageCode' => 'bookshelf'
|
'strPageCode' => 'bookshelf'
|
||||||
]);
|
]);
|
||||||
if ($boolIsMobile) {
|
if ($boolIsMobile) {
|
||||||
@@ -295,7 +287,14 @@ class Novel extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分类
|
/**
|
||||||
|
* 分类
|
||||||
|
*
|
||||||
|
* @param Request $Request
|
||||||
|
* @param [type] $intCategoryId
|
||||||
|
* @param integer $intPage
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
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');
|
||||||
@@ -367,7 +366,12 @@ class Novel extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 小说详情
|
/**
|
||||||
|
* 小说详情
|
||||||
|
*
|
||||||
|
* @param Request $Request
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function getNovelInfo(Request $Request)
|
public function getNovelInfo(Request $Request)
|
||||||
{
|
{
|
||||||
$intNId = $Request->param('n_id');
|
$intNId = $Request->param('n_id');
|
||||||
@@ -424,7 +428,12 @@ class Novel extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 最新章节-特殊页面处理
|
/**
|
||||||
|
* 最新章节-特殊页面处理
|
||||||
|
*
|
||||||
|
* @param Request $Request
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function getNovelNewsChapter(Request $Request)
|
public function getNovelNewsChapter(Request $Request)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -571,7 +580,14 @@ class Novel extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 小说章节-文章-自定义页面-列表
|
/**
|
||||||
|
* 小说章节-文章-自定义页面-列表
|
||||||
|
*
|
||||||
|
* @param Request $Request
|
||||||
|
* @param [type] $intCategoryId
|
||||||
|
* @param integer $intPage
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
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');
|
||||||
@@ -599,7 +615,13 @@ class Novel extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 小说章节-文章-自定义页面-详情
|
/**
|
||||||
|
* 小说章节-文章-自定义页面-详情
|
||||||
|
*
|
||||||
|
* @param Request $Request
|
||||||
|
* @param [type] $intArticleId
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function getArticleInfo(Request $Request, $intArticleId)
|
public function getArticleInfo(Request $Request, $intArticleId)
|
||||||
{
|
{
|
||||||
$boolIsMobile = $Request->param('boolIsMobile');
|
$boolIsMobile = $Request->param('boolIsMobile');
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
<li class="s1">
|
<li class="s1">
|
||||||
<img class="pic lazy lazyload-img" data-encrypted="false" src="/static/img/default.jpg" data-src="https://www.630zw.org/img/176943.jpg"
|
<img class="pic lazy lazyload-img" data-encrypted="false"
|
||||||
alt="我真是一条龙" />
|
src="/static/img/default.jpg" data-src="https://www.630zw.org/img/176943.jpg"
|
||||||
<a class="tit" href='/book-name-1'>我真是一条龙</a>
|
alt="{$Novel.og_novel_book_name ?? ''}" />
|
||||||
<p class="intro">
|
<a class="tit" href='{site:nurl n_id="$Novel->n_id" n_py="$Novel->og_novel_pin_yin"/}'>{$Novel.og_novel_book_name ?? ''}</a>
|
||||||
我的父亲告诉我,在我出生那一年,天上金光闪耀,隐隐约约中,好像能看到云朵里有条龙在盘旋,紧接着,一道金光照入我们的村子,我便出生了……为寻答案来人间,天龙问世扰乾坤。
|
<p class="intro">{$Novel.og_description ?? ''}</p>
|
||||||
无情无义闹天下,千军万马赴黄泉。
|
|
||||||
本站提示:各位书友要是觉得《我真是一条龙》还不错的话请不要忘记向您QQ群和微博里的朋友推荐哦!
|
|
||||||
</p>
|
|
||||||
<p class="info">
|
<p class="info">
|
||||||
<span>
|
<span>
|
||||||
<aria>作者:</aria>兔子很淡定
|
<aria>作者:</aria>{$Novel.og_novel_author ?? ''}
|
||||||
</span>
|
</span>
|
||||||
<em class="type">耽美百合</em>
|
<em class="type">{$Novel->og_novel_category ?? ''}</em>
|
||||||
<!-- <em class="finish">已完结</em> -->
|
<em class='{eq name="$Novel->og_novel_status" value="连载中"}serial{else}finish {/eq}'>{$Novel->og_novel_status ?? ''}</em>
|
||||||
<em class="serial">已完结</em>
|
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href='/book-name-1'>
|
<a href='{site:nurl n_id="$Novel->n_id" n_py="$Novel->og_novel_pin_yin"/}'>
|
||||||
<img class="lazy lazyload-img" data-encrypted="false" src="/static/img/default.jpg"
|
<img class="lazy lazyload-img" data-encrypted="false" src="/static/img/default.jpg"
|
||||||
data-src="https://www.630zw.org/img/176943.jpg" alt="落魄千金美食发家日常" />
|
data-src="{$Novel.n_cover_path ?? ''}" alt="{$Novel.og_novel_book_name ?? ''}" />
|
||||||
<span>落魄千金美食发家日常</span>
|
<span>{$Novel.og_novel_book_name ?? ''}</span>
|
||||||
<em>
|
<em>
|
||||||
<aria>作者:</aria>鱼昆子
|
<aria>作者:</aria>{$Novel.og_novel_author ?? ''}
|
||||||
</em>
|
</em>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -111,6 +111,7 @@ class NovelModel extends MongoModel
|
|||||||
'og_description' => 1,
|
'og_description' => 1,
|
||||||
'og_novel_latest_chapter_name' => 1,
|
'og_novel_latest_chapter_name' => 1,
|
||||||
'og_novel_update_time' => 1,
|
'og_novel_update_time' => 1,
|
||||||
|
'og_novel_status' => 1,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -269,6 +270,7 @@ class NovelModel extends MongoModel
|
|||||||
'n_novel_author' => 1,
|
'n_novel_author' => 1,
|
||||||
'og_novel_category' => 1,
|
'og_novel_category' => 1,
|
||||||
'og_description' => 1,
|
'og_description' => 1,
|
||||||
|
'og_novel_status' => 1,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -325,6 +327,7 @@ class NovelModel extends MongoModel
|
|||||||
'og_novel_author' => 1,
|
'og_novel_author' => 1,
|
||||||
'og_novel_category' => 1,
|
'og_novel_category' => 1,
|
||||||
'og_description' => 1,
|
'og_description' => 1,
|
||||||
|
'og_novel_status' => 1,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -393,6 +396,7 @@ class NovelModel extends MongoModel
|
|||||||
'og_description' => 1,
|
'og_description' => 1,
|
||||||
'og_novel_update_time' => 1,
|
'og_novel_update_time' => 1,
|
||||||
'og_novel_latest_chapter_name' => 1,
|
'og_novel_latest_chapter_name' => 1,
|
||||||
|
'og_novel_status' => 1,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -429,7 +433,7 @@ class NovelModel extends MongoModel
|
|||||||
* * total 总
|
* * total 总
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getRankNovelOnCache(string $strSign, int $intCount = 10, int $intType = 0, $strDateType = 'daily'): array
|
public function getRankNovelOnCache(string $strSign, int $intCount = 10, int $intType = 0, $strDateType = 'daily', $strStatus = NULL): array
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$strKey = sprintf('%s:PC:HOME:SIX:%s:TYPE:%s', $strSign, $intType, $strDateType);
|
$strKey = sprintf('%s:PC:HOME:SIX:%s:TYPE:%s', $strSign, $intType, $strDateType);
|
||||||
@@ -443,6 +447,11 @@ class NovelModel extends MongoModel
|
|||||||
$arrFilter = [
|
$arrFilter = [
|
||||||
'nc_type' => $strDateType,
|
'nc_type' => $strDateType,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($strStatus !== NULL) {
|
||||||
|
$arrFilter['og_novel_status'] = $strStatus;
|
||||||
|
}
|
||||||
|
|
||||||
if ($intType == 1) {
|
if ($intType == 1) {
|
||||||
$arrCategory = array_values(CategoryModel::getManCategory());
|
$arrCategory = array_values(CategoryModel::getManCategory());
|
||||||
$arrFilter['n_category'] = ['$in' => $arrCategory];
|
$arrFilter['n_category'] = ['$in' => $arrCategory];
|
||||||
@@ -450,6 +459,8 @@ class NovelModel extends MongoModel
|
|||||||
$arrCategory = array_values(CategoryModel::getWomenCategory());
|
$arrCategory = array_values(CategoryModel::getWomenCategory());
|
||||||
$arrFilter['n_category'] = ['$in' => $arrCategory];
|
$arrFilter['n_category'] = ['$in' => $arrCategory];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$arrOptions = [
|
$arrOptions = [
|
||||||
'sort' => ['nc_clicks' => -1],
|
'sort' => ['nc_clicks' => -1],
|
||||||
'limit' => $intCount * 3,
|
'limit' => $intCount * 3,
|
||||||
@@ -478,6 +489,7 @@ class NovelModel extends MongoModel
|
|||||||
'n_novel_author' => 1,
|
'n_novel_author' => 1,
|
||||||
'og_novel_category' => 1,
|
'og_novel_category' => 1,
|
||||||
'og_description' => 1,
|
'og_description' => 1,
|
||||||
|
'og_novel_status' => 1,
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class TemplateSeeder
|
|||||||
't_code' => 'default',
|
't_code' => 'default',
|
||||||
't_path' => '/app/home/view/default/',
|
't_path' => '/app/home/view/default/',
|
||||||
't_cfg_template' => [
|
't_cfg_template' => [
|
||||||
'INDEX@GETPCINDEX' => [
|
'HOME@GETPCINDEX' => [
|
||||||
'description' => '首页Title 替换模板分组ID',
|
'description' => '首页Title 替换模板分组ID',
|
||||||
'sfg_id' => 0,
|
'sfg_id' => 0,
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -7,116 +7,13 @@ use think\template\TagLib;
|
|||||||
class Site extends TagLib
|
class Site extends TagLib
|
||||||
{
|
{
|
||||||
protected $tags = [
|
protected $tags = [
|
||||||
'cfg' => ['attr' => 'code,encode', 'close' => 0],
|
|
||||||
'adcfg' => ['attr' => 'code,encode', 'close' => 0],
|
|
||||||
'seotdk' => ['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],
|
'nurl' => ['attr' => 'n_id', 'close' => 0],
|
||||||
'grm' => ['attr' => 'domain,code,line,diff', 'close' => 0],
|
'grm' => ['attr' => 'domain,code,line,diff', 'close' => 0],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* site 标签处理函数
|
|
||||||
*
|
|
||||||
* @param array $tag
|
|
||||||
* @param string $content
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function tagSite($tag)
|
|
||||||
{
|
|
||||||
$encode = isset($tag['encode']) ? $tag['encode'] : 'false';
|
|
||||||
$valcode = isset($tag['valcode']) ? $tag['valcode'] : '';
|
|
||||||
|
|
||||||
$parse = <<<EOD
|
|
||||||
<?php
|
|
||||||
\$strCfgVal = \\app\\admin\\model\\SiteModel::getValBySiteIdByValCode("{$valcode}");
|
|
||||||
if ("{$encode}" === "true") {
|
|
||||||
echo customEntities(\$strCfgVal);
|
|
||||||
} else {
|
|
||||||
echo \$strCfgVal ;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
EOD;
|
|
||||||
return $parse;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* cfg 标签处理函数
|
|
||||||
*
|
|
||||||
* @param array $tag
|
|
||||||
* @param string $content
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function tagCfg($tag)
|
|
||||||
{
|
|
||||||
$code = isset($tag['code']) ? $tag['code'] : '';
|
|
||||||
$encode = isset($tag['encode']) ? $tag['encode'] : 'false';
|
|
||||||
|
|
||||||
$parse = <<<EOD
|
|
||||||
<?php
|
|
||||||
\$strCfgVal = \\app\\admin\\model\\SystemConfigModel::getValByCode("{$code}");
|
|
||||||
if ("{$encode}" === "true") {
|
|
||||||
echo customEntities(\$strCfgVal);
|
|
||||||
} else {
|
|
||||||
echo \$strCfgVal;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
EOD;
|
|
||||||
return $parse;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* adcfg标签处理函数
|
|
||||||
*
|
|
||||||
* @param array $tag
|
|
||||||
* @param string $content
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function tagAdcfg($tag)
|
|
||||||
{
|
|
||||||
$code = isset($tag['code']) ? $tag['code'] : '';
|
|
||||||
$encode = isset($tag['encode']) ? $tag['encode'] : 'false';
|
|
||||||
|
|
||||||
$parse = <<<EOD
|
|
||||||
<?php
|
|
||||||
\$strCfgVal = \\app\\admin\\model\\GuangGaoPeiZhiModel::getValByCode("{$code}");
|
|
||||||
if ("{$encode}" === "true") {
|
|
||||||
echo customEntities(\$strCfgVal);
|
|
||||||
} else {
|
|
||||||
echo \$strCfgVal;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
EOD;
|
|
||||||
return $parse;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* seotdk 标签处理函数
|
|
||||||
*
|
|
||||||
* @param array $tag
|
|
||||||
* @param string $content
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function tagSeotdk($tag)
|
|
||||||
{
|
|
||||||
$code = isset($tag['code']) ? $tag['code'] : '';
|
|
||||||
$encode = isset($tag['encode']) ? $tag['encode'] : 'false';
|
|
||||||
$valcode = isset($tag['valcode']) ? $tag['valcode'] : '';
|
|
||||||
|
|
||||||
$parse = <<<EOD
|
|
||||||
<?php
|
|
||||||
\$strCfgVal = \\app\\admin\\model\\SeoTdkConfigModel::getValByCodeByValCode("{$code}", "{$valcode}");
|
|
||||||
if ("{$encode}" === "true") {
|
|
||||||
echo customEntities(\$strCfgVal);
|
|
||||||
} else {
|
|
||||||
var_dump( \$strCfgVal);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
EOD;
|
|
||||||
return $parse;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user