房间热度卡开发-调试
This commit is contained in:
@@ -21,10 +21,6 @@ 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)
|
||||
@@ -36,6 +32,14 @@ class Gift extends Model
|
||||
$giftType[$key]['id'] = $value['id'];
|
||||
$giftType[$key]['name'] = $value['name'];
|
||||
}
|
||||
//增加房间热度卡
|
||||
if(!in_array(1013,$no_label)){
|
||||
$giftType[] = ['id' => 1013, 'name' => '房间热度卡'];
|
||||
}
|
||||
//排序 1013排到最前面去
|
||||
usort($giftType, function($a, $b) {
|
||||
return $a['id'] <=> $b['id'];
|
||||
});
|
||||
return ['code' => 1, 'msg' => '获取成功', 'data' => $giftType];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user