debug
This commit is contained in:
@@ -258,18 +258,37 @@ $Novel.n_id{extend name="baseH5" /}
|
||||
<span class="value">
|
||||
<span class="value-tag">
|
||||
{if empty($Request.route.intForgeId)}
|
||||
{php}
|
||||
$arrRandomForgeNovels = $arrNovel['n_forge_novel'];
|
||||
{/php}
|
||||
{volist name='$arrNovel.arrRelateveNovel' id='Novel' key="key"}
|
||||
{if !empty($arrGrm[$key + 24])}
|
||||
{$arrGrm[$key+24]|raw}
|
||||
{/if}
|
||||
<a href='{site:nurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" /}'>{$Novel.n_name}</a>
|
||||
{/volist}
|
||||
|
||||
{else}
|
||||
{novel:list count="10" n_category="$arrNovel.n_category_pinyin" sort_type="news" d_key="d_key" d_val="Novel" diff_key="$Request.route.intForgeId" cache_life="1000"}
|
||||
{novel:list count="10" n_category="$arrNovel.n_category_pinyin" sort_type="update" d_key="d_key" d_val="Novel" diff_key="$Request.route.intForgeId" cache_life="1000"}
|
||||
<a href='{site:nurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" /}'>{$Novel.n_name}</a>
|
||||
{/novel:list}
|
||||
|
||||
{php}
|
||||
// 随机选取 10 条数据
|
||||
$arrRorgeNovels = $arrNovel['n_forge_novel'];
|
||||
if (count($arrRorgeNovels) > 10) {
|
||||
$randomKeys = array_rand($arrRorgeNovels, 10);
|
||||
$randomForgeNovels = array_intersect_key($arrRorgeNovels, array_flip($randomKeys));
|
||||
} else {
|
||||
$randomForgeNovels = $arrRorgeNovels;
|
||||
shuffle($randomForgeNovels);
|
||||
}
|
||||
$arrRandomForgeNovels = array_values($randomForgeNovels); // 重置索引以确保 key 从 1 开始
|
||||
{/php}
|
||||
{/if}
|
||||
{volist name='arrNovel.n_forge_novel' id='ForgeNovel' key="key"}
|
||||
|
||||
|
||||
{volist name='arrRandomForgeNovels' id='ForgeNovel' key="key"}
|
||||
{if !empty($arrGrm[$key + 34])}
|
||||
{$arrGrm[$key+34]|raw}
|
||||
{/if}
|
||||
@@ -294,7 +313,7 @@ $Novel.n_id{extend name="baseH5" /}
|
||||
</div>
|
||||
{else}
|
||||
<div class="work-list">
|
||||
{novel:list count="8" n_category="$arrNovel.n_category_pinyin" sort_type="update" d_key="d_key" d_val="Novel" diff_key="$Request.route.intForgeId" cache_life="3600"}
|
||||
{novel:list count="8" n_category="$arrNovel.n_category_pinyin" sort_type="all" d_key="d_key" d_val="Novel" diff_key="$Request.route.intForgeId" cache_life="1000"}
|
||||
{include file="public/novel-list-flex" start="16"/}
|
||||
{/novel:list}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user