FIX SITE MAP
This commit is contained in:
@@ -24,28 +24,32 @@ Route::get('/robots', function (\think\Request $Request, SiteContext $SiteContex
|
|||||||
* Sitemap 索引文件
|
* Sitemap 索引文件
|
||||||
*/
|
*/
|
||||||
Route::get('/sitemap_index', function (\think\Request $Request, SiteContext $SiteContext) {
|
Route::get('/sitemap_index', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||||
return view('sitemap/sitemap_index.xml');
|
return $SiteContext->getSiteMapByCode('INDEX');
|
||||||
|
// return view('sitemap/sitemap_index.xml');
|
||||||
})->ext('xml');
|
})->ext('xml');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页、分类列表、排行榜、男生/女生频道。
|
* 首页、分类列表、排行榜、男生/女生频道。
|
||||||
*/
|
*/
|
||||||
Route::get('/sitemap-main', function (\think\Request $Request, SiteContext $SiteContext) {
|
Route::get('/sitemap-main', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||||
return view('sitemap/sitemap-main.xml');
|
return $SiteContext->getSiteMapByCode('MAIN');
|
||||||
|
// return view('sitemap/sitemap-main.xml');
|
||||||
})->ext('xml');
|
})->ext('xml');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小说目录页面。
|
* 小说目录页面。
|
||||||
*/
|
*/
|
||||||
Route::get('/sitemap-books-catalog-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
Route::get('/sitemap-books-catalog-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||||
return view('sitemap/sitemap-books-catalog.xml');
|
return $SiteContext->getSiteMapByCode('CATALOG');
|
||||||
|
// return view('sitemap/sitemap-books-catalog.xml');
|
||||||
})->ext('xml');
|
})->ext('xml');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小说详情页面。
|
* 小说详情页面。
|
||||||
*/
|
*/
|
||||||
Route::get('/sitemap-books-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
Route::get('/sitemap-books-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||||
return view('sitemap/sitemap-books.xml');
|
return $SiteContext->getSiteMapByCode('BOOK');
|
||||||
|
// return view('sitemap/sitemap-books.xml');
|
||||||
})->ext('xml');
|
})->ext('xml');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,7 +63,8 @@ Route::get('/sitemap-forget-books-:page', function (\think\Request $Request, Sit
|
|||||||
* 章节页面(如果包含)
|
* 章节页面(如果包含)
|
||||||
*/
|
*/
|
||||||
Route::get('/sitemap-chapters-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
Route::get('/sitemap-chapters-:page', function (\think\Request $Request, SiteContext $SiteContext) {
|
||||||
return view('sitemap/sitemap-chapters.xml');
|
return $SiteContext->getSiteMapByCode('CHAPTER');
|
||||||
|
// return view('sitemap/sitemap-chapters.xml');
|
||||||
})->ext('xml');
|
})->ext('xml');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -89,12 +89,17 @@ class DomainModel extends BaseModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Undocumented function
|
* GetFomartSubjectEx
|
||||||
*
|
*
|
||||||
* @param string $strKey
|
* @param string $strKey
|
||||||
|
* @param string $strDomain
|
||||||
|
* @param string $strController
|
||||||
|
* @param string $strAction
|
||||||
|
* @param string $strDiff
|
||||||
|
* @param boolean $boolJoin
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getFomartSubject($strKey, $strDiff = '', bool $boolJoin = true)
|
public function getFomartSubjectEx(string $strKey, string $strDomain, string $strController, string $strAction, $strDiff = '', bool $boolJoin = true): string
|
||||||
{
|
{
|
||||||
$intSfgId = $this->t_cfg->{$strKey}['sfg_id'];
|
$intSfgId = $this->t_cfg->{$strKey}['sfg_id'];
|
||||||
$SubjectFomartModel = NULL;
|
$SubjectFomartModel = NULL;
|
||||||
@@ -104,10 +109,6 @@ class DomainModel extends BaseModel
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$strDomain = request()->DomainModel->d_domain;
|
|
||||||
$strController = request()->controller();
|
|
||||||
$strAction = request()->action();
|
|
||||||
|
|
||||||
if ($boolJoin) {
|
if ($boolJoin) {
|
||||||
$strUUId = sprintf('%s-%s-%s-%s-%s', $strDomain, $strController, $strAction, $strKey, $strDiff);
|
$strUUId = sprintf('%s-%s-%s-%s-%s', $strDomain, $strController, $strAction, $strKey, $strDiff);
|
||||||
} else {
|
} else {
|
||||||
@@ -126,8 +127,6 @@ class DomainModel extends BaseModel
|
|||||||
'csf_key' => $strUUId,
|
'csf_key' => $strUUId,
|
||||||
'sf_id' => $SubjectFomartModel->sf_id,
|
'sf_id' => $SubjectFomartModel->sf_id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$intSfId = $arrConfigSubjectFomart['sf_id'];
|
$intSfId = $arrConfigSubjectFomart['sf_id'];
|
||||||
|
|
||||||
@@ -137,12 +136,65 @@ class DomainModel extends BaseModel
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $SubjectFomartModel->sf_val ?? '';
|
return $SubjectFomartModel->sf_val ?? '';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Undocumented function
|
||||||
|
*
|
||||||
|
* @param string $strKey
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFomartSubject($strKey, $strDiff = '', bool $boolJoin = true)
|
||||||
|
{
|
||||||
|
$strDomain = request()->DomainModel->d_domain;
|
||||||
|
$strController = request()->controller();
|
||||||
|
$strAction = request()->action();
|
||||||
|
|
||||||
|
return $this->getFomartSubjectEx($strKey, $strDomain, $strController, $strAction, $strDiff, $boolJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetFomartUrl
|
||||||
|
*
|
||||||
|
* @param string $strKey
|
||||||
|
* @param array $arrArgs
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFomartUrl(string $strKey, array $arrArgs): string
|
||||||
|
{
|
||||||
|
$strSfVal = $this->getFomartSubject($strKey, '', false);
|
||||||
|
$arrKeys = [];
|
||||||
|
$arrVals = [];
|
||||||
|
foreach ($arrArgs as $strKey => $strVal) {
|
||||||
|
$arrKeys[] = '{' . $strKey . '}';
|
||||||
|
$arrVals[] = $strVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_replace($arrKeys, $arrVals, $strSfVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetFomartUrl
|
||||||
|
*
|
||||||
|
* @param string $strKey
|
||||||
|
* @param array $arrArgs
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFomartUrlEx(string $strKey, string $strDomain, string $strController, string $strAction, array $arrArgs): string
|
||||||
|
{
|
||||||
|
$strSfVal = $this->getFomartSubjectEx($strKey, $strDomain, $strController, $strAction, '', false);
|
||||||
|
$arrKeys = [];
|
||||||
|
$arrVals = [];
|
||||||
|
foreach ($arrArgs as $strKey => $strVal) {
|
||||||
|
$arrKeys[] = '{' . $strKey . '}';
|
||||||
|
$arrVals[] = $strVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
$strUri = str_replace($arrKeys, $arrVals, $strSfVal);
|
||||||
|
$strUri = str_replace('//', '/', $strUri);
|
||||||
|
return $strUri;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,14 +217,14 @@ class ChapterService
|
|||||||
* @param integer $intCPage
|
* @param integer $intCPage
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getChapterInfo(int $intNId, int $intCSortNum = 0, int $intCPage = 0)
|
public function getChapterInfo(int $intNId, int|NULL $intCSortNum = 0, int|NULL $intCPage = 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// 小说详情
|
// 小说详情
|
||||||
$arrNovel = $this->NovelModel->getNovelByNId($intNId);
|
$arrNovel = $this->NovelModel->getNovelByNId($intNId);
|
||||||
|
|
||||||
$ChapterModel = ChapterModel::getInstance();
|
$ChapterModel = ChapterModel::getInstance();
|
||||||
if ($intCSortNum == 0 && $intCPage == 0) {
|
if ($intCSortNum === NULL && $intCPage === NULL) {
|
||||||
// 最新章节
|
// 最新章节
|
||||||
$arrChapter = $ChapterModel->getLatestChapterByNId($intNId);
|
$arrChapter = $ChapterModel->getLatestChapterByNId($intNId);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -48,25 +48,6 @@ class NovelService
|
|||||||
$this->NovelClicksModel = NovelClicksModel::getInstance();
|
$this->NovelClicksModel = NovelClicksModel::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Undocumented function
|
|
||||||
*
|
|
||||||
* @param array $arrArgs
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getPageUrl($strKey, array $arrArgs,): string
|
|
||||||
{
|
|
||||||
$strSfVal = $this->SiteContext->DomainModel->getFomartSubject($strKey, '', false);
|
|
||||||
$arrKeys = [];
|
|
||||||
$arrVals = [];
|
|
||||||
foreach ($arrArgs as $strKey => $strVal) {
|
|
||||||
$arrKeys[] = '{' . $strKey . '}';
|
|
||||||
$arrVals[] = $strVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
return str_replace($arrKeys, $arrVals, $strSfVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Undocumented function
|
* Undocumented function
|
||||||
@@ -78,7 +59,7 @@ class NovelService
|
|||||||
public function getNovelInfoUrl($intNId, $intPinYin): string
|
public function getNovelInfoUrl($intNId, $intPinYin): string
|
||||||
{
|
{
|
||||||
$strKey = 'NOVEL_INFO_URL';
|
$strKey = 'NOVEL_INFO_URL';
|
||||||
$strUrl = $this->getPageUrl($strKey, [
|
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||||
'intNId' => $intNId,
|
'intNId' => $intNId,
|
||||||
'strPinYin' => $intPinYin
|
'strPinYin' => $intPinYin
|
||||||
]);
|
]);
|
||||||
@@ -95,7 +76,7 @@ class NovelService
|
|||||||
public function getForgeNovelInfoUrl($intNId, $intPinYin, $intNForgeId): string
|
public function getForgeNovelInfoUrl($intNId, $intPinYin, $intNForgeId): string
|
||||||
{
|
{
|
||||||
$strKey = 'KAN_NOVEL_INFO_URL';
|
$strKey = 'KAN_NOVEL_INFO_URL';
|
||||||
$strUrl = $this->getPageUrl($strKey, [
|
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||||
'intNId' => $intNId,
|
'intNId' => $intNId,
|
||||||
'strPinYin' => $intPinYin,
|
'strPinYin' => $intPinYin,
|
||||||
'intNForgeId' => $intNForgeId,
|
'intNForgeId' => $intNForgeId,
|
||||||
@@ -108,15 +89,15 @@ class NovelService
|
|||||||
* Undocumented function
|
* Undocumented function
|
||||||
*
|
*
|
||||||
* @param int $intNId
|
* @param int $intNId
|
||||||
* @param int $intPinYin
|
* @param string $intPinYin
|
||||||
* @param int $intChapterSort
|
* @param int $intChapterSort
|
||||||
* @param integer $intChapterPage
|
* @param integer $intChapterPage
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getNovelChapterUrl(int $intNId, $intPinYin, $intChapterSort, $intChapterPage = 0): string
|
public function getNovelChapterUrl(int $intNId, string $intPinYin, int $intChapterSort, int $intChapterPage = 0): string
|
||||||
{
|
{
|
||||||
$strKey = 'CONTENT_INFO_URL';
|
$strKey = 'CONTENT_INFO_URL';
|
||||||
$strUrl = $this->getPageUrl($strKey, [
|
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||||
'intNId' => $intNId,
|
'intNId' => $intNId,
|
||||||
'strPinYin' => $intPinYin,
|
'strPinYin' => $intPinYin,
|
||||||
'intChapterSort' => $intChapterSort,
|
'intChapterSort' => $intChapterSort,
|
||||||
@@ -136,28 +117,28 @@ class NovelService
|
|||||||
public function getNovelLasterChapterUrl($intNId, $intPinYin): string
|
public function getNovelLasterChapterUrl($intNId, $intPinYin): string
|
||||||
{
|
{
|
||||||
$strKey = 'NEWS_CONTENT_INFO_URL';
|
$strKey = 'NEWS_CONTENT_INFO_URL';
|
||||||
$strUrl = $this->getPageUrl($strKey, [
|
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||||
'intNId' => $intNId,
|
'intNId' => $intNId,
|
||||||
'strPinYin' => $intPinYin,
|
'strPinYin' => $intPinYin,
|
||||||
]);
|
]);
|
||||||
return (string)$strUrl;
|
return (string)$strUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小说分类/书库
|
* 获取小说分类URl
|
||||||
* Undocumented function
|
|
||||||
*
|
*
|
||||||
* @param [type] $strGender
|
* @param string $strGender
|
||||||
* @param [type] $strCategory
|
* @param string $strCategory
|
||||||
* @param [type] $strStatus
|
* @param string $strStatus
|
||||||
* @param [type] $strOrder
|
* @param string $strOrder
|
||||||
* @param [type] $intPage
|
* @param integer $intPage
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getNovelCategoryUrl($strGender, $strCategory, $strStatus, $strOrder, $intPage): string
|
public function getNovelCategoryUrl(string $strGender, string $strCategory, string $strStatus, string $strOrder, int|string $intPage): string
|
||||||
{
|
{
|
||||||
$strKey = 'CATEGORY_INFO_URL';
|
$strKey = 'CATEGORY_INFO_URL';
|
||||||
$strUrl = $this->getPageUrl($strKey, [
|
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||||
'strGender' => !empty($strGender) ? $strGender : '',
|
'strGender' => !empty($strGender) ? $strGender : '',
|
||||||
'strCategory' => !empty($strCategory) ? $strCategory : 'all',
|
'strCategory' => !empty($strCategory) ? $strCategory : 'all',
|
||||||
'strStatus' => !empty($strStatus) ? $strStatus : 'all',
|
'strStatus' => !empty($strStatus) ? $strStatus : 'all',
|
||||||
@@ -172,19 +153,18 @@ class NovelService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 排行榜url
|
* 排行榜url
|
||||||
* Undocumented function
|
|
||||||
*
|
*
|
||||||
* @param [type] $strGender
|
* @param string $strGender
|
||||||
* @param [type] $strCategory
|
* @param string $strCategory
|
||||||
* @param [type] $strStatus
|
* @param string $strStatus
|
||||||
* @param [type] $strOrder
|
* @param string $strOrder
|
||||||
* @param [type] $intPage
|
* @param integer $intPage
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getNovelRankUrl($strGender, $strCategory, $strStatus, $strOrder, $intPage): string
|
public function getNovelRankUrl(string $strGender, string $strCategory, string $strStatus, string $strOrder, int $intPage): string
|
||||||
{
|
{
|
||||||
$strKey = 'RANK_LIST_URL';
|
$strKey = 'RANK_LIST_URL';
|
||||||
$strUrl = $this->getPageUrl($strKey, [
|
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||||
'strGender' => !empty($strGender) ? $strGender : '',
|
'strGender' => !empty($strGender) ? $strGender : '',
|
||||||
'strCategory' => !empty($strCategory) ? $strCategory : 'all',
|
'strCategory' => !empty($strCategory) ? $strCategory : 'all',
|
||||||
'strStatus' => !empty($strStatus) ? $strStatus : 'all',
|
'strStatus' => !empty($strStatus) ? $strStatus : 'all',
|
||||||
@@ -208,7 +188,7 @@ class NovelService
|
|||||||
public function getNovelCatalogUrl($intNId, $intPinYin, $strOrder, $intPage = 1): string
|
public function getNovelCatalogUrl($intNId, $intPinYin, $strOrder, $intPage = 1): string
|
||||||
{
|
{
|
||||||
$strKey = 'NOVEL_CATALOG_URL';
|
$strKey = 'NOVEL_CATALOG_URL';
|
||||||
$strUrl = $this->getPageUrl($strKey, [
|
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||||
'intNId' => $intNId,
|
'intNId' => $intNId,
|
||||||
'strPinYin' => $intPinYin,
|
'strPinYin' => $intPinYin,
|
||||||
'strOrder' => $strOrder,
|
'strOrder' => $strOrder,
|
||||||
@@ -228,31 +208,13 @@ class NovelService
|
|||||||
public function getNovelSearchUrl($strKeyWords, $intPage = 1): string
|
public function getNovelSearchUrl($strKeyWords, $intPage = 1): string
|
||||||
{
|
{
|
||||||
$strKey = 'SEARCH_INFO_URL';
|
$strKey = 'SEARCH_INFO_URL';
|
||||||
$strUrl = $this->getPageUrl($strKey, [
|
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||||
'intPage' => $intPage,
|
'intPage' => $intPage,
|
||||||
'strSearchKeywords' => $strKeyWords
|
'strSearchKeywords' => $strKeyWords
|
||||||
]);
|
]);
|
||||||
return (string)$strUrl;
|
return (string)$strUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GetCategoryFilter
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getCategoryFilter(string $strNSex = ''): array
|
|
||||||
{
|
|
||||||
if ($strNSex == 'man') {
|
|
||||||
return CategoryModel::$arrCategoryAll['man'];
|
|
||||||
} else if ($strNSex == 'women') {
|
|
||||||
return CategoryModel::$arrCategoryAll['women'];
|
|
||||||
} else {
|
|
||||||
return array_combine(CategoryModel::$arrCategoryPinYin, CategoryModel::$arrCategory);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取排行榜小说
|
* 获取排行榜小说
|
||||||
*
|
*
|
||||||
@@ -654,7 +616,7 @@ class NovelService
|
|||||||
$intLimit = $arrNovel['limit'] ?? 10;
|
$intLimit = $arrNovel['limit'] ?? 10;
|
||||||
$intTotal = $arrNovel['total'] ?? 0;
|
$intTotal = $arrNovel['total'] ?? 0;
|
||||||
$intButtomNum = $arrParams['button_num'];
|
$intButtomNum = $arrParams['button_num'];
|
||||||
$strBaseUrl = app(NovelService::class)->getNovelCategoryUrl($strGender, $strCategory, $strStatus, $strOrder, '{page}');
|
$strBaseUrl = $this->getNovelCategoryUrl($strGender, $strCategory, $strStatus, $strOrder, '{page}');
|
||||||
|
|
||||||
$arrPaginator = CusteomPage02::generate($intPage, $intTotal, $intLimit, $strBaseUrl, $intButtomNum);
|
$arrPaginator = CusteomPage02::generate($intPage, $intTotal, $intLimit, $strBaseUrl, $intButtomNum);
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ use think\facade\Request;
|
|||||||
use think\facade\Config;
|
use think\facade\Config;
|
||||||
use think\exception\HttpException;
|
use think\exception\HttpException;
|
||||||
use think\facade\View;
|
use think\facade\View;
|
||||||
|
use think\Response;
|
||||||
|
|
||||||
class SiteContext
|
class SiteContext
|
||||||
{
|
{
|
||||||
@@ -58,6 +59,7 @@ class SiteContext
|
|||||||
* @var NovelClicksModel
|
* @var NovelClicksModel
|
||||||
*/
|
*/
|
||||||
public $NovelClicksModel;
|
public $NovelClicksModel;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->Request = request();
|
$this->Request = request();
|
||||||
@@ -313,7 +315,7 @@ class SiteContext
|
|||||||
$strOrder = $this->Request->param('strOrder');
|
$strOrder = $this->Request->param('strOrder');
|
||||||
$strStatus = $this->Request->param('strStatus');
|
$strStatus = $this->Request->param('strStatus');
|
||||||
$strNovelOrder = '';
|
$strNovelOrder = '';
|
||||||
if(!empty($strOrder) && $strOrder != 'all'){
|
if (!empty($strOrder) && $strOrder != 'all') {
|
||||||
$strNovelOrder = StaticConfig::$arrNovelRankSortType[$strOrder];
|
$strNovelOrder = StaticConfig::$arrNovelRankSortType[$strOrder];
|
||||||
}
|
}
|
||||||
ConverterMovel::setVal([
|
ConverterMovel::setVal([
|
||||||
@@ -322,4 +324,54 @@ class SiteContext
|
|||||||
'strNovelStatus' => empty($strStatus) ? "" : StaticConfig::$arrNovelStatus[$strStatus],
|
'strNovelStatus' => empty($strStatus) ? "" : StaticConfig::$arrNovelStatus[$strStatus],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSiteMapByCode(string $strCode): Response
|
||||||
|
{
|
||||||
|
$strFile = root_path('storage/SiteMap') . $this->DomainModel->d_domain . '/';
|
||||||
|
|
||||||
|
$intPage = $this->Request->route('page', 1);
|
||||||
|
|
||||||
|
switch ($strCode) {
|
||||||
|
case 'INDEX':
|
||||||
|
$strFile .= 'sitemap_index.xml';
|
||||||
|
break;
|
||||||
|
case 'MAIN':
|
||||||
|
$strFile .= 'sitemap-main.xml';
|
||||||
|
break;
|
||||||
|
case 'CATALOG':
|
||||||
|
$strFile .= "sitemap-books-catalog-{$intPage}.xml";
|
||||||
|
break;
|
||||||
|
case 'BOOK':
|
||||||
|
$strFile .= "sitemap-books-{$intPage}.xml";
|
||||||
|
break;
|
||||||
|
case 'CHAPTER':
|
||||||
|
$strFile .= "sitemap-chapters-{$intPage}.xml";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new \think\exception\HttpException(404, 'Sitemap file not found');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file_exists($strFile)) {
|
||||||
|
throw new \think\exception\HttpException(404, 'Sitemap file not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
$Stream = fopen($strFile, 'rb');
|
||||||
|
if (!$Stream) {
|
||||||
|
http_response_code(500);
|
||||||
|
echo 'Failed to open file stream';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Content-Type: application/xml');
|
||||||
|
header('Content-Length: ' . filesize($strFile));
|
||||||
|
header('Content-Disposition: inline');
|
||||||
|
|
||||||
|
while (!feof($Stream)) {
|
||||||
|
echo fread($Stream, 8192);
|
||||||
|
flush();
|
||||||
|
}
|
||||||
|
fclose($Stream);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\services;
|
namespace app\services;
|
||||||
|
|
||||||
|
use app\model\CategoryModel;
|
||||||
|
|
||||||
class StaticConfig
|
class StaticConfig
|
||||||
{
|
{
|
||||||
@@ -35,4 +36,20 @@ class StaticConfig
|
|||||||
'zheng' => '正序',
|
'zheng' => '正序',
|
||||||
'dao' => '倒叙',
|
'dao' => '倒叙',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetCategoryFilter
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
static function getCategoryFilter(string $strNSex = ''): array
|
||||||
|
{
|
||||||
|
if ($strNSex == 'man') {
|
||||||
|
return CategoryModel::$arrCategoryAll['man'];
|
||||||
|
} else if ($strNSex == 'women') {
|
||||||
|
return CategoryModel::$arrCategoryAll['women'];
|
||||||
|
} else {
|
||||||
|
return array_combine(CategoryModel::$arrCategoryPinYin, CategoryModel::$arrCategory);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
369
code/app/task/logic/SiteMapLogic.php
Normal file
369
code/app/task/logic/SiteMapLogic.php
Normal file
@@ -0,0 +1,369 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace app\task\logic;
|
||||||
|
|
||||||
|
use app\model\DomainModel;
|
||||||
|
use app\model\NovelModel;
|
||||||
|
use app\services\StaticConfig;
|
||||||
|
use microserver\ProcessSanitizer;
|
||||||
|
use microserver\QueueManage;
|
||||||
|
|
||||||
|
class SiteMapLogic
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* NovelModel
|
||||||
|
*
|
||||||
|
* @var NovelModel
|
||||||
|
*/
|
||||||
|
public $NovelModel;
|
||||||
|
|
||||||
|
public $intPageSize = 3;
|
||||||
|
|
||||||
|
public $strSiteMapPath = '';
|
||||||
|
|
||||||
|
public $intTotal = 0;
|
||||||
|
|
||||||
|
public $strDate;
|
||||||
|
|
||||||
|
public $arrNovelCategory;
|
||||||
|
|
||||||
|
public $arrNovelSort;
|
||||||
|
|
||||||
|
public $arrNovelStatus;
|
||||||
|
|
||||||
|
public $intBatchSize = 500;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Undocumented variable
|
||||||
|
*
|
||||||
|
* @var DomainModel[]
|
||||||
|
*/
|
||||||
|
public $arrDomainModel;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->arrNovelCategory = StaticConfig::getCategoryFilter();
|
||||||
|
|
||||||
|
$this->arrNovelSort = StaticConfig::$arrNovelSortType;
|
||||||
|
|
||||||
|
$this->arrNovelStatus = StaticConfig::$arrNovelStatus;
|
||||||
|
|
||||||
|
$this->strDate = date('Y-m-d');
|
||||||
|
$this->strSiteMapPath = root_path('storage/SiteMap');
|
||||||
|
|
||||||
|
$this->intPageSize = 3;
|
||||||
|
|
||||||
|
$this->NovelModel = NovelModel::getInstance();
|
||||||
|
|
||||||
|
NovelModel::$arrOptions['projection'] = [
|
||||||
|
'_id' => 0,
|
||||||
|
'n_id' => 1,
|
||||||
|
'n_name' => 1,
|
||||||
|
'n_name_pinyin' => 1,
|
||||||
|
'n_category' => 1,
|
||||||
|
'n_category_pinyin' => 1,
|
||||||
|
'n_category_sex_en' => 1,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Undocumented function
|
||||||
|
*
|
||||||
|
* @return DomainModel[]
|
||||||
|
*/
|
||||||
|
public function getDomain(): array
|
||||||
|
{
|
||||||
|
if (empty($this->arrDomain)) {
|
||||||
|
$this->arrDomainModel = DomainModel::getAllDomainOnCache();
|
||||||
|
}
|
||||||
|
return $this->arrDomainModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate Site Map
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function generateSiteMap()
|
||||||
|
{
|
||||||
|
$arrResult = $this->NovelModel->findPaginatedWithCache([], 1, 1);
|
||||||
|
$this->intTotal = $arrResult['total'];
|
||||||
|
|
||||||
|
$this->generateMapIndex();
|
||||||
|
|
||||||
|
$this->generateMapMain();
|
||||||
|
|
||||||
|
$intTotalPage = ceil($this->intTotal / $this->intPageSize);
|
||||||
|
for ($intPage = 1; $intPage <= $intTotalPage; $intPage++) {
|
||||||
|
$this->generateMapInfo($intPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo date('Y-m-d H:i:s') . PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected function generateMapInfo(int $intPage)
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach ($this->getDomain() as $DomainModel) {
|
||||||
|
|
||||||
|
$strDomainDir = $this->strSiteMapPath . $DomainModel->d_domain;
|
||||||
|
if (is_dir($strDomainDir) == false) {
|
||||||
|
mkdir($strDomainDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
$strHead = <<<EOF
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
EOF;
|
||||||
|
$strTemplate = <<<EOF
|
||||||
|
<url>
|
||||||
|
<loc>%s</loc>
|
||||||
|
<lastmod>{$this->strDate}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>%s</priority>
|
||||||
|
</url>
|
||||||
|
EOF;
|
||||||
|
$strEnd = <<<EOF
|
||||||
|
</urlset>
|
||||||
|
EOF;
|
||||||
|
|
||||||
|
$strMapBooksFile = sprintf('%s/sitemap-books-catalog-%s.xml', $strDomainDir, $intPage);
|
||||||
|
$strMapCatalogFile = sprintf('%s/sitemap-books-%s.xml', $strDomainDir, $intPage);
|
||||||
|
$strMapChaptersFile = sprintf('%s/sitemap-chapters-%s.xml', $strDomainDir, $intPage);
|
||||||
|
|
||||||
|
file_put_contents($strMapBooksFile, $strHead);
|
||||||
|
file_put_contents($strMapCatalogFile, $strHead);
|
||||||
|
file_put_contents($strMapChaptersFile, $strHead);
|
||||||
|
|
||||||
|
# 取 intpage * limit ~ intpage * (limit+1) 写入以上文件
|
||||||
|
foreach ($this->fetchNovelsByBatch($intPage * $this->intPageSize, $this->intPageSize) as $Novel) {
|
||||||
|
|
||||||
|
# 1
|
||||||
|
$strKey = "NOVEL_INFO_URL";
|
||||||
|
$strDomain = $DomainModel->d_domain;
|
||||||
|
$strController = "";
|
||||||
|
$strAction = "";
|
||||||
|
$arrArgs = [
|
||||||
|
'intNId' => $Novel->n_id,
|
||||||
|
'strPinYin' => $Novel->n_name_pinyin,
|
||||||
|
];
|
||||||
|
|
||||||
|
$strUri = $DomainModel->getFomartUrlEx($strKey, $strDomain, $strController, $strAction, $arrArgs);
|
||||||
|
$strUrl = sprintf("https://www.%s%s", $DomainModel->d_domain, $strUri);
|
||||||
|
$strPriority = '0.8';
|
||||||
|
$strContent = sprintf($strTemplate, $strUrl, $strPriority);
|
||||||
|
file_put_contents($strMapBooksFile, $strContent, FILE_APPEND);
|
||||||
|
|
||||||
|
# 2
|
||||||
|
$strKey = "NOVEL_CATALOG_URL";
|
||||||
|
$strDomain = $DomainModel->d_domain;
|
||||||
|
$strController = "";
|
||||||
|
$strAction = "";
|
||||||
|
$arrArgs = [
|
||||||
|
'intNId' => $Novel->n_id,
|
||||||
|
'strPinYin' => $Novel->n_name_pinyin,
|
||||||
|
'strOrder' => 'zheng',
|
||||||
|
'intPage' => 1,
|
||||||
|
];
|
||||||
|
|
||||||
|
$strUri = $DomainModel->getFomartUrlEx($strKey, $strDomain, $strController, $strAction, $arrArgs);
|
||||||
|
$strUrl = sprintf("https://www.%s%s", $DomainModel->d_domain, $strUri);
|
||||||
|
$strPriority = '0.8';
|
||||||
|
$strContent = sprintf($strTemplate, $strUrl, $strPriority);
|
||||||
|
file_put_contents($strMapCatalogFile, $strContent, FILE_APPEND);
|
||||||
|
|
||||||
|
# 3
|
||||||
|
$strKey = "NEWS_CONTENT_INFO_URL";
|
||||||
|
$strDomain = $DomainModel->d_domain;
|
||||||
|
$strController = "";
|
||||||
|
$strAction = "";
|
||||||
|
$arrArgs = [
|
||||||
|
'intNId' => $Novel->n_id,
|
||||||
|
'strPinYin' => $Novel->n_name_pinyin,
|
||||||
|
];
|
||||||
|
|
||||||
|
$strUri = $DomainModel->getFomartUrlEx($strKey, $strDomain, $strController, $strAction, $arrArgs);
|
||||||
|
$strUrl = sprintf("https://www.%s%s", $DomainModel->d_domain, $strUri);
|
||||||
|
$strPriority = '0.6';
|
||||||
|
$strContent = sprintf($strTemplate, $strUrl, $strPriority);
|
||||||
|
file_put_contents($strMapChaptersFile, $strContent, FILE_APPEND);
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents($strMapBooksFile, $strEnd, FILE_APPEND);
|
||||||
|
file_put_contents($strMapCatalogFile, $strEnd, FILE_APPEND);
|
||||||
|
file_put_contents($strMapChaptersFile, $strEnd, FILE_APPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分批查询小说数据,并以生成器方式返回
|
||||||
|
*
|
||||||
|
* @param int $intStart 跳过的记录数(skip)
|
||||||
|
* @param int $intCount 需要查询的总记录数
|
||||||
|
* @return \Generator 逐条返回小说数据
|
||||||
|
* @throws \MongoDB\Exception\Exception
|
||||||
|
*/
|
||||||
|
public function fetchNovelsByBatch(int $intStart, int $intCount): \Generator
|
||||||
|
{
|
||||||
|
$intRecordsFetched = 0;
|
||||||
|
$intRemainingRecords = min($intCount, $this->NovelModel->getCol()->countDocuments() - $intStart);
|
||||||
|
|
||||||
|
while ($intRecordsFetched < $intRemainingRecords) {
|
||||||
|
$intLimit = min($this->intBatchSize, $intRemainingRecords - $intRecordsFetched);
|
||||||
|
$Cursor = $this->NovelModel->getCol()->find(
|
||||||
|
[
|
||||||
|
'n_have_chapter' => 1,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'skip' => $intStart + $intRecordsFetched,
|
||||||
|
'limit' => $intLimit,
|
||||||
|
'sort' => ['_id' => 1],
|
||||||
|
'projection' => [
|
||||||
|
'_id' => 1,
|
||||||
|
'n_id' => 1,
|
||||||
|
'n_name' => 1,
|
||||||
|
'n_name_pinyin' => 1,
|
||||||
|
'n_category' => 1,
|
||||||
|
'n_category_pinyin' => 1,
|
||||||
|
'n_category_sex_en' => 1,
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($Cursor as $novel) {
|
||||||
|
yield $novel;
|
||||||
|
}
|
||||||
|
|
||||||
|
$intRecordsFetched += $intLimit;
|
||||||
|
unset($Cursor);
|
||||||
|
gc_collect_cycles();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate Map Index
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function generateMapMain()
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach ($this->getDomain() as $DomainModel) {
|
||||||
|
|
||||||
|
$strDomainDir = $this->strSiteMapPath . $DomainModel->d_domain;
|
||||||
|
if (is_dir($strDomainDir) == false) {
|
||||||
|
mkdir($strDomainDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
$strMapIndexFile = $strDomainDir . '/sitemap-main.xml';
|
||||||
|
|
||||||
|
$strContent = <<<EOF
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>https://www.{$DomainModel->d_domain}/</loc>
|
||||||
|
<lastmod>{$this->strDate}</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
<priority>1.0</priority>
|
||||||
|
</url>
|
||||||
|
EOF;
|
||||||
|
file_put_contents($strMapIndexFile, $strContent);
|
||||||
|
|
||||||
|
foreach ($this->arrNovelCategory as $strCategoryKey => $strCategoryVal) {
|
||||||
|
foreach ($this->arrNovelSort as $strSortKey => $strSortVal) {
|
||||||
|
foreach ($this->arrNovelStatus as $strStatusKey => $strStatusVal) {
|
||||||
|
|
||||||
|
$strKey = "CATEGORY_INFO_URL";
|
||||||
|
$strDomain = $DomainModel->d_domain;
|
||||||
|
$strController = "";
|
||||||
|
$strAction = "";
|
||||||
|
$arrArgs = [
|
||||||
|
'strCategory' => $strCategoryKey,
|
||||||
|
'strOrder' => $strSortKey,
|
||||||
|
'strStatus' => $strStatusKey,
|
||||||
|
'strGender' => '',
|
||||||
|
'intPage' => 1,
|
||||||
|
];
|
||||||
|
|
||||||
|
$strUri = $DomainModel->getFomartUrlEx($strKey, $strDomain, $strController, $strAction, $arrArgs);
|
||||||
|
|
||||||
|
$strUrl = sprintf("https://www.%s%s", $DomainModel->d_domain, $strUri);
|
||||||
|
|
||||||
|
$strContent = <<<EOF
|
||||||
|
<url>
|
||||||
|
<loc>{$strUrl}</loc>
|
||||||
|
<lastmod>{$this->strDate}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
EOF;
|
||||||
|
file_put_contents($strMapIndexFile, $strContent, FILE_APPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$strContent = <<<EOF
|
||||||
|
</urlset>
|
||||||
|
EOF;
|
||||||
|
file_put_contents($strMapIndexFile, $strContent, FILE_APPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate Map Index
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function generateMapIndex()
|
||||||
|
{
|
||||||
|
$intTotalPage = ceil($this->intTotal / $this->intPageSize);
|
||||||
|
|
||||||
|
foreach ($this->getDomain() as $DomainModel) {
|
||||||
|
|
||||||
|
$strDomainDir = $this->strSiteMapPath . $DomainModel->d_domain;
|
||||||
|
if (is_dir($strDomainDir) == false) {
|
||||||
|
mkdir($strDomainDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
$strMapIndexFile = $strDomainDir . '/sitemap_index.xml';
|
||||||
|
|
||||||
|
$strContent = <<<EOF
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<sitemap>
|
||||||
|
<loc>https://www.{$DomainModel->d_domain}/sitemap-main.xml</loc>
|
||||||
|
<lastmod>{$this->strDate}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
EOF;
|
||||||
|
file_put_contents($strMapIndexFile, $strContent);
|
||||||
|
|
||||||
|
for ($intPage = 1; $intPage <= $intTotalPage; $intPage++) {
|
||||||
|
$strContent = <<<EOF
|
||||||
|
<sitemap>
|
||||||
|
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-{$intPage}.xml</loc>
|
||||||
|
<lastmod>{$this->strDate}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
<sitemap>
|
||||||
|
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-catalog-{$intPage}.xml</loc>
|
||||||
|
<lastmod>{$this->strDate}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
<sitemap>
|
||||||
|
<loc>https://www.{$DomainModel->d_domain}/sitemap-chapters-{$intPage}.xml</loc>
|
||||||
|
<lastmod>{$this->strDate}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
EOF;
|
||||||
|
file_put_contents($strMapIndexFile, $strContent, FILE_APPEND);
|
||||||
|
}
|
||||||
|
$strContent = <<<EOF
|
||||||
|
</sitemapindex>
|
||||||
|
EOF;
|
||||||
|
file_put_contents($strMapIndexFile, $strContent, FILE_APPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ use app\model\PlanTaskModel;
|
|||||||
use app\task\crawler\zw630\Scheduler as Zw630Scheduler;
|
use app\task\crawler\zw630\Scheduler as Zw630Scheduler;
|
||||||
use app\task\crawler\zw74\Scheduler as Zw74Scheduler;
|
use app\task\crawler\zw74\Scheduler as Zw74Scheduler;
|
||||||
use app\task\crawler\youzhi\Scheduler as YouZhiScheduler;
|
use app\task\crawler\youzhi\Scheduler as YouZhiScheduler;
|
||||||
|
use app\task\logic\SiteMapLogic;
|
||||||
use microserver\QueueManage;
|
use microserver\QueueManage;
|
||||||
use microserver\ProcessSanitizer;
|
use microserver\ProcessSanitizer;
|
||||||
|
|
||||||
@@ -49,9 +49,30 @@ class PlanTask
|
|||||||
self::pullYouZhiShiPin();
|
self::pullYouZhiShiPin();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'GENERATE_SITE_MAP':
|
||||||
|
self::generateSiteMap();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Undocumented function
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function generateSiteMap()
|
||||||
|
{
|
||||||
|
$arrTask = [
|
||||||
|
'callback' => [SiteMapLogic::class, 'generateSiteMap'],
|
||||||
|
'data' => []
|
||||||
|
];
|
||||||
|
|
||||||
|
$QueueManage = new QueueManage(2);
|
||||||
|
$QueueManage->set($arrTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Undocumented function
|
* Undocumented function
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -52,6 +52,13 @@ class PlanTaskSeeder
|
|||||||
'pt_enable' => 0,
|
'pt_enable' => 0,
|
||||||
'pt_limit' => 1 * 24 * 3600,
|
'pt_limit' => 1 * 24 * 3600,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'pt_name' => '生成网站地图',
|
||||||
|
'pt_code' => 'GENERATE_SITE_MAP',
|
||||||
|
'pt_enable' => 0,
|
||||||
|
'pt_limit' => 1 * 24 * 3600,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($arrDataNovel as $arrPlanTask) {
|
foreach ($arrDataNovel as $arrPlanTask) {
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ EOT;
|
|||||||
|
|
||||||
$strParse = <<<EOT
|
$strParse = <<<EOT
|
||||||
<?php
|
<?php
|
||||||
\$arrCategory = app(\\app\\services\\NovelService::class)->getCategoryFilter( {$n_sex});
|
\$arrCategory = \\app\\services\\StaticConfig::getCategoryFilter( {$n_sex});
|
||||||
|
|
||||||
if (!empty(\$arrCategory) && is_array(\$arrCategory)):
|
if (!empty(\$arrCategory) && is_array(\$arrCategory)):
|
||||||
|
|
||||||
|
|||||||
2
code/storage/SiteMap/.gitignore
vendored
Normal file
2
code/storage/SiteMap/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
Reference in New Issue
Block a user