你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
搜索问题、话题或人...
输入关键字进行搜索
搜索:
问题
精选文章
开源项目
视频教程
活动
· · ·
帮助
登录
注册
环信移动客服
环信_管理后台
环信_WebIM
环信_RestAPI
环信_iOS
ios 集成环信红包,弹出红包界面,怎么把手机号变成昵称??
集成环信红包,弹出红包界面,怎么把手机号变成昵称?跪求各位大神
没有找到相关结果
已邀请:
与内容相关的链接
提交
2 个回复
[已注销]
// 要在此处根据userID获得用户昵称,和头像地址
- (RedpacketUserInfo *)profileEntityWith:(NSString *)userId
{
RedpacketUserInfo *userInfo = [RedpacketUserInfo new];
UserProfileEntity *profile = [[UserProfileManager sharedInstance] getUserProfileByUsername:userId];
if (profile) {
if (profile.nickname && profile.nickname.length > 0) {
userInfo.userNickname = profile.nickname;
} else {
userInfo.userNickname = userId;
}
} else {
userInfo.userNickname = userId;
}
userInfo.userAvatar = profile.imageUrl;
userInfo.userId = userId;
return userInfo;
}
在代码中将昵称换成自己服务器的昵称即可
xzw
这个方法不是你得传过来个userId么,那要怎么将自己的换成自己服务器的昵称??能不能说的再详细点,非常感谢。
要回复问题请先
登录
或
注册
发起人
xzw
问题状态
最新活动:
2016-11-02 09:58
浏览:
3939
关注:
2
人
2 个回复
[已注销]
- (RedpacketUserInfo *)profileEntityWith:(NSString *)userId
{
RedpacketUserInfo *userInfo = [RedpacketUserInfo new];
UserProfileEntity *profile = [[UserProfileManager sharedInstance] getUserProfileByUsername:userId];
if (profile) {
if (profile.nickname && profile.nickname.length > 0) {
userInfo.userNickname = profile.nickname;
} else {
userInfo.userNickname = userId;
}
} else {
userInfo.userNickname = userId;
}
userInfo.userAvatar = profile.imageUrl;
userInfo.userId = userId;
return userInfo;
}
在代码中将昵称换成自己服务器的昵称即可
xzw