|
@@ -30,7 +30,7 @@ class Auth
|
|
|
protected $allowFields = ['id', 'u_id', 'username', 'nickname', 'mobile', 'pre_userid', 'has_info', 'is_auth',
|
|
|
'is_guild', 'guild_id', 'avatar', 'image', 'gender', 'age_id',
|
|
|
'wealth_level','charm_level',
|
|
|
- 'job_id', 'longitude', 'latitude','province_id','city_id'
|
|
|
+ 'job_id', 'longitude', 'latitude','province_id','city_id','desc','is_cool','openid'
|
|
|
];
|
|
|
|
|
|
public function __construct($options = [])
|
|
@@ -543,41 +543,29 @@ class Auth
|
|
|
$userinfo["userheader"] = $userheader;
|
|
|
|
|
|
//
|
|
|
- $userField = 'id,openid,is_cool,nickname,avatar,age_id,province_id,city_id,desc';
|
|
|
+ $userField = 'id';
|
|
|
$user = model('User')->field($userField)->where(["id" => $this->_user->id])->with(['useralipay','userbank','userauth'])->find();
|
|
|
|
|
|
|
|
|
|
|
|
$userInfoA = model('User')->getAppendData($userinfo);
|
|
|
- $userInfo['age_text'] = $userInfoA['age_text'];
|
|
|
-// $userInfo['constellation_text'] = $userInfoA['constellation_text'];
|
|
|
- $userInfo['province_text'] = $userInfoA['province_text'];
|
|
|
- $userInfo['city_text'] = $userInfoA['city_text'];
|
|
|
- $userInfo['job_text'] = $userInfoA['job_text'];
|
|
|
- $userInfo['friends_num'] = $userInfoA['friends_num'];
|
|
|
- $userInfo['look_num'] = $userInfoA['look_num'];
|
|
|
+ $userinfo['age_text'] = $userInfoA['age_text'];
|
|
|
+ $userinfo['province_text'] = $userInfoA['province_text'];
|
|
|
+ $userinfo['city_text'] = $userInfoA['city_text'];
|
|
|
+ $userinfo['job_text'] = $userInfoA['job_text'];
|
|
|
+ $userinfo['friends_num'] = $userInfoA['friends_num'];
|
|
|
+ $userinfo['look_num'] = $userInfoA['look_num'];
|
|
|
// 是否设置密码
|
|
|
$userinfo['is_setpwd'] = $data['password'] ? 1 : 0;
|
|
|
|
|
|
//
|
|
|
- $field = 'id,age_id,province_id,city_id,desc';
|
|
|
- $fieldArr = explode(',',$field);
|
|
|
- $fieldTextArr = ['age_text','constellation_text','province_text','city_text','friends_num','look_num'];
|
|
|
- $fieldArr = array_merge($fieldArr,$fieldTextArr);
|
|
|
- //$userData = model('User')->field($field)->with(['userauth'])->where(['id'=>$this->_user->id])->find();
|
|
|
- foreach ($fieldArr as $key => $value) {
|
|
|
- $userinfo[$value] = isset($user[$value]) ? $user[$value] : '';
|
|
|
- }
|
|
|
-
|
|
|
- //
|
|
|
$userAlipay = isset($user['useralipay']) ? $user['useralipay'] : [];
|
|
|
$userBank = isset($user['userbank']) ? $user['userbank'] : [];
|
|
|
$userinfo['realname'] = isset($user['userauth']['realname']) ? $user['userauth']['realname'] : '';
|
|
|
$userinfo['idcard'] = isset($user['userauth']['idcard']) ? $user['userauth']['idcard'] : '';
|
|
|
- $userinfo['bind_wechat'] = !empty($user['openid']) ? 1 : 0;
|
|
|
+ $userinfo['bind_wechat'] = !empty($userinfo['openid']) ? 1 : 0;
|
|
|
$userinfo['bind_alipay'] = !empty($userAlipay) ? 1 : 0;
|
|
|
$userinfo['bind_bank'] = !empty($userBank) ? 1 : 0;
|
|
|
- $userinfo['is_cool'] = isset($user['is_cool']) ? $user['is_cool'] : 0;
|
|
|
|
|
|
//公会信息
|
|
|
$guildField = 'g.id,g.g_id,g.user_id,g.party_id,g.name,g.image,g.desc,g.member,g.status';
|