|
|
@@ -95,7 +95,7 @@ class PostRecordService extends BaseService
|
|
|
if($type>0){
|
|
|
$where['posts_records.type'] = $type;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
return $this->model->with(['user','replyUser','replys'])->from('posts_records')
|
|
|
->where($where)
|
|
|
@@ -171,7 +171,7 @@ class PostRecordService extends BaseService
|
|
|
'status'=> 1,
|
|
|
];
|
|
|
|
|
|
- if($sourceId != $this->model->insertGetId($data)){
|
|
|
+ if($cid != $this->model->insertGetId($data)){
|
|
|
$this->error = $replyId>0?'回复失败':'评论失败';
|
|
|
|
|
|
}
|
|
|
@@ -182,14 +182,15 @@ class PostRecordService extends BaseService
|
|
|
'type'=> 4,
|
|
|
'title'=>'互动消息',
|
|
|
'description'=> $replyId? "回复{$nickname}评论了您的动态评论": "用户{$nickname}评论了您的动态",
|
|
|
- 'content'=> json_encode(['source_id'=>$sourceId,'page'=>'/pagesSub/pages/posts/detail?id='.$sourceId.'&replyId='.$replyId]),
|
|
|
+ 'content'=> json_encode(['source_id'=>$sourceId,'cid'=>$cid,'page'=>'/pagesSub/pages/posts/detail?id='.$sourceId.'&replyId='.$replyId]),
|
|
|
'msg_type'=>4,
|
|
|
];
|
|
|
|
|
|
// 互动消息
|
|
|
MessageService::make()->pushMessage($postUserId, $msgData);
|
|
|
$this->error = $replyId>0?'回复成功':'评论成功';
|
|
|
- return ['id' => $sourceId];
|
|
|
+ $info = $this->model->where(['id'=> $cid])->with(['user','replyUser'])->first();
|
|
|
+ return $info;
|
|
|
}
|
|
|
|
|
|
|