|
@@ -134,7 +134,12 @@ class PostController extends Controller
|
|
|
Log::info('获取用户信息失败');
|
|
|
return jsonError('获取用户信息失败');
|
|
|
}
|
|
|
- $list = $this->postRepositories->myPost($request['type'], $userInfo['uid']);
|
|
|
+ if(isset($request['uid'])){
|
|
|
+ $uid = $request['uid'];
|
|
|
+ }else{
|
|
|
+ $uid = $userInfo['uid'];
|
|
|
+ }
|
|
|
+ $list = $this->postRepositories->myPost($request['type'], $uid);
|
|
|
$fractal = new Manager();
|
|
|
$resource = new Collection($list, new MyTransformer());
|
|
|
$resource->setPaginator(new IlluminatePaginatorAdapter($list));
|