Bladeren bron

个人主页

lizhen_gitee 1 jaar geleden
bovenliggende
commit
56a9bbcdad
1 gewijzigde bestanden met toevoegingen van 9 en 15 verwijderingen
  1. 9 15
      application/common/library/Auth.php

+ 9 - 15
application/common/library/Auth.php

@@ -549,31 +549,22 @@ class Auth
         $userinfo = info_domain_image($userinfo,['avatar','photo_images']);
 
         $idcard_confirm = Db::name('user_idconfirm')->where('user_id',$this->id)->find();
-//        $secretvideo    = Db::name('user_secretvideo')->where('user_id',$this->id)->find();
 
         $new_data = [
             'setpassword'    => !empty($this->password) ? 1 : 0,
             'age'            => birthtime_to_age($this->birthday),
             'truename'       => ($this->idcard_status == 1 && isset($idcard_confirm['truename'])) ? $idcard_confirm['truename'] : '',
             'alipay_account' => ($this->idcard_status == 1 && isset($idcard_confirm['alipay_account'])) ? $idcard_confirm['alipay_account'] : '',
-//            'secretvideo'    => ($this->secretvideo_status == 1 && isset($secretvideo['secretvideo'])) ? $secretvideo['secretvideo'] : '',
         ];
 
         $userinfo = array_merge($userinfo,$new_data);
         //枚举
-//        $userinfo['education'] = Db::name('enum_education')->where('id',$this->education_id)->value('name');
-//        $userinfo['hobby'] = Db::name('enum_hobby')->where('id','IN',$this->hobby_ids)->field(['id','name'])->select();
-//        $userinfo['job'] = Db::name('enum_job')->where('id',$this->job_id)->value('name');
-//        $userinfo['marital'] = Db::name('enum_marital')->where('id',$this->marital_id)->value('name');
         $userinfo['tag'] = Db::name('enum_tag')->where('id','IN',$this->tag_ids)->field(['id','name'])->select();
-//        $userinfo['wages'] = Db::name('enum_wages')->where('id',$this->wages_id)->value('name');
 
-        //家乡
-//        $userinfo['hometown_city'] = Db::name('area')->where('id',$this->hometown_cityid)->value('name');
-
-        //vip
-        $userinfo['vip_endtime'] = Db::name('user_wallet')->where('user_id',$this->id)->value('vip_endtime');
-        $userinfo['is_vip'] = $userinfo['vip_endtime'] > time() ? 1 : 0;
+        //钱包
+        $userwallet = Db::name('user_wallet')->where('user_id',$this->id)->find();
+        $userinfo['is_vip'] = $userwallet['vip_endtime'] > time() ? 1 : 0;
+        $userifno['gold'] = $userwallet['gold'];
 
         //关注数量
         $userinfo['follow_num'] = Db::name('user_follow')->where('uid',$this->id)->count('id');
@@ -581,9 +572,12 @@ class Auth
         $userinfo['fans_num'] = Db::name('user_follow')->where('follow_uid',$this->id)->count('id');
         //签到天数
         $userinfo['sign_times'] = $check = Db::name('user_sign')->where('uid',$this->id)->order('id desc')->value('times');
+        //访客数量
+        $userinfo['visit_num'] = Db::name('user_visit')->where('to_uid',$this->id)->count('id');
+        //浏览数量
+        $userinfo['look_num'] = Db::name('user_visit')->where('uid',$this->id)->count('id');
+
 
-        //附上变量解锁喜欢我列表
-//        $userinfo['unlock_like_me'] = config('site.unlock_like_me');
         //我的未读消息数量
         $userinfo['unread_message_num'] = Db::name('message')->where(['user_id'=>$this->id,'status'=>0])->count('id');
         //是否绑定微信