debug
This commit is contained in:
@@ -109,31 +109,47 @@ class SiteContext
|
||||
*/
|
||||
public function initCfg()
|
||||
{
|
||||
// 全局使用的URL模板
|
||||
$strPcUrlTemp = $this->DomainModel->getFomartSubject('PC_URL_PATH', '', false);
|
||||
$strNanUrlTemp = $this->DomainModel->getFomartSubject('NAN_SHENG_URL', '', false);
|
||||
$strNvUrlTemp = $this->DomainModel->getFomartSubject('NV_SHENG_URL', '', false);
|
||||
$strCategoryIndexUrlTemp = $this->DomainModel->getFomartSubject('CATEGORY_INDEX_URL', '', false);
|
||||
$strRankUrlTemp = $this->DomainModel->getFomartSubject('RANK_INFO_URL', '', false);
|
||||
$strSearchIndexUrlTemp = $this->DomainModel->getFomartSubject('SEARCH_INDEX_URL', '', false);
|
||||
$strHistoryUrlTemp = $this->DomainModel->getFomartSubject('HISTORY_INFO_URL', '', false);
|
||||
$strBookShelfUrlTemp = $this->DomainModel->getFomartSubject('SHUJIA_INFO_URL', '', false);
|
||||
$strUserUrlTemp = $this->DomainModel->getFomartSubject('USER_INFO_URL', '', false);
|
||||
if(config('app.default_app_type') == 'novel'){
|
||||
// 全局使用的URL模板
|
||||
$strPcUrlTemp = $this->DomainModel->getFomartSubject('PC_URL_PATH', '', false);
|
||||
$strNanUrlTemp = $this->DomainModel->getFomartSubject('NAN_SHENG_URL', '', false);
|
||||
$strNvUrlTemp = $this->DomainModel->getFomartSubject('NV_SHENG_URL', '', false);
|
||||
$strCategoryIndexUrlTemp = $this->DomainModel->getFomartSubject('CATEGORY_INDEX_URL', '', false);
|
||||
$strRankUrlTemp = $this->DomainModel->getFomartSubject('RANK_INFO_URL', '', false);
|
||||
$strSearchIndexUrlTemp = $this->DomainModel->getFomartSubject('SEARCH_INDEX_URL', '', false);
|
||||
$strHistoryUrlTemp = $this->DomainModel->getFomartSubject('HISTORY_INFO_URL', '', false);
|
||||
$strBookShelfUrlTemp = $this->DomainModel->getFomartSubject('SHUJIA_INFO_URL', '', false);
|
||||
$strUserUrlTemp = $this->DomainModel->getFomartSubject('USER_INFO_URL', '', false);
|
||||
|
||||
$strNanUrl = str_replace("/", "", $strNanUrlTemp);
|
||||
$strNvUrl = str_replace("/", "", $strNvUrlTemp);
|
||||
$strNanUrl = str_replace("/", "", $strNanUrlTemp);
|
||||
$strNvUrl = str_replace("/", "", $strNvUrlTemp);
|
||||
|
||||
View::assign("strPcPath", $strPcUrlTemp);
|
||||
View::assign("strNanUrlTemp", $strNanUrlTemp);
|
||||
View::assign("strNvUrlTemp", $strNvUrlTemp);
|
||||
View::assign("strNanUrl", $strNanUrl);
|
||||
View::assign("strNvUrl", $strNvUrl);
|
||||
View::assign("strCategoryIndexUrlTemp", $strCategoryIndexUrlTemp);
|
||||
View::assign("strRankUrlTemp", $strRankUrlTemp);
|
||||
View::assign("strSearchIndexUrlTemp", $strSearchIndexUrlTemp);
|
||||
View::assign("strHistoryUrlTemp", $strHistoryUrlTemp);
|
||||
View::assign("strBookShelfUrlTemp", $strBookShelfUrlTemp);
|
||||
View::assign("strUserUrlTemp", $strUserUrlTemp);
|
||||
View::assign("strPcPath", $strPcUrlTemp);
|
||||
View::assign("strNanUrlTemp", $strNanUrlTemp);
|
||||
View::assign("strNvUrlTemp", $strNvUrlTemp);
|
||||
View::assign("strNanUrl", $strNanUrl);
|
||||
View::assign("strNvUrl", $strNvUrl);
|
||||
View::assign("strCategoryIndexUrlTemp", $strCategoryIndexUrlTemp);
|
||||
View::assign("strRankUrlTemp", $strRankUrlTemp);
|
||||
View::assign("strSearchIndexUrlTemp", $strSearchIndexUrlTemp);
|
||||
View::assign("strHistoryUrlTemp", $strHistoryUrlTemp);
|
||||
View::assign("strBookShelfUrlTemp", $strBookShelfUrlTemp);
|
||||
View::assign("strUserUrlTemp", $strUserUrlTemp);
|
||||
}else{
|
||||
$strPcUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_PC_URL_PATH', '', false);
|
||||
View::assign("strPcPath", $strPcUrlTemp);
|
||||
}
|
||||
|
||||
|
||||
// 视频站点需要信息
|
||||
// $strVideoCategoryIndexUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_CATEGORY_INDEX_URL', '', false);
|
||||
// $strVideoSearchListUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_SEARCH_LIST_URL', '', false);
|
||||
// $strVideoHistoryUrlTemp = $this->DomainModel->getFomartSubject('VIDEO_HISTORY_LIST_URL', '', false);
|
||||
// View::assign("strVideoCategoryIndexUrlTemp", $strVideoCategoryIndexUrlTemp);
|
||||
// View::assign("strVideoSearchListUrlTemp", $strVideoSearchListUrlTemp);
|
||||
// View::assign("strVideoHistoryUrlTemp", $strVideoHistoryUrlTemp);
|
||||
|
||||
|
||||
|
||||
View::assign('Request', $this->Request);
|
||||
View::assign('DomainModel', $this->DomainModel);
|
||||
|
||||
@@ -40,6 +40,24 @@ class VideoService
|
||||
$this->VideoClicksModel = VideoClicksModel::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视频分类首页 URl
|
||||
*
|
||||
* @param string $strClass
|
||||
* @return string
|
||||
*/
|
||||
public function getVideoCategoryIndexUrl(string $strClass): string
|
||||
{
|
||||
$strKey = 'VIDEO_CATEGORY_INDEX_URL';
|
||||
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||
'strClass' => !empty($strClass) ? $strClass : '',
|
||||
]);
|
||||
|
||||
$strUrl = preg_replace('#/{2,}#', '/', $strUrl);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
@@ -59,23 +77,27 @@ class VideoService
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取视频分类URl
|
||||
*
|
||||
* @param string $strGender
|
||||
* @param string $strCategory
|
||||
* @param string $strStatus
|
||||
* @param string $strOrder
|
||||
* @param integer $intPage
|
||||
* @return string
|
||||
*/
|
||||
public function getVideoCategoryUrl(string|NULL $strGender, string|NULL $strCategory, string|NULL $strStatus, string|NULL $strOrder, int|string|NULL $intPage): string
|
||||
/**
|
||||
* 获取视频分类URl
|
||||
*
|
||||
* @param string|NULL $strCategory
|
||||
* @param string|NULL $strClass
|
||||
* @param string|NULL $strArea
|
||||
* @param integer|string|NULL $strLang
|
||||
* @param integer|string|NULL $strYear
|
||||
* @param integer|string|NULL $strOrder
|
||||
* @param integer|string|NULL $intPage
|
||||
* @return string
|
||||
*/
|
||||
public function getVideoCategoryUrl(string|NULL $strCategory, string|NULL $strClass, string|NULL $strArea, int|string|NULL $strLang, int|string|NULL $strYear, int|string|NULL $strOrder, int|string|NULL $intPage): string
|
||||
{
|
||||
$strKey = 'CATEGORY_INFO_URL';
|
||||
$strKey = 'VIDEO_CATEGORY_URL';
|
||||
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
|
||||
'strGender' => !empty($strGender) ? $strGender : '',
|
||||
'strCategory' => !empty($strCategory) ? $strCategory : 'all',
|
||||
'strStatus' => !empty($strStatus) ? $strStatus : 'all',
|
||||
'strClass' => !empty($strClass) ? $strClass : 'all',
|
||||
'strArea' => !empty($strCategory) ? $strArea : 'all',
|
||||
'strLang' => !empty($strCategory) ? $strLang : 'all',
|
||||
'strYear' => !empty($strCategory) ? $strYear : 'all',
|
||||
'strOrder' => !empty($strOrder) ? $strOrder : 'all',
|
||||
'intPage' => $intPage ?? 1,
|
||||
]);
|
||||
@@ -497,7 +519,7 @@ class VideoService
|
||||
|
||||
|
||||
/**
|
||||
* 书库/分类定制分页
|
||||
* 分类定制分页
|
||||
*
|
||||
* @param array $arrFilter 查询条件字段
|
||||
* @param array $arrSort 查询排序字段
|
||||
@@ -506,11 +528,18 @@ class VideoService
|
||||
*/
|
||||
public function generateVideoPager(array $arrParams, array $arrSort, array $arrVideo): array
|
||||
{
|
||||
$strKey = $arrParams['key'];
|
||||
$strCategory = $arrParams['v_category'];
|
||||
$strClass = $arrParams['v_class'];
|
||||
$strArea = $arrParams['v_area'];
|
||||
$strLang = $arrParams['v_lang'];
|
||||
$strYear = $arrParams['v_year'];
|
||||
$strOrder = $arrParams['sort_type'];
|
||||
|
||||
|
||||
$intPage = $arrVideo['page'];
|
||||
$intLimit = $arrVideo['limit'];
|
||||
$intButtomNum = $arrParams['buttov_num'];
|
||||
$strBaseUrl = app(VideoService::class)->getVideoSearchUrl($strKey, '{page}');
|
||||
$strBaseUrl = app(VideoService::class)->getVideoCategoryUrl($strCategory,$strClass,$strArea,$strLang,$strYear,$strOrder ,'{page}');
|
||||
$arrPaginator = CusteomPage02::generate($intPage, $arrVideo['total'], $intLimit, $strBaseUrl, $intButtomNum);
|
||||
|
||||
return $arrPaginator;
|
||||
|
||||
Reference in New Issue
Block a user