|
@@ -146,9 +146,19 @@ class InteractionController extends Controller
|
|
if (!empty($request->input('comment_user_id'))) {
|
|
if (!empty($request->input('comment_user_id'))) {
|
|
$to_user = UserInfoModel::find($request->input('comment_user_id'));
|
|
$to_user = UserInfoModel::find($request->input('comment_user_id'));
|
|
if (!empty($to_user)){
|
|
if (!empty($to_user)){
|
|
- $data['comment_info_id'] = $request->input('comment_user_id');
|
|
|
|
|
|
+ $data['to_user_id'] = $request->input('comment_user_id');
|
|
$data['to_user_avatar'] = $to_user->avatar;
|
|
$data['to_user_avatar'] = $to_user->avatar;
|
|
$data['to_user_nickname'] = $to_user->nickname;
|
|
$data['to_user_nickname'] = $to_user->nickname;
|
|
|
|
+
|
|
|
|
+ $message = $user->nickname.'在你的互动上留言啦!点击去看看!';
|
|
|
|
+ $info = [
|
|
|
|
+ 'user_id' => $data['to_user_id'],
|
|
|
|
+ 'message' => $message,
|
|
|
|
+ ];
|
|
|
|
+ SystemInfoModel::create($info);
|
|
|
|
+
|
|
|
|
+// 长连接
|
|
|
|
+ $this->jPush($message,'',$data['to_user_id']);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -160,15 +170,7 @@ class InteractionController extends Controller
|
|
$data['is_read'] = 1;
|
|
$data['is_read'] = 1;
|
|
$ok = CommentInfoModel::create($data);
|
|
$ok = CommentInfoModel::create($data);
|
|
|
|
|
|
- $message = $user->nickname.'在你的互动上留言啦!点击去看看!';
|
|
|
|
- $info = [
|
|
|
|
- 'user_id' => $data['to_user_id'],
|
|
|
|
- 'message' => $message,
|
|
|
|
- ];
|
|
|
|
- SystemInfoModel::create($info);
|
|
|
|
|
|
|
|
-// 长连接
|
|
|
|
- $this->jPush($message,'',$data['to_user_id']);
|
|
|
|
if ($ok) {
|
|
if ($ok) {
|
|
return $this->api('');
|
|
return $this->api('');
|
|
}else{
|
|
}else{
|