diff --git a/application/api/model/Friend.php b/application/api/model/Friend.php index 7f3c2e6..1fd3e5d 100644 --- a/application/api/model/Friend.php +++ b/application/api/model/Friend.php @@ -160,6 +160,10 @@ class Friend extends Model //创建小房间 $room_ids = model('api/Room')->user_create_room($user1,'的电影房',get_system_config_value('web_site').'/data/avatar/head_pic.png','交友房产生的一次性房间',7); if($room_ids['code'] != 1){ + //推送给前端消息 + $text['text'] = '交友结束'; + $text['step'] = 1;//1 等待邂逅 2 心动连线 3 牵手良缘 + model('api/Chat')->sendMsg(1049,$room_id,$text); return ['code' => 0, 'msg' => 'cp电影房创建失败,请联系管理员','data' => null]; } @@ -220,6 +224,10 @@ class Friend extends Model model('api/Chat')->sendMsg(1049,$room_id,$text); return ['code' => 1, 'msg' => '创建关系成功', 'data' => null]; } else { + //推送给前端消息 + $text['text'] = '交友结束'; + $text['step'] = 1;//1 等待邂逅 2 心动连线 3 牵手良缘 + model('api/Chat')->sendMsg(1049,$room_id,$text); return ['code' => 0, 'msg' => '创建关系失败!', 'data' => null]; } }