拍卖模式下 同意上麦 过滤
This commit is contained in:
@@ -534,6 +534,20 @@ class RoomPit extends Model
|
||||
model('Chat')->sendMsg(1034,$room_id,$text);
|
||||
return ['code' => 1, 'msg' => '上麦成功', 'data' => null];
|
||||
}elseif($apply_type == 3){
|
||||
if(count($to_user) >= 2){
|
||||
return ['code' => 0, 'msg' => '拍卖模式下只能一个人上麦', 'data' => null];
|
||||
}
|
||||
//拍卖房当前到哪一步了
|
||||
$step = db::name('vs_room_auction')->where(['room_id' => $room_id])->order('auction_id desc')->value('status');
|
||||
if($step == 2){
|
||||
return ['code' => 0, 'msg' => '拍卖已经开始', 'data' => null];
|
||||
}
|
||||
//拍卖位上有人吗
|
||||
$paimai_user = Cache::get('auction_user_'.$room_id);
|
||||
if($paimai_user){
|
||||
//有人就让他下麦
|
||||
return ['code' => 0, 'msg' => '拍卖位上已有人,请先抱对方下麦', 'data' => null];
|
||||
}
|
||||
$i = 0;
|
||||
foreach ($to_user as &$value) {
|
||||
$i++;
|
||||
|
||||
Reference in New Issue
Block a user