From d91252b4d03967559a3ddd9128522bb41637aba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Fri, 23 Jan 2026 17:41:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E9=97=B4=E7=83=AD=E5=BA=A6=E5=8D=A1?= =?UTF-8?q?=E5=BC=80=E5=8F=91-=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Gift.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/api/model/Gift.php b/application/api/model/Gift.php index 7165c009..a6f59335 100644 --- a/application/api/model/Gift.php +++ b/application/api/model/Gift.php @@ -31,14 +31,15 @@ class Gift extends Model foreach ($giftTypeData as $key => $value) { $giftType[$key]['id'] = $value['id']; $giftType[$key]['name'] = $value['name']; + $giftType[$key]['sort'] = $value['sort']; } //增加房间热度卡 if(!in_array(1013,$no_label)){ - $giftType[] = ['id' => 1013, 'name' => '房间热度卡']; + $giftType[] = ['id' => 1013, 'name' => '房间热度卡', 'sort' => 0]; } //排序 1013排到最前面去 usort($giftType, function($a, $b) { - return $a['id'] <=> $b['id']; + return $a['sort'] <=> $b['sort']; }); return ['code' => 1, 'msg' => '获取成功', 'data' => $giftType]; }