|
@@ -28,10 +28,9 @@ class Auth
|
|
protected $options = [];
|
|
protected $options = [];
|
|
protected $allowFields = [
|
|
protected $allowFields = [
|
|
'id',
|
|
'id',
|
|
- 'gh_id',
|
|
|
|
'username',
|
|
'username',
|
|
'nickname',
|
|
'nickname',
|
|
- //'truename',//
|
|
|
|
|
|
+
|
|
'introcode',
|
|
'introcode',
|
|
'intro_uid',
|
|
'intro_uid',
|
|
|
|
|
|
@@ -46,7 +45,6 @@ class Auth
|
|
'bio',
|
|
'bio',
|
|
'audio_bio',
|
|
'audio_bio',
|
|
|
|
|
|
- //'alipay_account',//
|
|
|
|
'idcard_status',
|
|
'idcard_status',
|
|
'is_active',
|
|
'is_active',
|
|
|
|
|
|
@@ -64,10 +62,7 @@ class Auth
|
|
|
|
|
|
'hometown_cityid',
|
|
'hometown_cityid',
|
|
'hide_is_finishinfo',
|
|
'hide_is_finishinfo',
|
|
-// 'level',
|
|
|
|
'wechat_openid',
|
|
'wechat_openid',
|
|
-// 'wechat_account',
|
|
|
|
-// 'secretvideo_status',
|
|
|
|
|
|
|
|
'character',
|
|
'character',
|
|
'constellation',
|
|
'constellation',
|
|
@@ -78,8 +73,10 @@ class Auth
|
|
'voice_price',
|
|
'voice_price',
|
|
'video_price',
|
|
'video_price',
|
|
|
|
|
|
- 'greet_voice','is_kefu',
|
|
|
|
- 'greet_chat', 'is_recommend', 'is_cohabit', 'live', 'is_house', 'car', 'chest', 'waist'
|
|
|
|
|
|
+ 'greet_voice',
|
|
|
|
+ 'greet_chat',
|
|
|
|
+ 'is_kefu',
|
|
|
|
+ 'is_recommend', 'is_cohabit', 'live', 'is_house', 'car', 'chest', 'waist'
|
|
];
|
|
];
|
|
|
|
|
|
public function __construct($options = [])
|
|
public function __construct($options = [])
|
|
@@ -748,8 +745,6 @@ class Auth
|
|
//签到天数
|
|
//签到天数
|
|
$userinfo['sign_times'] = $check = Db::name('user_sign')->where('uid',$this->id)->order('id desc')->value('times');
|
|
$userinfo['sign_times'] = $check = Db::name('user_sign')->where('uid',$this->id)->order('id desc')->value('times');
|
|
|
|
|
|
- //附上变量解锁喜欢我列表
|
|
|
|
- $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');
|
|
$userinfo['unread_message_num'] = Db::name('message')->where(['user_id'=>$this->id,'status'=>0])->count('id');
|
|
//是否绑定微信
|
|
//是否绑定微信
|
|
@@ -757,12 +752,12 @@ class Auth
|
|
//资料完成度
|
|
//资料完成度
|
|
$userinfo['info_completion'] = 5;
|
|
$userinfo['info_completion'] = 5;
|
|
if ($userinfo['gender'] != -1) {
|
|
if ($userinfo['gender'] != -1) {
|
|
- $userinfo['info_completion'] = 10;
|
|
|
|
|
|
+ $userinfo['info_completion'] = 10; //性别加5分
|
|
}
|
|
}
|
|
$field_array = ['avatar','nickname',/*'gender',*/'birthday','constellation','bio','audio_bio','photo_images','hometown_cityid','job','education','wages','character','stature','weight','height','marital',/*'is_appointment',*/'hobby','tag'];
|
|
$field_array = ['avatar','nickname',/*'gender',*/'birthday','constellation','bio','audio_bio','photo_images','hometown_cityid','job','education','wages','character','stature','weight','height','marital',/*'is_appointment',*/'hobby','tag'];
|
|
foreach ($field_array as &$v) {
|
|
foreach ($field_array as &$v) {
|
|
if ($userinfo[$v]) {
|
|
if ($userinfo[$v]) {
|
|
- $userinfo['info_completion'] += 5;
|
|
|
|
|
|
+ $userinfo['info_completion'] += 5; //每一样加五分
|
|
}
|
|
}
|
|
}
|
|
}
|
|
unset($userinfo['wechat_openid']);
|
|
unset($userinfo['wechat_openid']);
|
|
@@ -803,9 +798,12 @@ class Auth
|
|
//动态数量
|
|
//动态数量
|
|
$userinfo['dongtai_num'] = Db::name('topic_dongtai')->where(['user_id' => $this->id, 'is_hidden' => 0, 'type' => ['in', [1, 2]], 'status' => 0, 'auit_status' => 1])->count();
|
|
$userinfo['dongtai_num'] = Db::name('topic_dongtai')->where(['user_id' => $this->id, 'is_hidden' => 0, 'type' => ['in', [1, 2]], 'status' => 0, 'auit_status' => 1])->count();
|
|
|
|
|
|
- //积分数量
|
|
|
|
|
|
+ //收益
|
|
$userinfo['money'] = model('wallet')->getWallet($this->id,'money');
|
|
$userinfo['money'] = model('wallet')->getWallet($this->id,'money');
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ //金币
|
|
|
|
+ $userinfo['gold'] = model('wallet')->getWallet($this->id,'gold');
|
|
|
|
+
|
|
return $userinfo;
|
|
return $userinfo;
|
|
}
|
|
}
|
|
|
|
|