From 11339784782566946cb7011d578bf3b86f804538 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Tue, 11 Nov 2025 18:44:34 +0800
Subject: [PATCH] 修复名片置顶问题

---
 admin/app/common/model/plus/business/Business.php |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/admin/app/common/model/plus/business/Business.php b/admin/app/common/model/plus/business/Business.php
index 58a6405..add9da1 100644
--- a/admin/app/common/model/plus/business/Business.php
+++ b/admin/app/common/model/plus/business/Business.php
@@ -133,12 +133,13 @@
         !empty($paramr['city_id']) && $where['city_id'] = $paramr['city_id'];
         !empty($paramr['region_id']) && $where['region_id'] = $paramr['region_id'];
         if (!empty($paramr['sort'])) {
+            $order = ['is_top' => 'desc', 'top_time' => 'desc'];
             if ($paramr['sort'] == 'name') {
-                $order = ['name' => "asc"];
+                $order['name'] = "asc";
             } else if ($paramr['sort'] == 'time') {
-                $order = ['create_time' => "asc"];
+                $order['create_time'] = "asc";
             } else {
-                $order = ['unit' => "asc"];
+                $order['unit'] = "asc";
             }
         } else {
             // 检查置顶时间是否过期,如果过期则设置为非置顶

--
Gitblit v1.9.2