巡乐会榜单 接口开发
This commit is contained in:
@@ -1191,7 +1191,10 @@ class BlindBoxTurntableGift extends Model
|
||||
$gift_bag_id = 13;
|
||||
$xlh_box = db::name('vs_gift_bag')->where('id',$gift_bag_id)->find();
|
||||
$xlh_ext = json_decode($xlh_box['ext'],true);
|
||||
$pan_xlh = db::name('vs_room_pan_xlh')->where(['room_id'=>$room_id])->select();
|
||||
$pan_xlh = db::name('vs_room_pan_xlh')->where(['room_id'=>$room_id])
|
||||
->order('id desc')
|
||||
->page($page,$page_size)
|
||||
->select();
|
||||
$list = [];
|
||||
foreach ($pan_xlh as $key=>$value){
|
||||
$list[$key]['periods'] = "第".$value['periods']."期";
|
||||
@@ -1200,8 +1203,8 @@ class BlindBoxTurntableGift extends Model
|
||||
}else{
|
||||
$list[$key]['nickname'] = "无";
|
||||
}
|
||||
if(!empty($value['locking_gift_id'])){
|
||||
$gift_data = db::name('vs_gift')->field('gift_name,base_image')->where(['gid'=>$value['locking_gift_id']])->find();
|
||||
if(!empty($value['gift_id'])){
|
||||
$gift_data = db::name('vs_gift')->field('gift_name,base_image')->where(['gid'=>$value['gift_id']])->find();
|
||||
$list[$key]['gift_name'] = 'x '.$value['num'].' '.$gift_data['gift_name'];
|
||||
$list[$key]['base_image'] = $gift_data['base_image']??"";
|
||||
}else{
|
||||
@@ -1209,7 +1212,7 @@ class BlindBoxTurntableGift extends Model
|
||||
$list[$key]['gift_name'] = 'x 0 '.$gift_data['gift_name'];
|
||||
$list[$key]['base_image'] = $gift_data['base_image']??"";
|
||||
}
|
||||
$list[$key]['createtime'] = date('Y-m-d H:i:s',$value['send_time']);
|
||||
$list[$key]['createtime'] = $value['send_time'] ? date('Y-m-d H:i:s',$value['send_time']) : '' ;
|
||||
}
|
||||
return [
|
||||
'code' => 1,
|
||||
|
||||
Reference in New Issue
Block a user