diff --git a/application/common/model/Redpacket.php b/application/common/model/Redpacket.php index fab77c2..e4044a2 100644 --- a/application/common/model/Redpacket.php +++ b/application/common/model/Redpacket.php @@ -128,13 +128,18 @@ class Redpacket extends Model $data['redpacket_id'] = $redpacketId; $data['start_time'] = $startTime;//红包开抢时间 $data['redpacket_time'] = get_system_config_value('red_packet_time');//展示时间 + $data['room_name'] = Db::name('vs_room')->where('id', $data['room_id'])->value('room_name'); $text = [ 'redpacketInfo' => $data, 'text' => '' ]; model('api/Chat')->sendMsg(1060,$data['room_id'],$text); $push = new Push(UID, $data['room_id']); - $push->redpacketArrive($data); + $texts = [ + 'room_id' => $data['room_id'], + 'text' => $data['nickname'].'在'.$data['room_name'].'房间发了一个红包!' + ]; + $push->redpacketArrive($texts); return ['code' => 1, 'msg' => '发红包成功', 'data' => $redpacketId];