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