diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 060402d..3857380 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -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){ diff --git a/app/index/view/news/index.html b/app/index/view/news/index.html index f8650de..3969636 100644 --- a/app/index/view/news/index.html +++ b/app/index/view/news/index.html @@ -26,7 +26,8 @@
-
+ {if !empty($newList)} +