|
@@ -52,17 +52,16 @@ class Information extends Api
|
|
|
*/
|
|
|
public function eachLike(){
|
|
|
$where = [
|
|
|
- 'type'=>1,
|
|
|
'uid'=>$this->auth->id
|
|
|
];
|
|
|
- $like = Like::with('like')->where($where)->order('id','desc')->select();
|
|
|
- foreach ($like as $k=>&$v){
|
|
|
- if($v['like']==null){
|
|
|
- unset($like[$k]);
|
|
|
- }else{
|
|
|
- $v['like_user'] = User::where('id',$v['like']['uid'])->field('id,id_authentication,avatar,createtime,nickname,username')->find();
|
|
|
- }
|
|
|
- }
|
|
|
+ $like = LikeMutually::with('user')->where($where)->order('id','desc')->select();
|
|
|
+// foreach ($like as $k=>&$v){
|
|
|
+// if($v['like']==null){
|
|
|
+// unset($like[$k]);
|
|
|
+// }else{
|
|
|
+// $v['like_user'] = User::where('id',$v['like']['uid'])->field('id,id_authentication,avatar,createtime,username')->find();
|
|
|
+// }
|
|
|
+// }
|
|
|
LikeMutually::read($like);
|
|
|
$this->success('',$like);
|
|
|
}
|