...
|
...
|
@@ -72,4 +72,43 @@ trait YHMApi_App_V2_Base { |
|
|
'image_list' => $image_list
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 通过uid获取用户数据
|
|
|
* @param integer $uid
|
|
|
*
|
|
|
* return array
|
|
|
*/
|
|
|
public static function _getUserInfo($uid)
|
|
|
{
|
|
|
$baseInfo = YHMPassport_Models_Profile_Client::getByUid($uid);
|
|
|
if (empty($baseInfo))
|
|
|
{
|
|
|
return array();
|
|
|
}
|
|
|
//星级评定结果
|
|
|
$store_info = YHMStore_Models_Store_Client::getByUid($uid);
|
|
|
$star = YHMComment_Models_Comment_Client::getStarByStoreId($store_info['id']);
|
|
|
$head_ico = empty($baseInfo['head_ico']) ? YHMConfig_Image::USER_HEAD_ICO : $baseInfo['head_ico'];
|
|
|
$backgroup = empty($baseInfo['background_img']) ? YHMConfig_Image::USER_BACKGROUD_IMG : $baseInfo['background_img'];
|
|
|
$gender = empty($baseInfo['gender']) ? 0 : $baseInfo['gender'];
|
|
|
$area_code = empty($baseInfo['area_code']) ? 0 : $baseInfo['area_code'];
|
|
|
return array(
|
|
|
'uid' => $uid,
|
|
|
'nick_name' => $baseInfo['nick_name'],
|
|
|
'gender' => $gender,
|
|
|
'area_code' => $area_code,
|
|
|
'identify' => $baseInfo['identity'],
|
|
|
'head_ico' => YHMUpload_Images::template($head_ico, 'yhfair-user-head'),
|
|
|
'background_img' => YHMUpload_Images::template($backgroup, 'yhfair-user-background'),
|
|
|
'star' => $star,
|
|
|
'user_type'=> $baseInfo['user_type'],
|
|
|
'store_type' => $store_info['store_type'], //3为Master,2为潮店,1为潮人
|
|
|
'is_real_name' =>($store_info['is_real']==0)?"N":"Y",
|
|
|
'has_deposit' =>($store_info['is_bail']==0)?"N":"Y",
|
|
|
'store_id' => $store_info['id'],
|
|
|
'introduce' => $baseInfo['introduce'],
|
|
|
);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|