diff --git a/code/app/home/view/default/test/test01/index.html b/code/app/home/view/default/test/test01/index.html index a26bab7..836569f 100644 --- a/code/app/home/view/default/test/test01/index.html +++ b/code/app/home/view/default/test/test01/index.html @@ -1,114 +1,61 @@ - - - +
 
 
-
+{/video:ranklist} 
 
-
- 
-
-
-
-
-
-
-
-
-
 
-
-
-
-
-
-
-
-
+{/video:list} -->
 
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+{/video:category} -->
 
 
-
-
-
-
-
-
-
 
+
\ No newline at end of file diff --git a/code/app/home/view/default/test/test01/index_bak.html b/code/app/home/view/default/test/test01/index_bak.html new file mode 100644 index 0000000..a26bab7 --- /dev/null +++ b/code/app/home/view/default/test/test01/index_bak.html @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/app/model/MongoModel.php b/code/app/model/MongoModel.php index 9e5a0aa..cf192fa 100644 --- a/code/app/model/MongoModel.php +++ b/code/app/model/MongoModel.php @@ -80,6 +80,16 @@ abstract class MongoModel { return $this->getCol()->findOne($arrFilter, $arrOptions); } + /** + * Undocumented function + * + * @param array $arrFilter + * @return array|object|null + */ + public function get(array $arrFilter = [], array $arrOptions = []): array|object|null + { + return $this->getCol()->find($arrFilter, $arrOptions); + } /** * Undocumented function diff --git a/code/app/model/VideoCategoryModel.php b/code/app/model/VideoCategoryModel.php new file mode 100644 index 0000000..38503b6 --- /dev/null +++ b/code/app/model/VideoCategoryModel.php @@ -0,0 +1,86 @@ + "大陆综艺", + "ai-qing-pian" => "爱情片", + "ke-huan-pian" => "科幻片", + "ri-han-zong-yi" => "日韩综艺", + "ri-han-dong-man" => "日韩动漫", + "zhan-zheng-pian" => "战争片", + "ou-mei-ju" => "欧美剧", + "lun-li-pian" => "倫理片", + "han-guo-ju" => "韩国剧", + "yin-le" => "音乐", + "dong-hua-pian" => "动画片", + "guo-chan-dong-man" => "国产动漫", + "kong-bu-pian" => "恐怖片", + "tai-wan-ju" => "台湾剧", + "xiang-gang-ju" => "香港剧", + "xi-ju-pian" => "喜剧片", + "ying-shi" => "影视", + "qi-che" => "汽车", + "ou-mei-zong-yi" => "欧美综艺", + "ju-qing-pian" => "剧情片", + "tai-guo-ju" => "泰国剧", + "hai-wai-ju" => "海外剧", + "guo-chan-ju" => "国产剧", + "fu-li" => "福利", + "ou-mei-dong-man" => "欧美动漫", + "dong-zuo-pian" => "动作片", + "ri-ben-ju" => "日本剧", + "gang-tai-zong-yi" => "港台综艺", + "gang-tai-dong-man" => "港台动漫", + "ji-lu-pian" => "记录片", + "duan-ju-da-quan" => "短剧大全", + "gao-xiao" => "搞笑", + "hai-wai-dong-man" => "海外动漫", + ]; + + /** + * get category of the videos + * + * @return array + */ + static public function getCategory(): array + { + return self::$arrCategory; + } + + /** + * get pinyin based on chinese characters + * + * @param string $strZh + * @return string + */ + static public function getZhByPinYin(string $strZh) + { + $strKey = array_search($strZh, self::$arrCategory); + return $strKey === false ?: self::$arrCategory[$strKey]; + } +} diff --git a/code/app/services/StaticConfig.php b/code/app/services/StaticConfig.php index 3ec25c6..5e3b945 100644 --- a/code/app/services/StaticConfig.php +++ b/code/app/services/StaticConfig.php @@ -3,6 +3,8 @@ namespace app\services; use app\model\CategoryModel; +use app\model\VideoCategoryModel; +use app\model\VideoModel; class StaticConfig { @@ -50,12 +52,19 @@ class StaticConfig 'update' => '最新更新', ]; + static $arrVideoRankSortType = [ + 'daily' => '天', + 'weekly' => '周', + 'monthly' => '月', + 'total' => '总', + ]; + /** - * GetCategoryFilter + * getNovelCategoryFilter * * @return array */ - static function getCategoryFilter(string $strNSex = ''): array + static function getNovelCategoryFilter(string $strNSex = ''): array { if ($strNSex == 'man') { return CategoryModel::$arrCategoryAll['man']; @@ -65,4 +74,14 @@ class StaticConfig return array_combine(CategoryModel::$arrCategoryPinYin, CategoryModel::$arrCategory); } } + + /** + * getNovelCategoryFilter + * + * @return array + */ + static function getVideoCategoryFilter(): array + { + return VideoCategoryModel::$arrCategory; + } } diff --git a/code/app/services/VideoService.php b/code/app/services/VideoService.php index c17eb1e..235ebeb 100644 --- a/code/app/services/VideoService.php +++ b/code/app/services/VideoService.php @@ -60,7 +60,7 @@ class VideoService /** - * 获取小说分类URl + * 获取视频分类URl * * @param string $strGender * @param string $strCategory @@ -114,7 +114,7 @@ class VideoService /** * Undocumented function - * 小说目录 + * 视频目录 * @param int $intVId * @param string $intPinYin * @return string @@ -151,7 +151,7 @@ class VideoService } /** - * 获取排行榜小说 + * 获取排行榜视频 * * @param array $arrParams * @return array @@ -160,7 +160,7 @@ class VideoService { $intCount = (int)$arrParams['count'] ?? 10; $strSortType = (string)$arrParams['sort_type'] ?? ''; - $strNStatus = (string) $arrParams['v_isend'] ?? ''; + $strVStatus = (string) $arrParams['v_status'] ?? ''; $strDiffKey = (string) $arrParams['diff_key'] ?? ''; $intCacheLifeTime = (int)$arrParams['cache_life'] ?? 0; @@ -168,8 +168,8 @@ class VideoService $arrFilter = []; # v_isend filter - if (!empty($strNStatus)) { - switch ($strNStatus) { + if (!empty($strVStatus)) { + switch ($strVStatus) { case 'lianzai': $arrFilter['v_isend'] = 0; break; @@ -220,10 +220,8 @@ class VideoService $arrVideo = $this->VideoModel->getRankVideoOnCache( $strCacheKey, $intCount, - $arrFilter['v_category_sex_zh'] ?? 0, $arrSort['v_sort_type'] ?? 'daily', - $arrFilter['v_isend'] ?? NULL, - $intLifeTime, + $arrFilter['v_status'] ?? NULL, ); return $arrVideo; @@ -231,7 +229,7 @@ class VideoService /** - * 获取小说数据 + * 获取视频数据 * * @param array $arrParams * @return array @@ -241,7 +239,7 @@ class VideoService $intCount = (int)$arrParams['count'] ?? 10; $strNCategory = $arrParams['v_category'] ?? ''; $strSortType = (string)$arrParams['sort_type'] ?? ''; - $strNStatus = (string) $arrParams['v_isend'] ?? ''; + $strVStatus = (string) $arrParams['v_status'] ?? ''; $strDiffKey = (string) $arrParams['diff_key'] ?? ''; $intCacheLifeTime = (int)$arrParams['cache_life'] ?? 0; @@ -257,18 +255,17 @@ class VideoService } # v_isend filter - if (!empty($strNStatus)) { - switch ($strNStatus) { + if (!empty($strVStatus)) { + switch ($strVStatus) { case 'lianzai': - $arrFilter['v_isend'] = StaticConfig::$arrVideoStatus[$strNStatus]; + $arrFilter['v_isend'] = 0; break; case 'wanjie': - $arrFilter['v_isend'] = StaticConfig::$arrVideoStatus[$strNStatus]; + $arrFilter['v_isend'] = 1; break; } } - $arrSort = []; # sort filter @@ -281,7 +278,7 @@ class VideoService $arrSort['v_level'] = -1; break; case 'update': - $arrSort['v_update_time'] = -1; + $arrSort['v_publish_date'] = -1; break; } } @@ -316,7 +313,7 @@ class VideoService /** - * 获取小说分页数据 + * 获取视频分页数据 * * @param array $arrParams * @return array @@ -330,7 +327,6 @@ class VideoService 'v_category' => (string)($arrParams['v_category'] ?? ''), 'sort_type' => (string)($arrParams['sort_type'] ?? ''), 'v_isend' => (string)($arrParams['v_isend'] ?? ''), - 'v_sex' => (string)($arrParams['v_sex'] ?? ''), 'diff_key' => (string)($arrParams['diff_key'] ?? ''), 'key' => (string)($arrParams['key'] ?? ''), 'cache_life' => (int)($arrParams['cache_life'] ?? 0), @@ -341,7 +337,7 @@ class VideoService $intLimit = $arrParams['limit']; $strNCategory = $arrParams['v_category']; $strSortType = $arrParams['sort_type']; - $strNStatus = $arrParams['v_isend']; + $strVStatus = $arrParams['v_isend']; $strDiffKey = $arrParams['diff_key']; $strKey = $arrParams['key']; @@ -367,13 +363,13 @@ class VideoService } # v_isend filter - if (!empty($strNStatus)) { - switch ($strNStatus) { + if (!empty($strVStatus)) { + switch ($strVStatus) { case 'lianzai': - $arrFilter['$and'][] = ['v_isend' => StaticConfig::$arrVideoStatus[$strNStatus]]; + $arrFilter['$and'][] = ['v_isend' => 0]; break; case 'wanjie': - $arrFilter['$and'][] = ['v_isend' => StaticConfig::$arrVideoStatus[$strNStatus]]; + $arrFilter['$and'][] = ['v_isend' => 1]; break; default: $arrParams['v_isend'] = 'all'; @@ -409,7 +405,7 @@ class VideoService $arrSort['v_level'] = -1; break; case 'update': - $arrSort['v_update_time'] = -1; + $arrSort['v_publish_date'] = -1; break; default: $arrParams['sort_type'] = 'all'; @@ -436,18 +432,11 @@ class VideoService } // 更新值 - $strGender = $this->SiteContext->Request->param('strGender'); - $strNanUrlTemp = $this->SiteContext->DomainModel->getFomartSubject('NAN_SHENG_URL', '', false); - $strNanUrl = str_replace("/", "", $strNanUrlTemp); - $strCNSex = '全部'; - if ($strGender) { - $strCNSex = $strGender == $strNanUrl ? '男生' : '女生'; - } + ConverterMovel::setVal([ 'intPage' => $intPage, - 'strVideoSex' => $strCNSex, - 'strVideoCategoryName' => empty($strNCategory) ? '' : str_replace("小说", "", $strNCategory), - 'strVideoStatus' => empty($strNStatus) ? '' : StaticConfig::$arrVideoStatus[$strNStatus], + 'strVideoCategoryName' => empty($strNCategory) ? '' : str_replace("视频", "", $strNCategory), + 'strVideoStatus' => empty($strVStatus) ? '' : StaticConfig::$arrVideoStatus[$strVStatus], 'strVideoOrder' => empty($strSortType) ? '' : StaticConfig::$arrVideoSortType[$strSortType], 'strSearchKeywords' => $strKey, ]); @@ -497,82 +486,54 @@ class VideoService return $arrPaginator; } + /** * 书库/分类定制分页 * * @param array $arrFilter 查询条件字段 * @param array $arrSort 查询排序字段 - * @param array $arrVideo 查询出来的数据 + * @param array $arrNovel 查询出来的数据 * @return array */ - public function generateCategoryPager(array $arrParams, array $arrSort, array $arrVideo): array + public function generateVideoPager(array $arrParams, array $arrSort, array $arrVideo): array { - $strGender = $arrParams['v_sex']; - $strCategory = $arrParams['v_category']; - $strStatus = $arrParams['v_isend']; - $strOrder = $arrParams['sort_type']; - $intPage = $arrVideo['page'] ?? 1; - $intLimit = $arrVideo['limit'] ?? 10; - $intTotal = $arrVideo['total'] ?? 0; + $strKey = $arrParams['key']; + $intPage = $arrVideo['page']; + $intLimit = $arrVideo['limit']; $intButtomNum = $arrParams['buttov_num']; - $strBaseUrl = $this->getVideoCategoryUrl($strGender, $strCategory, $strStatus, $strOrder, '{page}'); - - $arrPaginator = CusteomPage02::generate($intPage, $intTotal, $intLimit, $strBaseUrl, $intButtomNum); + $strBaseUrl = app(VideoService::class)->getVideoSearchUrl($strKey, '{page}'); + $arrPaginator = CusteomPage02::generate($intPage, $arrVideo['total'], $intLimit, $strBaseUrl, $intButtomNum); return $arrPaginator; + } /** - * 根据VId获取小说详情 + * 根据VId获取视频详情 * * @param integer $intVId * @return void */ - public function getVideoByVId(int $intVId, int|null $intNForgeId = 0) + public function getVideoByVId(int $intVId) { - // 小说详情 + // 视频详情 $arrVideo = $this->VideoModel->getVideoByVId($intVId); - if ($intNForgeId > 0) { - foreach ($arrVideo['v_forge_novel'] as $arrForgeVideo) { - if ($arrForgeVideo['v_forge_id'] == $intNForgeId) { - $arrVideo['v_name'] = $arrForgeVideo['v_forge_title']; - break; - } - } - } - - // 分类拼音 - $arrVideo['v_category_pinyin'] = CategoryModel::getPinYin($arrVideo['v_category']); - $arrVideo['v_category_sex_en'] = $arrVideo['v_category_sex_en'] ?? 'man'; - // 点击数 $arrVideoClicks = $this->VideoClicksModel->getStats($intVId); - // 推荐小说 - $arrRelateveVId = array_column($arrVideo['v_related_novel'], 'v_id'); - - $arrRelateveVideo = $this->VideoModel->findMany(['v_id' => [ - '$in' => $arrRelateveVId, - ]], 10); - - // 更新值 ConverterMovel::setVal([ 'intPage' => 1, 'strVideoName' => $arrVideo['v_name'], - 'strVideoAuthor' => $arrVideo['v_author'], 'strVideoCategoryName' => $arrVideo['v_category'], - 'strVideoSex' => $arrVideo['v_category_sex_en'] == 'man' ? '男生' : '女生', 'strVideoStatus' => $arrVideo['v_isend'], 'strVideoDescription' => $arrVideo['v_description'], ]); $arrVideo['arrVideoClicks'] = $arrVideoClicks; - $arrVideo['arrRelateveVideo'] = $arrRelateveVideo; - return $arrVideo; } diff --git a/code/app/task/crawler/youzhi/page/VideoInfoPage.php b/code/app/task/crawler/youzhi/page/VideoInfoPage.php index 12ae063..ab1dd05 100644 --- a/code/app/task/crawler/youzhi/page/VideoInfoPage.php +++ b/code/app/task/crawler/youzhi/page/VideoInfoPage.php @@ -83,6 +83,9 @@ class VideoInfoPage extends BasePage 'url' => $arrVal[1] ?? $arrVal[0], ]; } + + $arrVideo['vod_class'] = trim($arrVideo['vod_class']); + $arrVideo['vod_play_url'][$this->getsite()->getSiteCode()] = $arrPlayUrl; $arrVideo['vod_actor'] = explode(',', $arrVideo['vod_actor']); $arrVideo['vod_director'] = explode(',', $arrVideo['vod_director']); diff --git a/code/app/task/logic/SiteMapLogic.php b/code/app/task/logic/SiteMapLogic.php index 77807f7..84d1b53 100644 --- a/code/app/task/logic/SiteMapLogic.php +++ b/code/app/task/logic/SiteMapLogic.php @@ -45,7 +45,7 @@ class SiteMapLogic public function __construct() { - $this->arrNovelCategory = StaticConfig::getCategoryFilter(); + $this->arrNovelCategory = StaticConfig::getNovelCategoryFilter(); $this->arrNovelSort = StaticConfig::$arrNovelSortType; diff --git a/code/config/view.php b/code/config/view.php index 2bdee2f..4298055 100644 --- a/code/config/view.php +++ b/code/config/view.php @@ -27,7 +27,7 @@ return [ // 自定义标签 - 'taglib_pre_load' => '\\template\\taglib\\Ad,\\template\\taglib\\Site,\\template\\taglib\\Rs,\\template\\taglib\\Novel,\\template\\taglib\\Chapter', + 'taglib_pre_load' => '\\template\\taglib\\Ad,\\template\\taglib\\Site,\\template\\taglib\\Rs,\\template\\taglib\\Novel,\\template\\taglib\\Chapter,\\template\\taglib\\Video', // 模板渲染缓存 'display_cache' => env('VIEW_DISPLAY_CACHE', false), diff --git a/code/extend/template/taglib/Novel.php b/code/extend/template/taglib/Novel.php index 359d610..8cb7040 100644 --- a/code/extend/template/taglib/Novel.php +++ b/code/extend/template/taglib/Novel.php @@ -414,7 +414,7 @@ EOT; $strParse = << ['attr' => 'count,n_category,sort_type,n_status,n_sex,diff_key,cache_life,d_key,d_val', 'close' => 1], - 'pager' => ['attr' => 'page,limit,n_category,sort_type,n_status,n_sex,key,diff_key,cache_life,d_key,d_val,p_val,func,export_name', 'close' => 1], - 'pagerexp' => ['attr' => 'page,limit,n_category,sort_type,n_status,n_sex,key,diff_key,cache_life,d_key,d_val,p_val,func,export_name', 'close' => 0], - 'info' => ['attr' => 'n_id,n_forge_id,n_key', 'close' => 0], + 'list' => ['attr' => 'count,v_category,sort_type,v_status,v_sex,diff_key,cache_life,d_key,d_val', 'close' => 1], + 'pager' => ['attr' => 'page,limit,v_category,sort_type,v_status,v_sex,key,diff_key,cache_life,d_key,d_val,p_val,func,export_name', 'close' => 1], + 'pagerexp' => ['attr' => 'page,limit,v_category,sort_type,v_status,v_sex,key,diff_key,cache_life,d_key,d_val,p_val,func,export_name', 'close' => 0], + 'info' => ['attr' => 'v_id,v_forge_id,v_key', 'close' => 0], 'sort' => ['attr' => 'd_key,d_val'], 'ranksort' => ['attr' => 'd_key,d_val'], 'status' => ['attr' => 'd_key,d_val'], - 'sex' => ['attr' => 'd_key,d_val'], - 'category' => ['attr' => 'd_key,d_val,n_sex'], + 'category' => ['attr' => 'd_key,d_val,v_sex'], - 'ranklist' => ['attr' => 'count,sort_type,n_status,n_sex,diff_key,cache_life,d_key,d_val', 'close' => 1], + 'ranklist' => ['attr' => 'count,sort_type,v_status,v_sex,diff_key,cache_life,d_key,d_val', 'close' => 1], ]; private function customBuildVar($mixedArgs) @@ -29,8 +28,6 @@ class Video extends TagLib } } - - /** * tagRankList * @@ -42,8 +39,7 @@ class Video extends TagLib { $count = $tag['count'] ?? '10'; $sort_type = $tag['sort_type'] ?? ""; - $n_status = $tag['n_status'] ?? "all"; - $n_sex = $tag['n_sex'] ?? "all"; + $v_status = $tag['v_status'] ?? "all"; $diff_key = $tag['diff_key'] ?? ""; $cache_life = $tag['cache_life'] ?? '0'; @@ -51,8 +47,8 @@ class Video extends TagLib $d_val = $tag['d_val'] ?? 'd_val'; $sort_type = $this->customBuildVar($sort_type); - $n_status = $this->customBuildVar($n_status); - $n_sex = $this->customBuildVar($n_sex); + $v_status = $this->customBuildVar($v_status); + $diff_key = $this->customBuildVar($diff_key); $cache_life = $this->customBuildVar($cache_life); @@ -63,8 +59,7 @@ class Video extends TagLib \${$arrDataName} = app(\\app\\services\\VideoService::class)->getRankList([ 'count' => {$count}, 'sort_type' => {$sort_type}, -'n_status' => {$n_status}, -'n_sex' => {$n_sex}, +'v_status' => {$v_status}, 'diff_key' => {$diff_key}, 'cache_life' => {$cache_life} ]); @@ -108,11 +103,10 @@ EOT; { $page = $tag['page'] ?? '0'; $limit = $tag['limit'] ?? '10'; - $button_num = $tag['button_num'] ?? '10'; - $n_category = $tag['n_category'] ?? "all"; + $buttov_num = $tag['buttov_num'] ?? '10'; + $v_category = $tag['v_category'] ?? "all"; $sort_type = $tag['sort_type'] ?? ""; - $n_status = $tag['n_status'] ?? ""; - $n_sex = $tag['n_sex'] ?? ""; + $v_status = $tag['v_status'] ?? ""; $key = $tag['key'] ?? ""; $diff_key = $tag['diff_key'] ?? ""; $cache_life = $tag['cache_life'] ?? '0'; @@ -126,11 +120,11 @@ EOT; $page = $this->customBuildVar($page); $limit = $this->customBuildVar($limit); - $button_num = $this->customBuildVar($button_num); - $n_category = $this->customBuildVar($n_category); + $buttov_num = $this->customBuildVar($buttov_num); + $v_category = $this->customBuildVar($v_category); $sort_type = $this->customBuildVar($sort_type); - $n_status = $this->customBuildVar($n_status); - $n_sex = $this->customBuildVar($n_sex); + $v_status = $this->customBuildVar($v_status); + $key = $this->customBuildVar($key); $diff_key = $this->customBuildVar($diff_key); $cache_life = $this->customBuildVar($cache_life); @@ -143,11 +137,10 @@ EOT; \${$arrDataName} = app(\\app\\services\\VideoService::class)->getVideoPager([ 'page' => {$page}, 'limit' => {$limit}, - 'button_num' => {$button_num}, - 'n_category' => {$n_category}, + 'buttov_num' => {$buttov_num}, + 'v_category' => {$v_category}, 'sort_type' => {$sort_type}, - 'n_status' => {$n_status}, - 'n_sex' => {$n_sex}, + 'v_status' => {$v_status}, 'key' => {$key}, 'diff_key' => {$diff_key}, 'cache_life' => {$cache_life}, @@ -186,20 +179,18 @@ EOT; public function tagList($tag, $content) { $count = $tag['count'] ?? '10'; - $n_category = $tag['n_category'] ?? "all"; + $v_category = $tag['v_category'] ?? "all"; $sort_type = $tag['sort_type'] ?? ""; - $n_status = $tag['n_status'] ?? "all"; - $n_sex = $tag['n_sex'] ?? "all"; + $v_status = $tag['v_status'] ?? "all"; $diff_key = $tag['diff_key'] ?? ""; $cache_life = $tag['cache_life'] ?? '0'; $d_key = $tag['d_key'] ?? 'd_key'; $d_val = $tag['d_val'] ?? 'd_val'; - $n_category = $this->customBuildVar($n_category); + $v_category = $this->customBuildVar($v_category); $sort_type = $this->customBuildVar($sort_type); - $n_status = $this->customBuildVar($n_status); - $n_sex = $this->customBuildVar($n_sex); + $v_status = $this->customBuildVar($v_status); $diff_key = $this->customBuildVar($diff_key); $cache_life = $this->customBuildVar($cache_life); @@ -209,10 +200,9 @@ EOT; getVideoList([ 'count' => {$count}, - 'n_category' => {$n_category}, + 'v_category' => {$v_category}, 'sort_type' => {$sort_type}, - 'n_status' => {$n_status}, - 'n_sex' => {$n_sex}, + 'v_status' => {$v_status}, 'diff_key' => {$diff_key}, 'cache_life' => {$cache_life} ]); @@ -232,12 +222,8 @@ EOT; return $strParse; } - - - - /** - * 获取小说详情 + * 获取视频详情 * * @param array $tag * @param string $content @@ -245,22 +231,21 @@ EOT; */ public function tagInfo($tag) { - $n_id = $tag['n_id'] ?? '0'; - $n_forge_id = isset($tag['n_forge_id']) ? $tag['n_forge_id'] : 0; + $v_id = $tag['v_id'] ?? '0'; - $n_key = $tag['n_key'] ?? 'arrVideo'; + $v_key = $tag['v_key'] ?? 'arrVideo'; + + $v_id = $this->customBuildVar($v_id); + + $arrDataName = randomString(5); - $n_id = $this->customBuildVar($n_id); - $n_forge_id = $this->customBuildVar($n_forge_id); - $strParse = <<getVideoByNId( - {$n_id}, - {$n_forge_id} +\${$arrDataName} = app(\\app\\services\\VideoService::class)->getVideoByVId( + {$v_id} ); - \${$n_key} = \$novelData ?? []; + \${$v_key} = \${$arrDataName} ?? []; ?> EOT; @@ -363,39 +348,6 @@ EOT; return $strParse; } - - /** - * 获取状态筛选参数 - * - * @param array $tag - * @param string $content - * @return string - */ - public function tagSex($tag, $content) - { - - $d_key = $tag['d_key'] ?? 'd_key'; - $d_val = $tag['d_val'] ?? 'd_val'; - - $strParse = << -EOT; - $strParse .= << \${$d_val}): ?> -EOT; - $strParse .= $content; - $strParse .= << - -EOT; - return $strParse; - } - /** * 获取状态筛选参数 * @@ -408,13 +360,10 @@ EOT; $d_key = $tag['d_key'] ?? 'd_key'; $d_val = $tag['d_val'] ?? 'd_val'; - $n_sex = $tag['n_sex'] ?? ''; - - $n_sex = $this->customBuildVar($n_sex); $strParse = <<