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