房间热度卡开发-礼物列表调整
This commit is contained in:
@@ -52,14 +52,6 @@ class Gift extends Model
|
||||
//拉取礼物列表
|
||||
public function get_gift_list($label = 0,$room_id = 0,$user_id = 0)
|
||||
{
|
||||
$is_lock = 0;
|
||||
if ($label == 13) { // 专属礼物
|
||||
$Nobility = model('api/Nobility')->getUserNobilityInfo($user_id);
|
||||
$power_list_ids = array_column($Nobility['power_list'],'id');
|
||||
if(!in_array(5,$power_list_ids)){
|
||||
$is_lock = 1;
|
||||
}
|
||||
}
|
||||
if($label == 1013){//房间热度卡
|
||||
$list = db::name('vs_user_decorate')
|
||||
->field('a.udid,a.num,b.title,b.base_image,b.price,b.ext_value')
|
||||
@@ -85,6 +77,16 @@ class Gift extends Model
|
||||
}
|
||||
return ['code' => 1, 'msg' => '获取成功', 'data' => $return_data];
|
||||
}
|
||||
//其他礼物类型
|
||||
|
||||
$is_lock = 0;
|
||||
if ($label == 13) { // 专属礼物
|
||||
$Nobility = model('api/Nobility')->getUserNobilityInfo($user_id);
|
||||
$power_list_ids = array_column($Nobility['power_list'],'id');
|
||||
if(!in_array(5,$power_list_ids)){
|
||||
$is_lock = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//先从缓存获取
|
||||
if($is_lock){
|
||||
@@ -103,17 +105,21 @@ class Gift extends Model
|
||||
if ($label && $label != 99) {
|
||||
$map['label'] = $label;
|
||||
}
|
||||
if ($label == 99) {
|
||||
if ($label == 99) { // 拍卖卡关系选择的礼物
|
||||
$gift_price = get_system_config_value('room_love_auction_cion');
|
||||
$where['gift_price'] = ['>',$gift_price];
|
||||
// $where['label'] = ['<>',2];
|
||||
$where['label'] = ['in',[1,5]];
|
||||
}
|
||||
if ($label == 100) {// 哥单礼物
|
||||
$gift_price = get_system_config_value('singer_lowest_cion');//歌单最低价格
|
||||
$where['gift_price'] = ['>',$gift_price];
|
||||
$where['label'] = ['in',[1,5]];
|
||||
}
|
||||
if($label == 0){// 其他普通礼物
|
||||
$where['label'] = ['in',[1,5]];
|
||||
}
|
||||
|
||||
$is_open_blind_box_turntable = 1;
|
||||
// if($room_id){
|
||||
// $is_open_blind_box_turntable = Db::name('vs_room')->where(['id'=>$room_id])->value('is_open_blind_box_turntable');
|
||||
// }
|
||||
$list = $this->field('gid as gift_id,gift_name,base_image,gift_price,icon')->where($map)->where($where)->order('sort desc, gift_price asc')->select();
|
||||
if($label==2){
|
||||
$list_data = [];
|
||||
|
||||
Reference in New Issue
Block a user