diff --git a/code/app/home/BaseController.php b/code/app/home/BaseController.php
index 650a39e..dd400b8 100644
--- a/code/app/home/BaseController.php
+++ b/code/app/home/BaseController.php
@@ -62,7 +62,8 @@ abstract class BaseController
*/
protected function initialize()
{
-
+ // TODO 因为视图无法渲染 request 暂时使用这个
+ View::assign("DomainModel", $this->request->DomainModel);
$this->initSiteTKD();
}
diff --git a/code/app/home/controller/Novel.php b/code/app/home/controller/Novel.php
index f8d4654..5d51413 100644
--- a/code/app/home/controller/Novel.php
+++ b/code/app/home/controller/Novel.php
@@ -379,7 +379,6 @@ class Novel extends BaseController
// 分品拼音
$arrNovel['category_pinyin'] = CategoryModel::getPinYinByZh($arrNovel['og_novel_category']);
-
// 最后章节
$ChapterModel = new ChapterModel;
$arrLatestChapter = $ChapterModel->getLatestChapter($intNId);
@@ -431,11 +430,16 @@ class Novel extends BaseController
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
+ // js使用到
+ $arrNovelJs = $arrNovel;
+ unset($arrNovelJs['n_related_novel'], $arrNovelJs['n_forge_novel'], $arrNovelJs['n_page_description']);
View::assign([
'arrRelateveNovel' => $arrRelateveNovel,
'arrNovel' => $arrNovel,
+ 'arrNovelJs' => $arrNovelJs,
'arrChapter' => $arrChapter,
+ 'arrLatestChapter' => $arrLatestChapter,
'arrNovelClicks' => $arrNovelClicks,
'strFocus' => $strFocus,
'strPageCode' => 'boy',
@@ -443,11 +447,12 @@ class Novel extends BaseController
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
+
if ($boolIsMobile) {
- return View::fetch();
+ return View::fetch('getNovelInfo');
} else {
- return View::fetch('pc/getKanNovelInfo');
+ return View::fetch('pc/getNovelInfo');
}
}
@@ -526,6 +531,7 @@ class Novel extends BaseController
'arrRelateveNovel' => $arrRelateveNovel,
'arrNovel' => $arrNovel,
'arrChapter' => $arrChapter,
+ 'arrLatestChapter' => $arrLatestChapter,
'arrNovelClicks' => $arrNovelClicks,
'strFocus' => $strFocus,
'strPageCode' => 'boy',
diff --git a/code/app/home/view/kuangyu/Pc/getArticleInfo.html b/code/app/home/view/kuangyu/Pc/getArticleInfo.html
index 9f73cd8..bb26dab 100644
--- a/code/app/home/view/kuangyu/Pc/getArticleInfo.html
+++ b/code/app/home/view/kuangyu/Pc/getArticleInfo.html
@@ -10,14 +10,15 @@
+ {
+ "@context": "{$DomainModel->d_domain}",
+ "@type": "book",
+ "headline": "{$strTitle??''}",
+ "description": "{$strDescription??''}",
+ "datePublished": "{:date('Y-m-d')}"
+ }
+
+ {/block}
{block name="head-js"}{/block}
diff --git a/code/app/home/view/kuangyu/Pc/getArticleList.html b/code/app/home/view/kuangyu/Pc/getArticleList.html
index b057d9d..9aa03ec 100644
--- a/code/app/home/view/kuangyu/Pc/getArticleList.html
+++ b/code/app/home/view/kuangyu/Pc/getArticleList.html
@@ -10,14 +10,15 @@
+ {
+ "@context": "{$DomainModel->d_domain}",
+ "@type": "book",
+ "headline": "{$strTitle??''}",
+ "description": "{$strDescription??''}",
+ "datePublished": "{:date('Y-m-d')}"
+ }
+
+ {/block}
{block name="head-js"}{/block}
diff --git a/code/app/home/view/kuangyu/Pc/getKanNovelInfo.html b/code/app/home/view/kuangyu/Pc/getKanNovelInfo.html
index 6bd8d0d..d8cbeb1 100644
--- a/code/app/home/view/kuangyu/Pc/getKanNovelInfo.html
+++ b/code/app/home/view/kuangyu/Pc/getKanNovelInfo.html
@@ -4,23 +4,62 @@
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{/block}
{block name="head-js"}{/block}
{block name="head-css"}
-
+
{/block}
{block name="main"}
@@ -40,7 +79,7 @@
-
+
{$arrNovel['og_novel_book_name']}
@@ -51,10 +90,11 @@
-
-
- {$arrNovel.og_novel_status ?? ''}
+
+
+ {$arrNovel.og_novel_status ?? ''}
@@ -76,7 +118,7 @@
简介
-
+
{$arrNovel.n_page_description}
展开
收起
@@ -85,15 +127,15 @@
总点击量:{$arrNovelClicks.total}
@@ -120,7 +161,7 @@
日点击量:{$arrNovelClicks.daily}
-
+
@@ -133,7 +174,8 @@
-
+
精品推荐
{volist name="arrRelateveNovel" id="Novel" key="key"}
- -
-
-
-
-
-
-
+
-
+
+
+
{/volist}
-
+
@@ -190,7 +233,7 @@
{/block}
-{block name="customize"}
+{block name="customize"}
{/block}
diff --git a/code/app/home/view/kuangyu/Pc/getLibrary.html b/code/app/home/view/kuangyu/Pc/getLibrary.html
index 5db00b0..1e3b7a1 100644
--- a/code/app/home/view/kuangyu/Pc/getLibrary.html
+++ b/code/app/home/view/kuangyu/Pc/getLibrary.html
@@ -6,22 +6,23 @@
-
-
+
+
+ {
+ "@context": "{$DomainModel->d_domain}",
+ "@type": "book",
+ "headline": "{$strTitle??''}",
+ "description": "{$strDescription??''}",
+ "datePublished": "{:date('Y-m-d')}"
+ }
+
+ {/block}
{block name="head-js"}{/block}
{block name="head-css"}
-
+
{/block}
diff --git a/code/app/home/view/kuangyu/Pc/getNovelChannel.html b/code/app/home/view/kuangyu/Pc/getNovelChannel.html
index ae3af19..d6a372f 100644
--- a/code/app/home/view/kuangyu/Pc/getNovelChannel.html
+++ b/code/app/home/view/kuangyu/Pc/getNovelChannel.html
@@ -6,25 +6,25 @@
-
-
+
+
-
+{/block}
{block name="head-css"}
{eq name="strPageCode" value="boys"}
-
+
{else}
-
+
{/eq}
{/block}
diff --git a/code/app/home/view/kuangyu/Pc/getNovelChapter.html b/code/app/home/view/kuangyu/Pc/getNovelChapter.html
index 2ad8004..2455f50 100644
--- a/code/app/home/view/kuangyu/Pc/getNovelChapter.html
+++ b/code/app/home/view/kuangyu/Pc/getNovelChapter.html
@@ -2,57 +2,74 @@
-
-
+
+
-
-
{$strTitle??''}
+
+
{$strTitle??''}
{block name="head-css"}
-
+
{/block}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
{/block}
diff --git a/code/app/home/view/kuangyu/Pc/getUserIndex.html b/code/app/home/view/kuangyu/Pc/getUserIndex.html
deleted file mode 100644
index 8bb99f8..0000000
--- a/code/app/home/view/kuangyu/Pc/getUserIndex.html
+++ /dev/null
@@ -1,144 +0,0 @@
-{extend name="basePcUser" /}
-{block name="title"}{$strTitle??''}{/block}
-{block name="keywords"}{$strKeywords??''}{/block}
-{block name="description"}{$strDescription??''}{/block}
-{block name="head-js"}{/block}
-
-
-{block name="main"}
-
-
-
-
-
-
-
-
-
-
- {foreach $arrNewsNovel as $key=>$Novel}
-
- {/foreach}
-
-
-
-
-
-
-
-
-{/block}
-
-{block name="customize"} {/block}
\ No newline at end of file
diff --git a/code/app/home/view/kuangyu/Pc/index.html b/code/app/home/view/kuangyu/Pc/index.html
index 69f4749..1b5e5ae 100644
--- a/code/app/home/view/kuangyu/Pc/index.html
+++ b/code/app/home/view/kuangyu/Pc/index.html
@@ -2,20 +2,23 @@
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
+{block name="head-css"}
+
+{/block}
{block name="head"}
-
+
{/block}
@@ -23,6 +26,7 @@
{block name="main"}
+
@@ -114,12 +118,9 @@
排行榜
- 周月总
+ 周
+ 月
+ 总
@@ -192,12 +193,9 @@
排行榜
- 周月总
+ 周
+ 月
+ 总
diff --git a/code/app/home/view/kuangyu/baseH5.html b/code/app/home/view/kuangyu/baseH5.html
index a550076..d70fb2c 100644
--- a/code/app/home/view/kuangyu/baseH5.html
+++ b/code/app/home/view/kuangyu/baseH5.html
@@ -97,6 +97,10 @@
{include file="Public/footer" /}
{block name="customize"}{/block}
+
+
diff --git a/code/app/home/view/kuangyu/basePc.html b/code/app/home/view/kuangyu/basePc.html
index 9aeb79f..69ecfa6 100644
--- a/code/app/home/view/kuangyu/basePc.html
+++ b/code/app/home/view/kuangyu/basePc.html
@@ -6,7 +6,7 @@
{block name="title"}{/block}
-
+
@@ -74,6 +74,10 @@
{block name="customize"}{/block}
+
+
@@ -85,8 +89,11 @@
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
-
- {Request->DomainModel->d_statis}
+
+
+
+ {$DomainModel->d_statis|raw}
+
diff --git a/code/config/view.php b/code/config/view.php
index d1ce0ca..a436de8 100644
--- a/code/config/view.php
+++ b/code/config/view.php
@@ -14,6 +14,8 @@ return [
'view_suffix' => 'html',
// 模板文件名分隔符
'view_depr' => DIRECTORY_SEPARATOR,
+ // 允许 PHP 函数调用
+ 'tpl_deny_php' => false,
// 模板引擎普通标签开始标记
'tpl_begin' => '{',
// 模板引擎普通标签结束标记
diff --git a/code/database/seeders/SystemConfigSeeder.php b/code/database/seeders/SystemConfigSeeder.php
index f239d47..c02e822 100644
--- a/code/database/seeders/SystemConfigSeeder.php
+++ b/code/database/seeders/SystemConfigSeeder.php
@@ -53,6 +53,11 @@ class SystemConfigSeeder
'sc_val' => "dl",
'sc_description' => '代理商API域名-解析前缀dl-open. 后缀是.xyz ,但这里不需要填前缀和后缀',
],
+ [
+ 'sc_code' => 'PUSH_API_DOMAIN',
+ 'sc_val' => "api.test.com",
+ 'sc_description' => 'api',
+ ],
[
'sc_code' => 'PUBLIC_TONGJI_CODE',
'sc_val' => "",
diff --git a/code/public/template/kuangyu/home/bai_web/css/style.css b/code/public/template/kuangyu/home/bai_web/css/style.css
index c1eb339..2b7d3ee 100644
--- a/code/public/template/kuangyu/home/bai_web/css/style.css
+++ b/code/public/template/kuangyu/home/bai_web/css/style.css
@@ -61,6 +61,11 @@ s{background: url(../images/iconC.png) no-repeat;}
.headWrap_r .long .search_btn s{background-position: -30px 0;}
.headWrap_r .search .search_btn:hover s{background-position: -30px 0;}
+/* 首页 */
+.btn_toggle_mod_bang{
+ width: 33px; line-height: 24px; text-align: center; border-radius: 4px; margin-left: 5px; cursor: pointer; font-size: 13px;
+}
+
/* 登陆 */
.headWrap_r .login{float: right; position: relative; background: #fff; padding-top: 32px;}
.headWrap_r .login .login_before{width: 100px; height: 18px; line-height: 20px; padding-left: 20px; cursor: pointer; display: block;}
@@ -320,6 +325,8 @@ display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;}
.find .opt ul li .on:hover{color: #fff;}
.find .opt .no_bor{border-bottom: none;}
+
+
/*列表*/
.result{background: #fff; width: 1100px; overflow: hidden;}
.search_tip{text-align: center;}
diff --git a/code/public/template/kuangyu/public/js/common.js b/code/public/template/kuangyu/public/js/common.js
index a33f352..ad98914 100644
--- a/code/public/template/kuangyu/public/js/common.js
+++ b/code/public/template/kuangyu/public/js/common.js
@@ -126,9 +126,7 @@ function incShouCangFun(intId) {
function addBookshelfFun(NovelInfo) {
if (!NovelInfo) {
- NovelInfo = JSON.parse(arrNovel)
- NovelInfo['c_sort_num'] = strChapterSort;
- NovelInfo['c_name'] = strChapterName;
+ NovelInfo = arrNovel
}
let arrBookshelf = JSON.parse(localStorage.getItem('strBookshelfKey')) || [];
@@ -251,17 +249,14 @@ function displayBookshelf() {
// 加入阅读记录
function addHistoryFun(NovelInfo) {
-
// 如果没有传入 NovelInfo,则使用 arrNovel 并补充字段
if (!NovelInfo) {
- NovelInfo = JSON.parse(arrNovel);
- NovelInfo['c_sort_num'] = strChapterSort;
- NovelInfo['c_name'] = strChapterName;
+ NovelInfo = arrNovel
+
}
// 获取本地存储中的历史记录
let arrBookshelf = JSON.parse(localStorage.getItem('strHistoryKey')) || [];
-
// 检查书籍是否已存在
const index = arrBookshelf.findIndex(item => item.n_id === NovelInfo.n_id);
@@ -379,7 +374,7 @@ function displayHistory() {
// 方法1:使用 fetch API
async function reportStats(data) {
try {
- const response = await fetch('http://api.novel2.com/publish', {
+ const response = await fetch(strPushApi+'/publish', {
method: 'POST',
// mode: 'no-cors', // 添加这行
headers: {