From 76bd5de91693dbf8ee01e9a0e7765a2764059b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Fri, 23 Jan 2026 17:33:26 +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 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/application/api/model/Gift.php b/application/api/model/Gift.php index 6795e0bc..50bd2561 100644 --- a/application/api/model/Gift.php +++ b/application/api/model/Gift.php @@ -21,6 +21,11 @@ class Gift extends Model public function get_gift_label($no_label = []) { $giftType = []; + //增加房间热度卡 + if(!in_array(1013,$no_label)){ + $giftType[] = ['id' => 1013, 'name' => '房间热度卡']; + } + //礼物 $giftTypeData = db::name('vs_gift_label') ->where('delete_time',0) ->where('tid',1) @@ -31,10 +36,6 @@ class Gift extends Model $giftType[$key]['id'] = $value['id']; $giftType[$key]['name'] = $value['name']; } - //增加房间热度卡 - if(!in_array(1013,$no_label)){ - $giftType[] = ['id' => 1013, 'name' => '房间热度卡']; - } return ['code' => 1, 'msg' => '获取成功', 'data' => $giftType]; } @@ -68,7 +69,7 @@ class Gift extends Model $return_data[$k]['gift_name'] = $v['title']; $return_data[$k]['base_image'] = $v['base_image']; $return_data[$k]['gift_price'] = $v['price']; - $return_data[$k]['gift_num'] = $v['num']; + $return_data[$k]['num'] = $v['num']; } } return ['code' => 1, 'msg' => '获取成功', 'data' => $return_data];