修复首页最新资源不显示问题

This commit is contained in:
Alone
2024-11-04 13:41:44 +08:00
parent d6f36c34ca
commit 79a17d758e
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ class Index extends QfShop
$map[] = ['is_delete', '=', 0];
$newList = $this->SourceModel->order(['create_time' => 'desc'])
->field('title,create_time as time')
->field('title,create_time as time,source_id as id')
->where($map)
->limit(Config('qfshop.ranking_num') ?? 1)
->select()->each(function($item,$key){
+5 -3
View File
@@ -26,7 +26,8 @@
</div>
</div>
<div class="home {if $config.ranking_type != 1}homeNO{/if}">
<div class="block" v-if="newList.length>0">
{if !empty($newList)}
<div class="block">
<div class="nav">
{notempty name="config.home_new_img"}
<img src="{$config.home_new_img}" alt="最新更新"></img>
@@ -38,7 +39,7 @@
<div class="list">
{volist name="newList" id="vos"}
{if condition="strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') === false || $key < $config.ranking_m_num"}
<a href="/s/{$vos.title}.html" target="_blank" class="item">
<a href="/d/{$vos.id}.html" target="_blank" class="item">
<div class="img">
<img src="{$vos.src}" alt="{$vos.title}" />
<span>Loading...</span>
@@ -52,7 +53,7 @@
<div class="list">
{volist name="newList" id="vos"}
{if condition="strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') === false || $key < $config.ranking_m_num"}
<a href="/s/{$vos.title}.html" target="_blank" class="item">
<a href="/d/{$vos.id}.html" target="_blank" class="item">
<p>
<span>{$key+1}</span>
{$vos.title}
@@ -65,6 +66,7 @@
</div>
</div>
{/if}
{volist name="hotList" id="vo"}
<div class="block">