巡乐会抽奖接口提交.-礼物列表修改
This commit is contained in:
@@ -39,13 +39,13 @@ class Gift extends Model
|
||||
$gift_price = get_system_config_value('room_love_auction_cion');
|
||||
$where['gift_price'] = ['>',$gift_price];
|
||||
}
|
||||
$is_open_blind_box_turntable = 0;
|
||||
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')->where($map)->where($where)->order('sort asc, gift_price asc')->select();
|
||||
|
||||
if($label==2){
|
||||
$is_open_blind_box_turntable = 0;
|
||||
if($room_id){
|
||||
$is_open_blind_box_turntable = Db::name('vs_room')->where(['id'=>$room_id])->value('is_open_blind_box_turntable');
|
||||
}
|
||||
$list_data = [];
|
||||
foreach ($list as &$v) {
|
||||
//获取盲盒列表
|
||||
$box_list = Db::name('vs_gift_bag')->where(['status'=>1])->where(['activities_id'=>["in",[4,5]]])->select();
|
||||
@@ -60,8 +60,17 @@ class Gift extends Model
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
foreach ($list as $k=>$v) {
|
||||
if($is_open_blind_box_turntable == 1){
|
||||
$list_data[] = $v;
|
||||
}else{
|
||||
if(isset($v['activities_id']) && $v['activities_id'] == 4){
|
||||
$list_data[] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$list = $list_data;
|
||||
}
|
||||
return ['code' => 1, 'msg' => '获取成功', 'data' => $list];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user