From 6af355866046d98836b3500b7d5b7a709fa0a3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Mon, 26 Jan 2026 10:58:07 +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-=E7=A4=BC=E7=89=A9=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Gift.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/application/api/model/Gift.php b/application/api/model/Gift.php index 5ffcfde2..11140d37 100644 --- a/application/api/model/Gift.php +++ b/application/api/model/Gift.php @@ -20,6 +20,9 @@ class Gift extends Model //获取礼物类型 public function get_gift_label($type,$no_label = []) { + if($type == 2) {//打赏 不需要热度卡 + $no_label = [1013]; + } $giftType = []; //礼物 $giftTypeData = db::name('vs_gift_label') @@ -33,12 +36,12 @@ class Gift extends Model $giftType[$key]['name'] = $value['name']; $giftType[$key]['sort'] = $value['sort']; } - if($type == 2) {//打赏 不需要热度卡 - //增加房间热度卡 - if (!in_array(1013, $no_label)) { - $giftType[] = ['id' => 1013, 'name' => '房间热度卡', 'sort' => 0]; - } + + //增加房间热度卡 + if (!in_array(1013, $no_label)) { + $giftType[] = ['id' => 1013, 'name' => '房间热度卡', 'sort' => 0]; } + //排序 1013排到最前面去 usort($giftType, function($a, $b) { return $a['sort'] <=> $b['sort'];