From fef69f064017edbaa1629ed8204b354b2e63bf62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 6 Jan 2026 18:54:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=A9=E4=BB=96=E7=A4=BC=E7=89=A9=E6=8E=A8?= =?UTF-8?q?=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/SendGift.php | 74 +++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/application/api/model/SendGift.php b/application/api/model/SendGift.php index 0a4a0bd8..8cbdaa73 100644 --- a/application/api/model/SendGift.php +++ b/application/api/model/SendGift.php @@ -432,16 +432,30 @@ class SendGift extends Model } } }else{ - $text = $FromUserInfo['nickname'] . ' 送给 ' . $ToUserInfo['nickname'].' 礼物 ' .$gift_info['gift_name'].' x ' .$num; - $text = [ - 'FromUserInfo' => $FromUserInfo, - 'ToUserInfo' => $ToUserInfo, - 'GiftInfo' => $gift_info, - 'gift_num' => $num, - 'text' => $text - ]; - //聊天室推送系统消息 - model('Chat')->sendMsg(1005,$room_id,$text); + if($gift_info['label'] == 17){ + $text = $FromUserInfo['nickname'] . ' 送给 ' . $ToUserInfo['nickname'].' 礼物 ' .$gift_info['gift_name'].' x ' .$num; + $texts = [ + 'FromUserInfo' => $FromUserInfo, + 'ToUserInfos' => [$ToUserInfo], + 'GiftInfo' => $gift_info, + 'gift_num' => $num, + 'text' => $text + ]; + //聊天室推送系统消息 + model('Chat')->sendMsg(1200, $room_id, $texts); + }else{ + $text = $FromUserInfo['nickname'] . ' 送给 ' . $ToUserInfo['nickname'].' 礼物 ' .$gift_info['gift_name'].' x ' .$num; + $text = [ + 'FromUserInfo' => $FromUserInfo, + 'ToUserInfo' => $ToUserInfo, + 'GiftInfo' => $gift_info, + 'gift_num' => $num, + 'text' => $text + ]; + //聊天室推送系统消息 + model('Chat')->sendMsg(1005,$room_id,$text); + } + if($room_type == 6){ //推送消息 $hot_value = db::name('vs_room')->where('id', $room_id)->value('hot_value'); @@ -567,6 +581,8 @@ class SendGift extends Model $gift_box = [];//开出的盲盒 $room_hotvalue = 0;//房间热度(所有收礼人的礼物总值) $gift_user_data = [];//收礼人收礼金币总和,交友和参与拍卖使用; + $label_text = '';//酒吧房撩TA的信息 + $ToUserInfos = [];//酒吧房被撩用户集合 foreach ($to_array as $k => $to_uid){ $gift_user_data[]['user_id'] = $to_uid; @@ -841,17 +857,21 @@ class SendGift extends Model } } }else{ - $text = $FromUserInfo['nickname'] . ' 送给 ' . $ToUserInfo['nickname'].' 礼物 ' .$gift_info['gift_name'].' x ' .$num; - $text = [ - 'FromUserInfo' => $FromUserInfo, - 'ToUserInfo' => $ToUserInfo, - 'GiftInfo' => $gift_info, - 'gift_num' => $num, - 'text' => $text - ]; - //聊天室推送系统消息 - model('Chat')->sendMsg(1005,$room_id,$text); - + if($gift_info['label'] == 17) { + $label_text .= $FromUserInfo['nickname'] . ' 送给 ' . $ToUserInfo['nickname'] . ' 礼物 ' . $gift_info['gift_name'] . ' x ' . $num . '/'; + $ToUserInfos[] = $ToUserInfo; + }else{ + $text = $FromUserInfo['nickname'] . ' 送给 ' . $ToUserInfo['nickname'] . ' 礼物 ' . $gift_info['gift_name'] . ' x ' . $num; + $text = [ + 'FromUserInfo' => $FromUserInfo, + 'ToUserInfo' => $ToUserInfo, + 'GiftInfo' => $gift_info, + 'gift_num' => $num, + 'text' => $text + ]; + //聊天室推送系统消息 + model('Chat')->sendMsg(1005, $room_id, $text); + } if($gift_info['is_public_server'] == 1){ //推送礼物横幅 $push = new Push($uid, $room_id); @@ -872,6 +892,18 @@ class SendGift extends Model } } + if($gift_info['label'] == 17) { + $label_text = rtrim($label_text, '/'); + $texts = [ + 'FromUserInfo' => $FromUserInfo, + 'ToUserInfos' => $ToUserInfos, + 'GiftInfo' => $gift_info, + 'gift_num' => $num, + 'text' => $label_text + ]; + //聊天室推送系统消息 + model('Chat')->sendMsg(1200, $room_id, $texts); + } //增加房间火热值hot_value $gift_totalaa = $room_hotvalue * get_system_config_value('coin_charm_exp'); db::name('vs_room')->where(['id' => $room_id])->inc('hot_value', $gift_totalaa)->inc('today_hot_value', $gift_totalaa)->update();