|
@@ -68,7 +68,8 @@ class PostRepository
|
|
|
|
|
|
//验证小号
|
|
|
$userInfo = $this->getUserInfo($request['uid']);
|
|
|
- if(!$userInfo || !$userInfo['data'] || $userInfo['data']['type'] != 1){
|
|
|
+ Log::debug('发布内容小号信息:'.json_encode($userInfo));
|
|
|
+ if(!$userInfo || $userInfo['type'] != 1){
|
|
|
return Response::create([
|
|
|
'message' => '所选小号信息有误',
|
|
|
'status_code' => 500
|
|
@@ -95,10 +96,10 @@ class PostRepository
|
|
|
}
|
|
|
|
|
|
$data = [
|
|
|
- 'uid' => $request['uid'],
|
|
|
- 'username' => '暂无',
|
|
|
- 'mobile' => '13720758488',
|
|
|
- 'avatar' => 'https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83ep3asJn8emiat1MnPdviaPNroWY3f65y5ezkTAk2qtibv7ea9Ht9R2ahxr9bicY1DIj5vN5FibpDOwXegg/132',
|
|
|
+ 'uid' => $userInfo['uid'],
|
|
|
+ 'username' => $userInfo['username'],
|
|
|
+ 'mobile' => $userInfo['mobile'],
|
|
|
+ 'avatar' => $userInfo['avatar']??'',
|
|
|
'type' => $request['type'],
|
|
|
'img' => $request['img'],
|
|
|
'video' => $request['video'] ?? '',
|
|
@@ -340,7 +341,7 @@ class PostRepository
|
|
|
//验证小号
|
|
|
$userInfo = $this->getUserInfo($request['uid']);
|
|
|
Log::debug('评论&回复小号' . json_encode($userInfo));
|
|
|
- if (!$userInfo || !$userInfo['data'] || $userInfo['data']['type'] != 1) {
|
|
|
+ if (!$userInfo || $userInfo['type'] != 1) {
|
|
|
return Response::create([
|
|
|
'message' => '所选小号信息有误',
|
|
|
'status_code' => 500
|
|
@@ -358,10 +359,10 @@ class PostRepository
|
|
|
'uid' => $request['uid'],
|
|
|
'post_id' => $request['post_id'],
|
|
|
'parent_id' => 0,
|
|
|
- 'username' => $userInfo['data']['username'],
|
|
|
+ 'username' => $userInfo['username'],
|
|
|
'reply_uid' => 0,
|
|
|
'reply_username' => '',
|
|
|
- 'avatar' => $userInfo['data']['avatar'],
|
|
|
+ 'avatar' => $userInfo['avatar']??'',
|
|
|
'content' => $request['content'],
|
|
|
'is_delete' => 0,
|
|
|
];
|
|
@@ -420,7 +421,7 @@ class PostRepository
|
|
|
'reply_uid' => $comment->reply_uid,
|
|
|
'reply_username' => $comment->reply_username,
|
|
|
'target_id' => $comment->uid,
|
|
|
- 'action_id' => $post->id,
|
|
|
+ 'action_id' => $comment->id,
|
|
|
]);
|
|
|
}
|
|
|
return Response::create();
|