From cd25d217d8a6875ae6b0d2e6c6abc95353638e8c Mon Sep 17 00:00:00 2001 From: Wayne <943146732@qq.com> Date: Mon, 26 Feb 2024 16:05:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/model/Banner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/store/model/Banner.php b/app/store/model/Banner.php index c8cbffbb..f95b9e4c 100644 --- a/app/store/model/Banner.php +++ b/app/store/model/Banner.php @@ -28,7 +28,7 @@ class Banner extends BannerModel */ public function getList(): \think\Paginator { - $data = $this->paginate(); + $data = $this->order(['sort' => 'asc', 'create_time' => 'desc'])->paginate(); return self::preload($data, ['image']); }