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'];