|
@@ -74,6 +74,33 @@ class Uservisit extends Api
|
|
|
$this->success('success',$list);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ //谁看过我汇总
|
|
|
+ public function visitlist(){
|
|
|
+ $time = Db::name('user_visit_time')->where(['user_id' => $this->auth->id])->value('visittime');
|
|
|
+
|
|
|
+ $where = [];
|
|
|
+ if ($time) {
|
|
|
+ $where['updatetime'] = ['gt', $time];
|
|
|
+ }
|
|
|
+
|
|
|
+ $list = [];
|
|
|
+ $count = Db::name('user_visit')->where(['to_uid' => $this->auth->id])->where($where)->count('id');
|
|
|
+ if ($count) {
|
|
|
+ $uid_list = Db::name('user_visit')->field('uid')->where(['to_uid' => $this->auth->id])->where($where)->limit(9)->column('uid');
|
|
|
+ $mt_user = Db::name('user');
|
|
|
+ foreach ($uid_list as &$v) {
|
|
|
+ $avatar = $mt_user->where(['id' => $v])->value('avatar');
|
|
|
+ $list[] = one_domain_image($avatar);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $data['count'] = $count;
|
|
|
+ $data['list'] = $list;
|
|
|
+
|
|
|
+ $this->success('success',$data);
|
|
|
+ }
|
|
|
+
|
|
|
//查看某人
|
|
|
public function visit_one(){
|
|
|
//放到usercenter/getuserinfo里了
|