撩他礼物推送
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user