|
@@ -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();
|
|
|
-
|
|
|
|
|
|
$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'] : '',
|
|
|
-
|
|
|
];
|
|
|
|
|
|
$userinfo = array_merge($userinfo,$new_data);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
$userinfo['tag'] = Db::name('enum_tag')->where('id','IN',$this->tag_ids)->field(['id','name'])->select();
|
|
|
-
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $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['unread_message_num'] = Db::name('message')->where(['user_id'=>$this->id,'status'=>0])->count('id');
|
|
|
|