巡乐会加房主信息
This commit is contained in:
@@ -764,7 +764,10 @@ class BlindBoxTurntableGift extends Model
|
|||||||
* 巡乐会
|
* 巡乐会
|
||||||
*/
|
*/
|
||||||
public function xlh_gift_list($room_id){
|
public function xlh_gift_list($room_id){
|
||||||
$room_data = db::name('vs_room')->field('xlh_periods,xlh_periods_num')-> where('id',$room_id)->find();
|
$room_data = db::name('vs_room')->field('xlh_periods,xlh_periods_num,user_id')-> where('id',$room_id)->find();
|
||||||
|
if(empty($room_data)){
|
||||||
|
return ['code' => 0, 'msg' => '房间不存在!', 'data' => null];
|
||||||
|
}
|
||||||
$gift_bag_id = 13;
|
$gift_bag_id = 13;
|
||||||
$xlh_box = db::name('vs_gift_bag')->where('id',$gift_bag_id)->find();
|
$xlh_box = db::name('vs_gift_bag')->where('id',$gift_bag_id)->find();
|
||||||
$xlh_ext = json_decode($xlh_box['ext'],true);
|
$xlh_ext = json_decode($xlh_box['ext'],true);
|
||||||
@@ -781,6 +784,8 @@ class BlindBoxTurntableGift extends Model
|
|||||||
$gift_list[$key]['gift_price'] = $gift_data['gift_price'];
|
$gift_list[$key]['gift_price'] = $gift_data['gift_price'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//房主信息
|
||||||
|
$room_user = db::name('user')->where('id',$room_data['user_id'])->find();
|
||||||
//房主礼物
|
//房主礼物
|
||||||
$room_user_gift = db::name('vs_gift')->where('gid',$xlh_ext['locking_condition']['give_homeowner_gift_id'])->find();
|
$room_user_gift = db::name('vs_gift')->where('gid',$xlh_ext['locking_condition']['give_homeowner_gift_id'])->find();
|
||||||
//巡乐会主礼物
|
//巡乐会主礼物
|
||||||
@@ -829,6 +834,11 @@ class BlindBoxTurntableGift extends Model
|
|||||||
'gift_name' => $room_user_gift['gift_name'],
|
'gift_name' => $room_user_gift['gift_name'],
|
||||||
'base_image' => $room_user_gift['base_image'],
|
'base_image' => $room_user_gift['base_image'],
|
||||||
],
|
],
|
||||||
|
'homeowner_user' => [
|
||||||
|
'user_id' => $room_user['id'],
|
||||||
|
'nickname' => $room_user['nickname'],
|
||||||
|
'avatar' => $room_user['avatar'],
|
||||||
|
],
|
||||||
'locking_gift' => [
|
'locking_gift' => [
|
||||||
'gift_id' => $xlh_main_gift['gid'],
|
'gift_id' => $xlh_main_gift['gid'],
|
||||||
'gift_name' => $xlh_main_gift['gift_name'],
|
'gift_name' => $xlh_main_gift['gift_name'],
|
||||||
|
|||||||
Reference in New Issue
Block a user