|
@@ -330,17 +330,19 @@ class User extends Model
|
|
public function getAppendData(&$userInfo=[])
|
|
public function getAppendData(&$userInfo=[])
|
|
{
|
|
{
|
|
if (!empty($userInfo)) {
|
|
if (!empty($userInfo)) {
|
|
- $userId = isset($userInfo['id']) ? $userInfo['id'] : 0;
|
|
|
|
- $ageId = isset($userInfo['age_id']) ? $userInfo['age_id'] : 0;
|
|
|
|
|
|
+ $userId = isset($userInfo['id']) ? $userInfo['id'] : 0;
|
|
|
|
+ $ageId = isset($userInfo['age_id']) ? $userInfo['age_id'] : 0;
|
|
$provinceId = isset($userInfo['province_id']) ? $userInfo['province_id'] : 0;
|
|
$provinceId = isset($userInfo['province_id']) ? $userInfo['province_id'] : 0;
|
|
- $cityId = isset($userInfo['city_id']) ? $userInfo['city_id'] : 0;
|
|
|
|
|
|
+ $cityId = isset($userInfo['city_id']) ? $userInfo['city_id'] : 0;
|
|
|
|
+
|
|
$userInfo['job_text'] = $this->getJobTextAttr(false,['job_id' => $userInfo['job_id']]);
|
|
$userInfo['job_text'] = $this->getJobTextAttr(false,['job_id' => $userInfo['job_id']]);
|
|
$userInfo['age_text'] = $this->getAgeTextAttr(false,['age_id' => $ageId]);
|
|
$userInfo['age_text'] = $this->getAgeTextAttr(false,['age_id' => $ageId]);
|
|
- $areaWhere['id'] = ['in',[$provinceId,$cityId]];
|
|
|
|
|
|
|
|
|
|
+ $areaWhere['id'] = ['in',[$provinceId,$cityId]];
|
|
$areaData = Db::name('shopro_area')->where($areaWhere)->column('id,name');
|
|
$areaData = Db::name('shopro_area')->where($areaWhere)->column('id,name');
|
|
$userInfo['province_text'] = isset($areaData[$provinceId]) ? $areaData[$provinceId] : '';
|
|
$userInfo['province_text'] = isset($areaData[$provinceId]) ? $areaData[$provinceId] : '';
|
|
$userInfo['city_text'] = isset($areaData[$cityId]) ? $areaData[$cityId] : '';
|
|
$userInfo['city_text'] = isset($areaData[$cityId]) ? $areaData[$cityId] : '';
|
|
|
|
+
|
|
// $userInfo['friends_num'] = $this->getFriendsNumAttr(false,['id' => $userId]);
|
|
// $userInfo['friends_num'] = $this->getFriendsNumAttr(false,['id' => $userId]);
|
|
$userInfo['look_num'] = $this->getLookNumAttr(false,['id' => $userId]);
|
|
$userInfo['look_num'] = $this->getLookNumAttr(false,['id' => $userId]);
|
|
}
|
|
}
|