苹果登录按钮替换成系统的登录按钮,移除发布声音秀修改声音
This commit is contained in:
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@property (nonatomic , copy) NSString * avatar;
|
@property (nonatomic , copy) NSString * avatar;
|
||||||
/// mew avatar
|
/// mew avatar
|
||||||
//@property (nonatomic , copy) NSString * newAvatar;
|
//@property (nonatomic , copy) NSString * newAvatar;
|
||||||
@property (nonatomic , assign) GenderType gender;
|
@property (nonatomic , assign) MewGenderType gender;
|
||||||
@property (nonatomic , assign) NSInteger uid;
|
@property (nonatomic , assign) NSInteger uid;
|
||||||
@property (nonatomic , assign) NSInteger platformRole;
|
@property (nonatomic , assign) NSInteger platformRole;
|
||||||
@property (nonatomic , assign) BOOL isBindPasswd;
|
@property (nonatomic , assign) BOOL isBindPasswd;
|
||||||
|
@@ -7,26 +7,19 @@
|
|||||||
|
|
||||||
#ifndef MewEnum_h
|
#ifndef MewEnum_h
|
||||||
#define MewEnum_h
|
#define MewEnum_h
|
||||||
typedef NS_ENUM(NSUInteger, ThirdLoginType) {
|
|
||||||
ThirdLoginType_WeChat = 1,///微信
|
typedef NS_ENUM(NSInteger, MewGenderType) {
|
||||||
ThirdLoginType_QQ = 2,///QQ
|
MewGenderType_Male = 1,///男性
|
||||||
ThirdLoginType_Apple = 5,///苹果登录
|
MewGenderType_Female = 2,///女性
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef NS_ENUM(NSInteger, GenderType) {
|
/// @param type 类型 业务类型,必填,1注册,2登录,3重设密码,4绑定手机,7解绑手机
|
||||||
GenderType_Male = 1,///男性
|
typedef NS_ENUM(NSUInteger, MewGetSmsType) {
|
||||||
GenderType_Female = 2,///女性
|
MewGetSmsType_Regist = 1,///注册
|
||||||
};
|
MewGetSmsType_Login = 2,///登录
|
||||||
|
MewGetSmsType_Reset_Password = 3,///重设密码
|
||||||
/// @param type 类型 业务类型,必填,1注册,2登录,3重设密码,4绑定手机,5绑定xczAccount,6重设xcz密码,7解绑手机
|
MewGetSmsType_Bind_Phone = 4, ///绑定手机
|
||||||
typedef NS_ENUM(NSUInteger, GetSmsType) {
|
MewGetSmsType_Unbind_Phone = 7, ///解绑手机
|
||||||
GetSmsType_Regist = 1,///注册
|
|
||||||
GetSmsType_Login = 2,///登录
|
|
||||||
GetSmsType_Reset_Password = 3,///重设密码
|
|
||||||
GetSmsType_Bind_Phone = 4, ///绑定手机
|
|
||||||
GetSmsType_Bind_ZF = 5,
|
|
||||||
GetSmsType_Reset_ZF = 6,///重设支付密码
|
|
||||||
GetSmsType_Unbind_Phone = 7, ///解绑手机
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MewEnum_h */
|
#endif /* MewEnum_h */
|
||||||
|
@@ -163,7 +163,7 @@
|
|||||||
self.voiceString = @"这个人很懒还没有签名";
|
self.voiceString = @"这个人很懒还没有签名";
|
||||||
}
|
}
|
||||||
|
|
||||||
[self.presenter mewPublishVoiceShowDura:[NSString stringWithFormat:@"%ld",self.duration] desc:self.voiceString gender:self.selfMineModel.gender == GenderType_Male ? @"1" : @"2" url:fileUrl];
|
[self.presenter mewPublishVoiceShowDura:[NSString stringWithFormat:@"%ld",self.duration] desc:self.voiceString gender:self.selfMineModel.gender == MewGenderType_Male ? @"1" : @"2" url:fileUrl];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -36,14 +36,6 @@ typedef enum : NSUInteger {
|
|||||||
/// 关闭
|
/// 关闭
|
||||||
@property (nonatomic, strong) UIButton *closeButton;
|
@property (nonatomic, strong) UIButton *closeButton;
|
||||||
|
|
||||||
/// 变声
|
|
||||||
//变声标题
|
|
||||||
@property (nonatomic, strong) UILabel *voiceTitleLabel;
|
|
||||||
@property (nonatomic, strong) UIView *voiceView;
|
|
||||||
@property (nonatomic, strong) NSMutableArray<UIButton *> *voiceButtonArrays;
|
|
||||||
@property (nonatomic, strong) NSArray<NSString *> *voiceTitleArrays;
|
|
||||||
@property (nonatomic, strong) NSArray<NSString *> *voiceImageArrays;
|
|
||||||
|
|
||||||
/// 声音操作
|
/// 声音操作
|
||||||
//长按
|
//长按
|
||||||
@property (nonatomic, strong) UIView *longTapView;
|
@property (nonatomic, strong) UIView *longTapView;
|
||||||
@@ -119,49 +111,21 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
|
|||||||
{
|
{
|
||||||
self = [super initWithFrame:frame];
|
self = [super initWithFrame:frame];
|
||||||
if (self) {
|
if (self) {
|
||||||
|
|
||||||
// self.recordVoiceState = RecordVoiceState_Record_Normal;
|
|
||||||
self.backgroundColor = UIColorMewRGBAlpha(0x000000, 0.5);
|
self.backgroundColor = UIColorMewRGBAlpha(0x000000, 0.5);
|
||||||
self.voiceButtonArrays = [NSMutableArray array];
|
|
||||||
self.voiceTitleArrays = @[@"无效果", @"恐怖", @"成熟", @"萝莉"];
|
|
||||||
self.voiceImageArrays = @[@"mew_home_change_voice_defalut",@"mew_home_change_voice_horror",@"mew_home_change_voice_mature",@"mew_home_change_voice_girl"];
|
|
||||||
[self mew_initView];
|
[self mew_initView];
|
||||||
[self mew_initLayout];
|
[self mew_initLayout];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark - NSNotificationCenter
|
|
||||||
// 键盘弹出
|
|
||||||
- (void)keyboardWillShow:(NSNotification *)notification {
|
|
||||||
NSDictionary *dict = [notification userInfo];
|
|
||||||
NSValue *value = [dict objectForKey:UIKeyboardFrameEndUserInfoKey];
|
|
||||||
CGFloat height = [value CGRectValue].size.height;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 键盘隐藏
|
|
||||||
- (void)keyboardWillHide:(NSNotification *)notification {
|
|
||||||
NSDictionary *dict = [notification userInfo];
|
|
||||||
NSValue *value = [dict objectForKey:UIKeyboardFrameBeginUserInfoKey];
|
|
||||||
CGFloat height = [value CGRectValue].size.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - Action Event
|
#pragma mark - Action Event
|
||||||
- (void)closeButtonAction {
|
- (void)closeButtonAction {
|
||||||
[MewPushExclusiveVoiceView removeExclusiveViewFromSuperView];
|
[MewPushExclusiveVoiceView removeExclusiveViewFromSuperView];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 选中变声
|
|
||||||
- (void)muteVoiceTapGesture:(UITapGestureRecognizer *)tap {
|
|
||||||
// NSLog(@"选中变声");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// 长按录制
|
/// 长按录制
|
||||||
- (void)longRecordTapGesutre:(UITapGestureRecognizer *)longTap {
|
- (void)longRecordTapGesutre:(UITapGestureRecognizer *)longTap {
|
||||||
if (self.recordVoiceState == RecordVoiceState_Record_End || self.recordVoiceState == RecordVoiceState_Record_Start) return;
|
if (self.recordVoiceState == RecordVoiceState_Record_End || self.recordVoiceState == RecordVoiceState_Record_Start) return;
|
||||||
@@ -226,20 +190,11 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
|
|||||||
[self.delegate mewPushExclusiveVoice:self.totalFilePath voiceIntroString:self.textView.text dura:self.duration];
|
[self.delegate mewPushExclusiveVoice:self.totalFilePath voiceIntroString:self.textView.text dura:self.duration];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSLog(@"发布录制声音");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 变声的背景图片点击事件
|
|
||||||
- (void)muteButtonAction:(UIButton *)sender {
|
|
||||||
for (UIButton *button in self.voiceButtonArrays) {
|
|
||||||
button.selected = NO;
|
|
||||||
}
|
|
||||||
sender.selected = YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - UITextViewDelegate
|
#pragma mark - UITextViewDelegate
|
||||||
- (void)textViewDidChange:(UITextView *)textView {
|
- (void)textViewDidChange:(UITextView *)textView {
|
||||||
NSLog(@"当前textview。text:%@",textView.text);
|
|
||||||
if (textView.text.length == 0 || [textView.text isEqualToString:@""]) {
|
if (textView.text.length == 0 || [textView.text isEqualToString:@""]) {
|
||||||
self.placeholdLabel.hidden = NO;
|
self.placeholdLabel.hidden = NO;
|
||||||
} else {
|
} else {
|
||||||
@@ -419,10 +374,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
|
|||||||
[self addSubview:self.whiteBgView];
|
[self addSubview:self.whiteBgView];
|
||||||
[self.whiteBgView addSubview:self.titleLabel];
|
[self.whiteBgView addSubview:self.titleLabel];
|
||||||
[self.whiteBgView addSubview:self.closeButton];
|
[self.whiteBgView addSubview:self.closeButton];
|
||||||
/// 变声
|
|
||||||
[self.whiteBgView addSubview:self.voiceTitleLabel];
|
|
||||||
[self.whiteBgView addSubview:self.voiceView];
|
|
||||||
[self initWithMuteVoice];
|
|
||||||
/// 声音操作
|
/// 声音操作
|
||||||
[self.whiteBgView addSubview:self.longTapView];
|
[self.whiteBgView addSubview:self.longTapView];
|
||||||
[self.longTapView addSubview:self.longTapTitleLabel];
|
[self.longTapView addSubview:self.longTapTitleLabel];
|
||||||
@@ -453,23 +405,12 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
|
|||||||
make.centerY.equalTo(self.titleLabel);
|
make.centerY.equalTo(self.titleLabel);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
/// 变声
|
|
||||||
[self.voiceTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.top.equalTo(self.titleLabel.mas_bottom).offset(20);
|
|
||||||
make.left.equalTo(self.whiteBgView).offset(10);
|
|
||||||
}];
|
|
||||||
[self.voiceView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.top.equalTo(self.voiceTitleLabel.mas_bottom).offset(12.0);
|
|
||||||
make.left.equalTo(self.voiceTitleLabel);
|
|
||||||
make.right.equalTo(self.whiteBgView).offset(-10);
|
|
||||||
}];
|
|
||||||
|
|
||||||
|
|
||||||
/// 声音操作
|
/// 声音操作
|
||||||
[self.longTapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.longTapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.centerX.equalTo(self.whiteBgView);
|
make.centerX.equalTo(self.whiteBgView);
|
||||||
make.width.height.mas_equalTo(68);
|
make.width.height.mas_equalTo(68);
|
||||||
make.top.equalTo(self.voiceView.mas_bottom).offset(16);
|
make.top.equalTo(self.titleLabel.mas_bottom).offset(16);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[self.longTapTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.longTapTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -523,47 +464,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)initWithMuteVoice {
|
|
||||||
/// 创建变声view
|
|
||||||
for (int i = 0; i < self.voiceTitleArrays.count; i++) {
|
|
||||||
CGFloat imageWidth = 60;
|
|
||||||
CGFloat marginX = (KScreenWidth - 48 - 20.0 - 4 * imageWidth)/5;
|
|
||||||
UIButton *muteButton = [[UIButton alloc] init];
|
|
||||||
muteButton.backgroundColor = [MewThemeColor mewColorWithHexString:@"#444F75"];
|
|
||||||
[muteButton setImage:[UIImage imageNamed:@"mew_home_change_voice_bg"] forState:UIControlStateSelected];
|
|
||||||
[muteButton setImage:[UIImage imageNamed:@"mew_home_change_voice_nomarl"] forState:UIControlStateNormal];
|
|
||||||
muteButton.layer.cornerRadius = 8;
|
|
||||||
muteButton.layer.masksToBounds = YES;
|
|
||||||
muteButton.selected = i == 0 ? YES : NO;
|
|
||||||
[muteButton addTarget:self action:@selector(muteButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
|
||||||
[self.voiceButtonArrays addObject:muteButton];
|
|
||||||
[self.voiceView addSubview:muteButton];
|
|
||||||
[muteButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.top.equalTo(self.voiceView);
|
|
||||||
make.width.height.mas_equalTo(imageWidth);
|
|
||||||
make.left.mas_equalTo(i * (imageWidth + marginX) + marginX);
|
|
||||||
}];
|
|
||||||
|
|
||||||
UIImageView *muteImageView = [[UIImageView alloc] init];
|
|
||||||
muteImageView.image = [UIImage imageNamed:self.voiceImageArrays[i]];
|
|
||||||
[self.voiceView addSubview:muteImageView];
|
|
||||||
[muteImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.center.equalTo(muteButton);
|
|
||||||
}];
|
|
||||||
|
|
||||||
UILabel *muteLabel = [[UILabel alloc] init];
|
|
||||||
muteLabel.text = self.voiceTitleArrays[i];
|
|
||||||
muteLabel.font = kFontRegular(12);
|
|
||||||
muteLabel.textColor = [MewThemeColor mewColorWithHexString:@"#F0F0F0"];
|
|
||||||
[self.voiceView addSubview:muteLabel];
|
|
||||||
[muteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.top.equalTo(muteImageView.mas_bottom).offset(5.0);
|
|
||||||
make.centerX.equalTo(muteImageView);
|
|
||||||
make.height.mas_equalTo(12);
|
|
||||||
make.bottom.equalTo(self.voiceView);
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - Get
|
#pragma mark - Get
|
||||||
- (void)setRecordVoiceState:(RecordVoiceState)recordVoiceState {
|
- (void)setRecordVoiceState:(RecordVoiceState)recordVoiceState {
|
||||||
@@ -610,24 +511,6 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
|
|||||||
return _closeButton;
|
return _closeButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 变声
|
|
||||||
- (UILabel *)voiceTitleLabel {
|
|
||||||
if (!_voiceTitleLabel) {
|
|
||||||
_voiceTitleLabel = [[UILabel alloc] init];
|
|
||||||
_voiceTitleLabel.text = @"设置变声更有趣";
|
|
||||||
_voiceTitleLabel.font = kFontMedium(14);
|
|
||||||
_voiceTitleLabel.textColor = UIColor.whiteColor;
|
|
||||||
}
|
|
||||||
return _voiceTitleLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (UIView *)voiceView {
|
|
||||||
if (!_voiceView) {
|
|
||||||
_voiceView = [[UIView alloc] init];
|
|
||||||
|
|
||||||
}
|
|
||||||
return _voiceView;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 声音操作
|
/// 声音操作
|
||||||
- (UIView *)longTapView {
|
- (UIView *)longTapView {
|
||||||
|
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@interface MewRightFollowVoiceCollectionCell : UICollectionViewCell
|
@interface MewRightFollowVoiceCollectionCell : UICollectionViewCell
|
||||||
@property (nonatomic, copy) NSString *avater;
|
@property (nonatomic, copy) NSString *avater;
|
||||||
@property (nonatomic, copy) NSString *nick;
|
@property (nonatomic, copy) NSString *nick;
|
||||||
@property (nonatomic, assign) GenderType sex;
|
@property (nonatomic, assign) MewGenderType sex;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -42,9 +42,9 @@
|
|||||||
self.nickNameLabel.text =_nick;
|
self.nickNameLabel.text =_nick;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setSex:(GenderType)sex {
|
- (void)setSex:(MewGenderType)sex {
|
||||||
_sex = sex;
|
_sex = sex;
|
||||||
self.sexImageView.image = [UIImage imageNamed: _sex == GenderType_Male ? @"common_male" : @"common_female"];
|
self.sexImageView.image = [UIImage imageNamed: _sex == MewGenderType_Male ? @"common_male" : @"common_female"];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Init View
|
#pragma mark - Init View
|
||||||
|
@@ -100,7 +100,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
|
|||||||
if (_userIntroductionView == nil) return;
|
if (_userIntroductionView == nil) return;
|
||||||
_userIntroductionView.currentUserInfo = userInfo;
|
_userIntroductionView.currentUserInfo = userInfo;
|
||||||
_userIntroductionView.nickNameLabel.text = userInfo.nick;
|
_userIntroductionView.nickNameLabel.text = userInfo.nick;
|
||||||
_userIntroductionView.sexImageView.image = [UIImage imageNamed:userInfo.gender == GenderType_Male ? @"mew_home_user_man" : @"mew_home_user_woman"];
|
_userIntroductionView.sexImageView.image = [UIImage imageNamed:userInfo.gender == MewGenderType_Male ? @"mew_home_user_man" : @"mew_home_user_woman"];
|
||||||
_userIntroductionView.iconImageView.imageUrl = userInfo.avatar;
|
_userIntroductionView.iconImageView.imageUrl = userInfo.avatar;
|
||||||
|
|
||||||
// 用户的个性签名
|
// 用户的个性签名
|
||||||
|
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// 获取手机的验证码
|
/// 获取手机的验证码
|
||||||
/// @param phone 手机号
|
/// @param phone 手机号
|
||||||
/// @param type 类型
|
/// @param type 类型
|
||||||
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
|
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type;
|
||||||
|
|
||||||
/// 没有登录的时候 重置密码
|
/// 没有登录的时候 重置密码
|
||||||
/// @param phone 手机号
|
/// @param phone 手机号
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
/// 获取手机的验证码
|
/// 获取手机的验证码
|
||||||
/// @param phone 手机号
|
/// @param phone 手机号
|
||||||
/// @param type 类型
|
/// @param type 类型
|
||||||
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
|
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type {
|
||||||
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
||||||
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(id _Nonnull data) {
|
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(id _Nonnull data) {
|
||||||
[[self mew_getView] mew_phoneSmsCodeSuccess];
|
[[self mew_getView] mew_phoneSmsCodeSuccess];
|
||||||
|
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// 获取手机的验证码
|
/// 获取手机的验证码
|
||||||
/// @param phone 手机号
|
/// @param phone 手机号
|
||||||
/// @param type 类型
|
/// @param type 类型
|
||||||
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
|
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type;
|
||||||
|
|
||||||
/// 校验手机验证码接口
|
/// 校验手机验证码接口
|
||||||
/// @param moblieNum 手机号码
|
/// @param moblieNum 手机号码
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
/// 获取手机的验证码
|
/// 获取手机的验证码
|
||||||
/// @param phone 手机号
|
/// @param phone 手机号
|
||||||
/// @param type 类型
|
/// @param type 类型
|
||||||
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
|
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type {
|
||||||
NSString * typeStr = [NSString stringWithFormat:@"%lu", (unsigned long)type];
|
NSString * typeStr = [NSString stringWithFormat:@"%lu", (unsigned long)type];
|
||||||
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
||||||
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) {
|
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) {
|
||||||
|
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// 获取手机的验证码
|
/// 获取手机的验证码
|
||||||
/// @param phone 手机号
|
/// @param phone 手机号
|
||||||
/// @param type 类型
|
/// @param type 类型
|
||||||
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
|
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type;
|
||||||
|
|
||||||
/// 使用手机号和验证码登录
|
/// 使用手机号和验证码登录
|
||||||
/// @param phone 手机号
|
/// @param phone 手机号
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
/// 获取手机的验证码
|
/// 获取手机的验证码
|
||||||
/// @param phone 手机号
|
/// @param phone 手机号
|
||||||
/// @param type 类型
|
/// @param type 类型
|
||||||
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
|
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type {
|
||||||
NSString *desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
NSString *desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
||||||
|
|
||||||
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) {
|
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) {
|
||||||
|
@@ -50,7 +50,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)viewDidAppear:(BOOL)animated {
|
- (void)viewDidAppear:(BOOL)animated {
|
||||||
[self mew_showErrorToast:@"第三方登录需绑定手机号喔~"];
|
// [self mew_showErrorToast:@"第三方登录需绑定手机号喔~"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)mew_setUpUI {
|
- (void)mew_setUpUI {
|
||||||
|
@@ -100,7 +100,7 @@
|
|||||||
if (self.phoneView.textField.text.length != 11) {
|
if (self.phoneView.textField.text.length != 11) {
|
||||||
[self mew_showErrorToast:@"请输入正确的手机号码"];
|
[self mew_showErrorToast:@"请输入正确的手机号码"];
|
||||||
} else {
|
} else {
|
||||||
[self.presenter mew_phoneSmsCode:self.phoneView.textField.text type:GetSmsType_Reset_Password];
|
[self.presenter mew_phoneSmsCode:self.phoneView.textField.text type:MewGetSmsType_Reset_Password];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -203,7 +203,7 @@
|
|||||||
}
|
}
|
||||||
}] subscribeNext:^(id _Nullable x) {
|
}] subscribeNext:^(id _Nullable x) {
|
||||||
@strongify(self);
|
@strongify(self);
|
||||||
[self.presenter mew_phoneSmsCode:self.phoneNumTextField.text type:self.bindingPhoneNumType == MewBindingPhoneNumTypeConfirm ? GetSmsType_Unbind_Phone : GetSmsType_Bind_Phone];
|
[self.presenter mew_phoneSmsCode:self.phoneNumTextField.text type:self.bindingPhoneNumType == MewBindingPhoneNumTypeConfirm ? MewGetSmsType_Unbind_Phone : MewGetSmsType_Bind_Phone];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
|
@@ -35,16 +35,8 @@
|
|||||||
|
|
||||||
|
|
||||||
UIKIT_EXTERN NSString * const kYinyouPrivateKey;
|
UIKIT_EXTERN NSString * const kYinyouPrivateKey;
|
||||||
NSString * const kPhoneQuickPrivacyKey = @"PhoneQuickPrivacyKey";
|
|
||||||
NSString * const kHadAgreePrivacy = @"HadAgreePrivacy";
|
NSString * const kHadAgreePrivacy = @"HadAgreePrivacy";
|
||||||
|
|
||||||
typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|
||||||
XYLoginTypeUnknow = 0, //未知
|
|
||||||
XYLoginTypeTelecom = 1, //电信
|
|
||||||
XYLoginTypeChinaMobile = 2, //移动
|
|
||||||
XYLoginTypeUnicom = 3 //联通
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
@interface MewLoginViewController ()<ASAuthorizationControllerDelegate,ASAuthorizationControllerPresentationContextProviding>
|
@interface MewLoginViewController ()<ASAuthorizationControllerDelegate,ASAuthorizationControllerPresentationContextProviding>
|
||||||
@property (nonatomic, strong) UIView *contentView;
|
@property (nonatomic, strong) UIView *contentView;
|
||||||
@@ -53,7 +45,10 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
|
|
||||||
//@property (nonatomic, strong) UIStackView *stackView;
|
//@property (nonatomic, strong) UIStackView *stackView;
|
||||||
/// 苹果
|
/// 苹果
|
||||||
@property (nonatomic, strong) MewButton *appleButtonView;
|
//@property (nonatomic, strong) MewButton *appleButtonView;
|
||||||
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
|
||||||
|
@property (nonatomic, strong) ASAuthorizationAppleIDButton *appleButton;
|
||||||
|
#endif
|
||||||
|
|
||||||
/** 同意勾选按钮*/
|
/** 同意勾选按钮*/
|
||||||
@property (nonatomic, strong) UIButton *agreeButton;
|
@property (nonatomic, strong) UIButton *agreeButton;
|
||||||
@@ -114,13 +109,12 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
[self.view addSubview:self.leftLineView];
|
[self.view addSubview:self.leftLineView];
|
||||||
[self.view addSubview:self.rightLineView];
|
[self.view addSubview:self.rightLineView];
|
||||||
[self.view addSubview:self.otherLoginTitleLabel];
|
[self.view addSubview:self.otherLoginTitleLabel];
|
||||||
[self.view addSubview:self.appleButtonView];
|
[self.view addSubview:self.appleButton];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)mew_setUpConstraints {
|
- (void)mew_setUpConstraints {
|
||||||
CGFloat kscale = 363.0 / 375.0;
|
|
||||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.edges.equalTo(self.view);
|
make.edges.equalTo(self.view);
|
||||||
}];
|
}];
|
||||||
@@ -153,21 +147,14 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
|
[self.appleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
// [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
// make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 60);
|
|
||||||
// make.centerX.mas_equalTo(self.view);
|
|
||||||
// make.height.mas_equalTo(75);
|
|
||||||
// }];
|
|
||||||
|
|
||||||
[self.appleButtonView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 60);
|
make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 60);
|
||||||
make.centerX.mas_equalTo(self.view);
|
make.centerX.mas_equalTo(self.view);
|
||||||
make.height.mas_equalTo(75);
|
make.width.height.mas_equalTo(40);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[self.agreeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.agreeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.top.mas_equalTo(self.appleButtonView.mas_bottom).offset(20);
|
make.top.mas_equalTo(self.appleButton.mas_bottom).offset(20);
|
||||||
make.height.mas_equalTo(40);
|
make.height.mas_equalTo(40);
|
||||||
make.width.mas_equalTo(220);
|
make.width.mas_equalTo(220);
|
||||||
make.centerX.mas_equalTo(self.view).mas_offset(15 - 6);
|
make.centerX.mas_equalTo(self.view).mas_offset(15 - 6);
|
||||||
@@ -192,7 +179,7 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
[self.otherLoginTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.otherLoginTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.bottom.equalTo(self.appleButtonView.mas_top).offset(-32);
|
make.bottom.equalTo(self.appleButton.mas_top).offset(-32);
|
||||||
make.centerX.equalTo(self.view);
|
make.centerX.equalTo(self.view);
|
||||||
}];
|
}];
|
||||||
[self.leftLineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.leftLineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -216,19 +203,15 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
self.leftLineView.hidden = NO;
|
self.leftLineView.hidden = NO;
|
||||||
self.rightLineView.hidden = NO;
|
self.rightLineView.hidden = NO;
|
||||||
self.otherLoginTitleLabel.hidden = NO;
|
self.otherLoginTitleLabel.hidden = NO;
|
||||||
self.appleButtonView.hidden = NO;
|
self.appleButton.hidden = NO;
|
||||||
} else {
|
} else {
|
||||||
self.leftLineView.hidden = YES;
|
self.leftLineView.hidden = YES;
|
||||||
self.rightLineView.hidden = YES;
|
self.rightLineView.hidden = YES;
|
||||||
self.otherLoginTitleLabel.hidden = YES;
|
self.otherLoginTitleLabel.hidden = YES;
|
||||||
self.appleButtonView.hidden = YES;
|
self.appleButton.hidden = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#pragma mark - MewLoginProtocol
|
#pragma mark - MewLoginProtocol
|
||||||
- (void)mew_loginSuccess {
|
- (void)mew_loginSuccess {
|
||||||
[self dismissViewControllerAnimated:YES completion:nil];
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
@@ -272,7 +255,6 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *)) {
|
||||||
// 基于用户的Apple ID授权用户,生成用户授权请求的一种机制
|
// 基于用户的Apple ID授权用户,生成用户授权请求的一种机制
|
||||||
ASAuthorizationAppleIDProvider * appleIDProvider = [[ASAuthorizationAppleIDProvider alloc] init];
|
ASAuthorizationAppleIDProvider * appleIDProvider = [[ASAuthorizationAppleIDProvider alloc] init];
|
||||||
@@ -304,16 +286,6 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 手机 || 密码登录 || Apple
|
|
||||||
//- (void)didClickRecognizer:(UITapGestureRecognizer *)tap {
|
|
||||||
// if (!self.agreeButton.isSelected) {
|
|
||||||
// [MewHUDTool showErrorWithMessage:@"请勾选协议"];
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// MewLoginNumberViewController *controller = [[MewLoginNumberViewController alloc] init];
|
|
||||||
// [self.navigationController pushViewController:controller animated:NO];
|
|
||||||
//}
|
|
||||||
|
|
||||||
#pragma mark - ASAuthorizationControllerDelegate
|
#pragma mark - ASAuthorizationControllerDelegate
|
||||||
// 授权成功
|
// 授权成功
|
||||||
@@ -363,7 +335,7 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
// 用户登录使用现有的密码凭证
|
// 用户登录使用现有的密码凭证
|
||||||
ASPasswordCredential * passwordCredential = (ASPasswordCredential *)authorization.credential;
|
ASPasswordCredential * passwordCredential = (ASPasswordCredential *)authorization.credential;
|
||||||
// 密码凭证对象的用户标识 用户的唯一标识
|
// 密码凭证对象的用户标识 用户的唯一标识
|
||||||
NSString * user = passwordCredential.user;
|
// NSString * user = passwordCredential.user;
|
||||||
|
|
||||||
//把用户的唯一标识 传给后台 判断该用户是否绑定手机号,如果绑定了直接登录,如果没绑定跳绑定手机号页面
|
//把用户的唯一标识 传给后台 判断该用户是否绑定手机号,如果绑定了直接登录,如果没绑定跳绑定手机号页面
|
||||||
|
|
||||||
@@ -419,9 +391,6 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
[MewThemeColor mewColorWithHexString:@"##8974FF"],
|
[MewThemeColor mewColorWithHexString:@"##8974FF"],
|
||||||
[MewThemeColor mewColorWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 80, 52)];
|
[MewThemeColor mewColorWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 80, 52)];
|
||||||
_loginButton.backgroundColor = [UIColor colorWithPatternImage:bgImage];
|
_loginButton.backgroundColor = [UIColor colorWithPatternImage:bgImage];
|
||||||
// [_loginButton setTitleColor:ThemeColor.mewMainTextColor forState:UIControlStateNormal];
|
|
||||||
// UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewConfirmButtonGradientStartColor],[MewThemeColor mewConfirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 52 * 2, 45)];
|
|
||||||
// [_loginButton setBackgroundImage:image forState:UIControlStateNormal];
|
|
||||||
[_loginButton addTarget:self action:@selector(mew_loginButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
[_loginButton addTarget:self action:@selector(mew_loginButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
}
|
}
|
||||||
return _loginButton;
|
return _loginButton;
|
||||||
@@ -433,7 +402,6 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
[_agreeButton setImage:[UIImage imageNamed:@"mew_login_agree_normal"] forState:UIControlStateNormal];
|
[_agreeButton setImage:[UIImage imageNamed:@"mew_login_agree_normal"] forState:UIControlStateNormal];
|
||||||
[_agreeButton setImage:[UIImage imageNamed:@"mew_login_agree_sel"] forState:UIControlStateSelected];
|
[_agreeButton setImage:[UIImage imageNamed:@"mew_login_agree_sel"] forState:UIControlStateSelected];
|
||||||
[_agreeButton addTarget:self action:@selector(mew_agreeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
[_agreeButton addTarget:self action:@selector(mew_agreeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
// _agreeButton.backgroundColor = UIColor.blueColor;
|
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
NSString *hadAgree = [defaults objectForKey:kHadAgreePrivacy];
|
NSString *hadAgree = [defaults objectForKey:kHadAgreePrivacy];
|
||||||
if (hadAgree.length > 0) {
|
if (hadAgree.length > 0) {
|
||||||
@@ -474,12 +442,11 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
NSString *protocolString = @"《隐私政策》";
|
NSString *protocolString = @"《隐私政策》";
|
||||||
NSMutableAttributedString *privateString = [[NSMutableAttributedString alloc] initWithString:protocolString attributes:@{NSForegroundColorAttributeName:UIColor.whiteColor}];
|
NSMutableAttributedString *privateString = [[NSMutableAttributedString alloc] initWithString:protocolString attributes:@{NSForegroundColorAttributeName:UIColor.whiteColor}];
|
||||||
[privateString yy_setTextHighlightRange:NSMakeRange(0, privateString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
[privateString yy_setTextHighlightRange:NSMakeRange(0, privateString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||||
// @strongify(self);
|
|
||||||
__strong typeof(self) strongSelf = weakSelf;
|
__strong typeof(self) strongSelf = weakSelf;
|
||||||
// 跳转隐私政策
|
// 跳转隐私政策
|
||||||
MewWebViewController * webVC = [[MewWebViewController alloc] init];
|
MewWebViewController * webVC = [[MewWebViewController alloc] init];
|
||||||
webVC.url = URLWithType(kPrivacyURL);
|
webVC.url = URLWithType(kPrivacyURL);
|
||||||
[self.navigationController pushViewController:webVC animated:YES];
|
[strongSelf.navigationController pushViewController:webVC animated:YES];
|
||||||
} longPressAction:nil];
|
} longPressAction:nil];
|
||||||
[attString appendAttributedString:userAttString];
|
[attString appendAttributedString:userAttString];
|
||||||
[attString appendAttributedString:andString];
|
[attString appendAttributedString:andString];
|
||||||
@@ -513,45 +480,21 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
|||||||
return _contentView;
|
return _contentView;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- (UIStackView *)stackView {
|
|
||||||
// if (!_stackView) {
|
|
||||||
// _stackView = [[UIStackView alloc] init];
|
|
||||||
// _stackView.distribution = UIStackViewDistributionEqualSpacing;
|
|
||||||
// _stackView.spacing = 32;
|
|
||||||
// _stackView.axis = UILayoutConstraintAxisHorizontal;
|
|
||||||
// _stackView.alignment = UIStackViewAlignmentFill;
|
|
||||||
// }
|
|
||||||
// return _stackView;
|
|
||||||
//}
|
|
||||||
|
|
||||||
- (MewButton *)appleButtonView { //手机号登录
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
|
||||||
if (!_appleButtonView) {
|
- (ASAuthorizationAppleIDButton *)appleButton API_AVAILABLE(ios(13.0)){ //苹果登录
|
||||||
_appleButtonView = [[MewButton alloc] initWithImagePosition:MewButtonImagePositionTop];
|
if (!_appleButton) {
|
||||||
[_appleButtonView setImage: [UIImage imageNamed:@"mew_login_apple"] forState:UIControlStateNormal];
|
if (@available(iOS 13.0, *)) {
|
||||||
[_appleButtonView setTitle:@"苹果登录" forState:UIControlStateNormal];
|
_appleButton = [[ASAuthorizationAppleIDButton alloc] initWithAuthorizationButtonType:ASAuthorizationAppleIDButtonTypeContinue authorizationButtonStyle:ASAuthorizationAppleIDButtonStyleWhite];
|
||||||
[_appleButtonView setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
|
}
|
||||||
_appleButtonView.titleLabel.font = kFontRegular(12);
|
|
||||||
_appleButtonView.imageTitleSpace = 5.0;
|
|
||||||
[_appleButtonView addTarget:self action:@selector(mew_loginWithApple) forControlEvents:UIControlEventTouchUpInside];
|
_appleButton.cornerRadius = 20;
|
||||||
|
[_appleButton addTarget:self action:@selector(mew_loginWithApple) forControlEvents:UIControlEventTouchUpInside];
|
||||||
}
|
}
|
||||||
return _appleButtonView;
|
return _appleButton;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
//#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
|
|
||||||
//- (ASAuthorizationAppleIDButton *)appleButton API_AVAILABLE(ios(13.0)){ //苹果登录
|
|
||||||
// if (!_appleButton) {
|
|
||||||
// if (@available(iOS 13.0, *)) {
|
|
||||||
// _appleButton = [[ASAuthorizationAppleIDButton alloc] initWithAuthorizationButtonType:ASAuthorizationAppleIDButtonTypeSignIn authorizationButtonStyle:ASAuthorizationAppleIDButtonStyleWhite];
|
|
||||||
// } else {
|
|
||||||
// // Fallback on earlier versions
|
|
||||||
// }
|
|
||||||
// _appleButton.cornerRadius = 25;
|
|
||||||
// _appleButton.tag = 1000 + ThirdLoginType_Apple;
|
|
||||||
//// _appleButton.hidden = NO;
|
|
||||||
// }
|
|
||||||
// return _appleButton;
|
|
||||||
//}
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
- (UIImageView *)bgImageView {
|
- (UIImageView *)bgImageView {
|
||||||
if (!_bgImageView) {
|
if (!_bgImageView) {
|
||||||
|
@@ -96,7 +96,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[self.present mew_phoneSmsCode:self.phone type:GetSmsType_Regist];
|
[self.present mew_phoneSmsCode:self.phone type:MewGetSmsType_Regist];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)textFieldDidChange:(UITextField *)text {
|
- (void)textFieldDidChange:(UITextField *)text {
|
||||||
|
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
///uid
|
///uid
|
||||||
@property (nonatomic,copy) NSString *uid;
|
@property (nonatomic,copy) NSString *uid;
|
||||||
///性别
|
///性别
|
||||||
@property (nonatomic,assign) GenderType gender;
|
@property (nonatomic,assign) MewGenderType gender;
|
||||||
///类型
|
///类型
|
||||||
@property (nonatomic,assign) NSInteger defUser;
|
@property (nonatomic,assign) NSInteger defUser;
|
||||||
///魅力等级
|
///魅力等级
|
||||||
|
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
///头像
|
///头像
|
||||||
@property (nonatomic, copy) NSString *avatar;
|
@property (nonatomic, copy) NSString *avatar;
|
||||||
///性别
|
///性别
|
||||||
@property (nonatomic,assign) GenderType gender;
|
@property (nonatomic,assign) MewGenderType gender;
|
||||||
///姓名
|
///姓名
|
||||||
@property (nonatomic,copy) NSString *nick;
|
@property (nonatomic,copy) NSString *nick;
|
||||||
///用户的uid
|
///用户的uid
|
||||||
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
///tag的图片
|
///tag的图片
|
||||||
@property (nonatomic,copy) NSString *tagPict;
|
@property (nonatomic,copy) NSString *tagPict;
|
||||||
///性别
|
///性别
|
||||||
@property (nonatomic,assign) GenderType gender;
|
@property (nonatomic,assign) MewGenderType gender;
|
||||||
///房主的昵称
|
///房主的昵称
|
||||||
@property (nonatomic,copy) NSString *nick;
|
@property (nonatomic,copy) NSString *nick;
|
||||||
///房间的id
|
///房间的id
|
||||||
|
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@interface MewMessageRemoteExtModel : NSObject
|
@interface MewMessageRemoteExtModel : NSObject
|
||||||
@property (nonatomic,assign) NSInteger erbanNo;
|
@property (nonatomic,assign) NSInteger erbanNo;
|
||||||
///性别
|
///性别
|
||||||
@property (nonatomic, assign) GenderType gender;
|
@property (nonatomic, assign) MewGenderType gender;
|
||||||
///贵族icon
|
///贵族icon
|
||||||
@property (nonatomic, copy) NSString *vipIcon;
|
@property (nonatomic, copy) NSString *vipIcon;
|
||||||
///账号的类型
|
///账号的类型
|
||||||
|
@@ -104,7 +104,7 @@
|
|||||||
|
|
||||||
if(userInfo) {
|
if(userInfo) {
|
||||||
self.avatarImageView.imageUrl = userInfo.avatar;
|
self.avatarImageView.imageUrl = userInfo.avatar;
|
||||||
[self.postionLabel setBackgroundColor:userInfo.gender == GenderType_Male ? UIColorMewFromRGB(0x3EBBFE) : UIColorMewFromRGB(0xFF5E83)];
|
[self.postionLabel setBackgroundColor:userInfo.gender == MewGenderType_Male ? UIColorMewFromRGB(0x3EBBFE) : UIColorMewFromRGB(0xFF5E83)];
|
||||||
|
|
||||||
self.nickLabel.text = userInfo.nick.length > 5 ? [NSString stringWithFormat:@"%@…",[userInfo.nick substringToIndex:5]] : userInfo.nick;
|
self.nickLabel.text = userInfo.nick.length > 5 ? [NSString stringWithFormat:@"%@…",[userInfo.nick substringToIndex:5]] : userInfo.nick;
|
||||||
self.nickLabel.textColor = userInfo.micNickColor.length > 0 ? [MewThemeColor mewColorWithHexString: userInfo.micNickColor] : UIColorMewFromRGB(0xFFFFFF);
|
self.nickLabel.textColor = userInfo.micNickColor.length > 0 ? [MewThemeColor mewColorWithHexString: userInfo.micNickColor] : UIColorMewFromRGB(0xFFFFFF);
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
if (self.microModel.microState.position == -1) {
|
if (self.microModel.microState.position == -1) {
|
||||||
self.sexImageView.hidden = NO;
|
self.sexImageView.hidden = NO;
|
||||||
self.postionLabel.hidden = YES;
|
self.postionLabel.hidden = YES;
|
||||||
self.sexImageView.image = [UIImage imageNamed: userInfo.gender == GenderType_Male ? @"common_male" : @"common_female"];
|
self.sexImageView.image = [UIImage imageNamed: userInfo.gender == MewGenderType_Male ? @"common_male" : @"common_female"];
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface MewMicroExtModel : NSObject
|
@interface MewMicroExtModel : NSObject
|
||||||
///
|
///
|
||||||
@property (nonatomic,assign) GenderType gender;
|
@property (nonatomic,assign) MewGenderType gender;
|
||||||
///
|
///
|
||||||
@property (nonatomic,copy) NSString *avatar;
|
@property (nonatomic,copy) NSString *avatar;
|
||||||
///
|
///
|
||||||
|
Reference in New Issue
Block a user