Merge branch 'dev' of ssh://git.bgbg.live:18150/root/SEONexus into dev

This commit is contained in:
make
2025-08-18 21:15:40 +08:00
3 changed files with 31 additions and 22 deletions

View File

@@ -318,6 +318,8 @@ class NovelService
*/ */
public function getNovelList(array $arrParams): array public function getNovelList(array $arrParams): array
{ {
$arrParams['key'] = '';
$intCount = (int)$arrParams['count'] ?? 10; $intCount = (int)$arrParams['count'] ?? 10;
$strNCategory = $arrParams['n_category'] ?? ''; $strNCategory = $arrParams['n_category'] ?? '';
$strSortType = (string)$arrParams['sort_type'] ?? ''; $strSortType = (string)$arrParams['sort_type'] ?? '';
@@ -414,6 +416,7 @@ class NovelService
*/ */
public function getNovelPager(array $arrParams): array public function getNovelPager(array $arrParams): array
{ {
$arrParams['key'] = '';
$arrParams = [ $arrParams = [
'page' => max((int)($arrParams['page'] ?? 1), 1), 'page' => max((int)($arrParams['page'] ?? 1), 1),
'limit' => (int)($arrParams['limit'] ?? 10), 'limit' => (int)($arrParams['limit'] ?? 10),

View File

@@ -106,7 +106,7 @@ class VideoService
* @param integer $intPlayIndex * @param integer $intPlayIndex
* @return string * @return string
*/ */
public function getVideoPlayUrl(int $intVId, string $strPinYin,string $strPlayType,int $intPlayIndex): string public function getVideoPlayUrl(int $intVId, string $strPinYin, string $strPlayType, int $intPlayIndex): string
{ {
$strKey = 'VIDEO_PLAY_URL'; $strKey = 'VIDEO_PLAY_URL';
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [ $strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
@@ -118,19 +118,19 @@ class VideoService
return (string)$strUrl; return (string)$strUrl;
} }
/** /**
* 获取视频分类URl * 获取视频分类URl
* *
* @param string|NULL $strCategory * @param string|NULL $strCategory
* @param string|NULL $strParentCategory * @param string|NULL $strParentCategory
* @param string|NULL $strArea * @param string|NULL $strArea
* @param integer|string|NULL $strLang * @param integer|string|NULL $strLang
* @param integer|string|NULL $strYear * @param integer|string|NULL $strYear
* @param integer|string|NULL $strOrder * @param integer|string|NULL $strOrder
* @param integer|string|NULL $intPage * @param integer|string|NULL $intPage
* @return string * @return string
*/ */
public function getVideoCategoryUrl(string|NULL $strCategory, string|NULL $strParentCategory, string|NULL $strArea, int|string|NULL $strLang, int|string|NULL $strYear, int|string|NULL $strOrder, int|string|NULL $intPage): string public function getVideoCategoryUrl(string|NULL $strCategory, string|NULL $strParentCategory, string|NULL $strArea, int|string|NULL $strLang, int|string|NULL $strYear, int|string|NULL $strOrder, int|string|NULL $intPage): string
{ {
$strKey = 'VIDEO_CATEGORY_URL'; $strKey = 'VIDEO_CATEGORY_URL';
@@ -157,9 +157,9 @@ class VideoService
* @param integer $intPage * @param integer $intPage
* @return string * @return string
*/ */
public function getVideoRankUrl(string $strCategory,string $strParentCategory, string $strSortType, int $intPage): string public function getVideoRankUrl(string $strCategory, string $strParentCategory, string $strSortType, int $intPage): string
{ {
$strKey = 'VIDEO_RANK_LIST_URL'; $strKey = 'VIDEO_RANK_LIST_URL';
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [ $strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
'strCategory' => !empty($strCategory) ? $strCategory : 'all', 'strCategory' => !empty($strCategory) ? $strCategory : 'all',
@@ -321,7 +321,7 @@ class VideoService
*/ */
public function getVideoList(array $arrParams): array public function getVideoList(array $arrParams): array
{ {
$arrParams['key'] = '';
$intCount = (int)$arrParams['count'] ?? 10; $intCount = (int)$arrParams['count'] ?? 10;
// $strVCategory = $arrParams['v_category'] ?? ''; // $strVCategory = $arrParams['v_category'] ?? '';
$strSortType = (string)$arrParams['sort_type'] ?? ''; $strSortType = (string)$arrParams['sort_type'] ?? '';
@@ -332,7 +332,7 @@ class VideoService
$strVCategoryEn = (string) $arrParams['v_category_en'] ?? ''; $strVCategoryEn = (string) $arrParams['v_category_en'] ?? '';
$strVParentCategoryEn = (string) $arrParams['v_parent_category_en'] ?? ''; $strVParentCategoryEn = (string) $arrParams['v_parent_category_en'] ?? '';
$strVLangEn = (string)$arrParams['v_lang_en'] ?? 'all'; $strVLangEn = (string)$arrParams['v_lang_en'] ?? 'all';
$strVAreaEn = (string)$arrParams['v_area_en'] ?? 'all'; $strVAreaEn = (string)$arrParams['v_area_en'] ?? 'all';
@@ -449,6 +449,7 @@ class VideoService
*/ */
public function getVideoPager(array $arrParams): array public function getVideoPager(array $arrParams): array
{ {
$arrParams['key'] = '';
$arrParams = [ $arrParams = [
'page' => max((int)($arrParams['page'] ?? 1), 1), 'page' => max((int)($arrParams['page'] ?? 1), 1),
'limit' => (int)($arrParams['limit'] ?? 10), 'limit' => (int)($arrParams['limit'] ?? 10),
@@ -506,7 +507,7 @@ class VideoService
} }
} }
# v_year filter # v_year filter
if (!empty($strVYear)) { if (!empty($strVYear)) {
if (key_exists($strVYear, StaticConfig::$arrVideoYear) && $strVYear != 'all') { if (key_exists($strVYear, StaticConfig::$arrVideoYear) && $strVYear != 'all') {
@@ -605,7 +606,7 @@ class VideoService
$intLifeTime = $intLifeTime; $intLifeTime = $intLifeTime;
} }
// 更新值 // 更新值
ConverterMovel::setVal([ ConverterMovel::setVal([
@@ -710,8 +711,8 @@ class VideoService
throw new HttpException(404, '视频不存在'); throw new HttpException(404, '视频不存在');
} }
if($intVForgeId >= 0 && !empty($arrVideo['v_seo_words'])){ if ($intVForgeId >= 0 && !empty($arrVideo['v_seo_words'])) {
$arrVideo['v_name'] = $arrVideo['v_seo_words'][$intVForgeId-1]; $arrVideo['v_name'] = $arrVideo['v_seo_words'][$intVForgeId - 1];
} }
// 取前5个元素 // 取前5个元素

View File

@@ -59,5 +59,10 @@ return [
'key' => ['n_have_chapter' => 1, 'n_forge_novel' => 1], 'key' => ['n_have_chapter' => 1, 'n_forge_novel' => 1],
'options' => ['unique' => false] 'options' => ['unique' => false]
], ],
[
'key' => ['n_forge_novel' => 1],
'options' => ['unique' => false]
],
] ]
]; ];