debug
This commit is contained in:
@@ -5,16 +5,16 @@ declare(strict_types=1);
|
|||||||
use app\home\controller\Index;
|
use app\home\controller\Index;
|
||||||
use app\home\controller\Novel;
|
use app\home\controller\Novel;
|
||||||
use app\home\controller\User;
|
use app\home\controller\User;
|
||||||
|
use app\services\SiteContext;
|
||||||
use think\facade\Route;
|
use think\facade\Route;
|
||||||
|
|
||||||
|
|
||||||
Route::get('/article/fenlei/:category', function (\think\Request $Request) {
|
Route::get('/article/fenlei/:category', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||||
return view('test/test01/index.html');
|
return view($SiteContext->getHomeView());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路由配置文件
|
* 路由配置文件
|
||||||
*/
|
*/
|
||||||
@@ -83,7 +83,7 @@ $arrRoutes = [
|
|||||||
* 完整路由
|
* 完整路由
|
||||||
* 暂时不需要开放
|
* 暂时不需要开放
|
||||||
* 使用: {site:nflurl gender="$strGender" category="$CategoryPinyin" status="all" order="all" page="1"/}
|
* 使用: {site:nflurl gender="$strGender" category="$CategoryPinyin" status="all" order="all" page="1"/}
|
||||||
*/
|
*/
|
||||||
// '/shuku/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
|
// '/shuku/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
|
||||||
// '/books/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
|
// '/books/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
|
||||||
// '/library/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
|
// '/library/:strGender/:strCategory/:strStatus/:strOrder/page:intPage',
|
||||||
|
|||||||
14
code/app/home/view/default/test/test01/faker.html
Normal file
14
code/app/home/view/default/test/test01/faker.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
{novel:info n_id="$DomainModel->n_id" n_key="arrNovel01" n_forge_id="1125940" /}
|
||||||
|
<title>{$arrNovel01.n_name} - 首页</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
{$arrNovel01.n_description}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{site:grm page_code="fdasfadsf" diff="fadsfdsa" num="10" g_key="arrGrm" /}
|
<!-- {site:grm page_code="fdasfadsf" diff="fadsfdsa" num="10" g_key="arrGrm" /}
|
||||||
{php}var_dump($arrGrm);{/php}
|
{php}var_dump($arrGrm);{/php} -->
|
||||||
|
|
||||||
<!-- {chapter:info n_id="1" c_sort_num="200" c_page="0" c_key="arrChapter01" /}
|
<!-- {chapter:info n_id="1" c_sort_num="200" c_page="0" c_key="arrChapter01" /}
|
||||||
{$arrChapter01.c_name} -->
|
{$arrChapter01.c_name} -->
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- {novel:info n_id="33" n_key="arrNovel01" n_forge_id="1125940" /}
|
{novel:info n_id="33" n_key="arrNovel01" n_forge_id="1125940" /}
|
||||||
{$arrNovel01.n_name} -->
|
{$arrNovel01.n_name}
|
||||||
|
|
||||||
<!-- {$DomainModel->d_domain} -->
|
<!-- {$DomainModel->d_domain} -->
|
||||||
|
|
||||||
|
|||||||
@@ -125,4 +125,19 @@ class SiteContext
|
|||||||
|
|
||||||
return GanRaoMaModel::getGrmCode($strDomain, $strPageCode, $strDiff, $intNum);
|
return GanRaoMaModel::getGrmCode($strDomain, $strPageCode, $strDiff, $intNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get home view
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getHomeView(): string
|
||||||
|
{
|
||||||
|
if ($this->DomainModel->n_id > 0) {
|
||||||
|
$strView = 'test/test01/faker.html';
|
||||||
|
} else {
|
||||||
|
$strView = 'test/test01/index.html';
|
||||||
|
}
|
||||||
|
return $strView;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user