Compare commits
1 Commits
hotfix/1.0
...
feature/1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
abe6d19aaa |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "login_agree@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "login_agree@3x.png",
|
||||
"filename" : "组 546@3x-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 656 B |
BIN
YuMi/Assets.xcassets/Login/login_agree.imageset/组 546@3x-2.png
vendored
Normal file
After Width: | Height: | Size: 1.8 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "login_disagree@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "login_disagree@3x.png",
|
||||
"filename" : "组 546@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 461 B |
BIN
YuMi/Assets.xcassets/Login/login_disagree.imageset/组 546@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.4 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_login_choose_phone_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_login_choose_phone_icon@3x.png",
|
||||
"filename" : "路径 6@2x@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 914 B |
Before Width: | Height: | Size: 1.6 KiB |
BIN
YuMi/Assets.xcassets/Login/ms_login_choose_phone_icon.imageset/路径 6@2x@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_hoem_index_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_hoem_index_icon@3x.png",
|
||||
"filename" : "pi_app_logo_new_bg.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/Login_top_bg.imageset/pi_app_logo_new_bg.png
vendored
Normal file
After Width: | Height: | Size: 49 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_nav_search@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_nav_search@3x.png",
|
||||
"filename" : "搜索2@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 869 B |
Before Width: | Height: | Size: 1.9 KiB |
BIN
YuMi/Assets.xcassets/low/navigation/home_nav_search.imageset/搜索2@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.5 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_top_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_top_bg@3x.png",
|
||||
"filename" : "矩形 6@3x-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 103 KiB |
BIN
YuMi/Assets.xcassets/low/newhome/home_top_bg.imageset/矩形 6@3x-2.png
vendored
Normal file
After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 914 B |
Before Width: | Height: | Size: 1.6 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_top_tab_marks@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_top_tab_marks@3x.png",
|
||||
"filename" : "矩形 1979@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 224 B |
BIN
YuMi/Assets.xcassets/main/home_top_tab_marks.imageset/矩形 1979@3x.png
vendored
Normal file
After Width: | Height: | Size: 465 B |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_tabbar_vc_main_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_tabbar_vc_main_bg@3x.png",
|
||||
"filename" : "矩形 6@3x-3-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 92 KiB |
BIN
YuMi/Assets.xcassets/main/ms_tabbar_vc_main_bg.imageset/矩形 6@3x-3-2.png
vendored
Normal file
After Width: | Height: | Size: 29 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_gameHome_game_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_gameHome_game_normal@3x.png",
|
||||
"filename" : "游戏@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 956 B |
Before Width: | Height: | Size: 2.3 KiB |
BIN
YuMi/Assets.xcassets/main/tab_gameHome_game_normal.imageset/游戏@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_gameHome_game_selected@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_gameHome_game_selected@3x.png",
|
||||
"filename" : "游戏@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.0 KiB |
BIN
YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/游戏@3x.png
vendored
Normal file
After Width: | Height: | Size: 3.9 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_gameHome_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_gameHome_normal@3x.png",
|
||||
"filename" : "论坛@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 783 B |
Before Width: | Height: | Size: 1.2 KiB |
BIN
YuMi/Assets.xcassets/main/tab_gameHome_normal.imageset/论坛@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.3 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_gameHome_selected@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_gameHome_selected@3x.png",
|
||||
"filename" : "论坛@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.6 KiB |
BIN
YuMi/Assets.xcassets/main/tab_gameHome_selected.imageset/论坛@3x.png
vendored
Normal file
After Width: | Height: | Size: 3.5 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_message_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_message_normal@3x.png",
|
||||
"filename" : "消息@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 700 B |
Before Width: | Height: | Size: 1.2 KiB |
BIN
YuMi/Assets.xcassets/main/tab_message_normal.imageset/消息@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_message_selected@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_message_selected@3x.png",
|
||||
"filename" : "消息@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.5 KiB |
BIN
YuMi/Assets.xcassets/main/tab_message_selected.imageset/消息@3x.png
vendored
Normal file
After Width: | Height: | Size: 3.4 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_mine_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_mine_normal@3x.png",
|
||||
"filename" : "我的@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 773 B |
Before Width: | Height: | Size: 1.3 KiB |
BIN
YuMi/Assets.xcassets/main/tab_mine_normal.imageset/我的@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_mine_selected@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_mine_selected@3x.png",
|
||||
"filename" : "我的@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.8 KiB |
BIN
YuMi/Assets.xcassets/main/tab_mine_selected.imageset/我的@3x.png
vendored
Normal file
After Width: | Height: | Size: 3.6 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_monents_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_monents_normal@3x.png",
|
||||
"filename" : "论坛@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 1.2 KiB |
BIN
YuMi/Assets.xcassets/main/tab_monents_normal.imageset/论坛@3x.png
vendored
Normal file
After Width: | Height: | Size: 5.3 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_monents_select@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tab_monents_select@3x.png",
|
||||
"filename" : "论坛@3x-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.2 KiB |
BIN
YuMi/Assets.xcassets/main/tab_monents_select.imageset/论坛@3x-2.png
vendored
Normal file
After Width: | Height: | Size: 11 KiB |
@@ -24,7 +24,6 @@ typedef NS_ENUM(NSUInteger, Pi_KeyType) {
|
||||
KeyType_TRTC,///TRTC key
|
||||
KeyType_NetEase,///云信的key
|
||||
keyType_YiDunBussinessId,///易盾的id
|
||||
keyType_YiDunPhotoBussinessId,///易盾图片的id
|
||||
KeyType_FacePwdEncode, ///表情包解密key
|
||||
KeyType_SudGameAppID,///小游戏APPID
|
||||
KeyType_SudGameAppKey,///小游戏APPKey
|
||||
|
@@ -67,8 +67,7 @@ NSString * const KeyWithType(Pi_KeyType type) {
|
||||
@(KeyType_Agora) : @"f8713b6ec98c4c01adaf34cb4fa091b1",
|
||||
@(KeyType_TRTC) : @"1400741885",
|
||||
@(KeyType_NetEase) : @"79bc37000f4018a2a24ea9dc6ca08d32",
|
||||
// @(keyType_YiDunBussinessId) : @"3611b99d0457202a7f69151288183236",
|
||||
// @(keyType_YiDunPhotoBussinessId) : @"",
|
||||
@(keyType_YiDunBussinessId) : @"yinyouApnsDebug",
|
||||
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_SudGameAppID) : @"1578948593831571457",
|
||||
@(KeyType_SudGameAppKey) : @"J9lHOXvFWkAZiTfl4SK7IGt0wDnW3fWd",
|
||||
@@ -86,8 +85,7 @@ NSString * const KeyWithType(Pi_KeyType type) {
|
||||
@(KeyType_Agora) : @"3da88e33bc4f45019cc867ec51d7b465",///声网
|
||||
@(KeyType_SudGameAppID) : @"1578948593831571457",///小游戏
|
||||
@(KeyType_SudGameAppKey) : @"J9lHOXvFWkAZiTfl4SK7IGt0wDnW3fWd",///小游戏
|
||||
// @(keyType_YiDunBussinessId) : @"f459972b432106844b89fd58c92b8061",
|
||||
// @(keyType_YiDunPhotoBussinessId) : @"",
|
||||
@(keyType_YiDunBussinessId) : @"f459972b432106844b89fd58c92b8061",
|
||||
@(KeyType_TRTC) : @"1400823228",///
|
||||
@(KeyType_NetEase) : @"7371d729710cd6ce3a50163b956b5eb6",///
|
||||
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",///
|
||||
|
@@ -95,6 +95,8 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
///类型,0,密码,1.手机
|
||||
@property(nonatomic,assign) int loginType;
|
||||
|
||||
@property (nonatomic, strong) UIButton *feedBackButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPLoginViewController
|
||||
@@ -157,6 +159,7 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
[self.view addSubview:self.bgImageView];
|
||||
[self.view addSubview:self.logoView];
|
||||
[self.view addSubview:self.feedBackButton];
|
||||
|
||||
[self.view addSubview:self.chooseAccountBtn];
|
||||
[self.view addSubview:self.chooseSMSBtn];
|
||||
@@ -218,7 +221,8 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
|
||||
[self.chooseTypeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.logoView.mas_bottom).mas_offset(kGetScaleWidth(48));
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(24));
|
||||
make.width.mas_equalTo(kGetScaleWidth(24));
|
||||
make.height.mas_equalTo(kGetScaleWidth(14));
|
||||
make.leading.mas_equalTo(KScreenWidth/4 - kGetScaleWidth(12));
|
||||
}];
|
||||
|
||||
@@ -353,6 +357,11 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
// }];
|
||||
}
|
||||
|
||||
[self.feedBackButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-15);
|
||||
make.top.mas_equalTo(kStatusBarHeight+20);
|
||||
}];
|
||||
|
||||
}
|
||||
-(void)setSwitchingEnvironmentVC{
|
||||
UIButton *but = [UIButton new];
|
||||
@@ -361,10 +370,9 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
[self.view addSubview:but];
|
||||
[but addTarget:self action:@selector(switchingEnvironmentVCAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[but mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(30));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(30));
|
||||
make.top.mas_equalTo(kStatusBarHeight+20);
|
||||
}];
|
||||
|
||||
}
|
||||
-(void)switchingEnvironmentVCAction{
|
||||
#ifdef DEBUG
|
||||
@@ -482,6 +490,10 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
[self.navigationController pushViewController:forgetVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)didTapFeedback {
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - LoginProtocol
|
||||
- (void)loginThirdPartSuccess {
|
||||
[self.codeInputView cancelTimer];
|
||||
@@ -504,7 +516,6 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
_chooseSMSBtn.selected = _loginType != 0;
|
||||
_forgetBtn.hidden = _loginType != 0;
|
||||
|
||||
|
||||
_accountView.hidden = _loginType != 0;
|
||||
_accountPwdView.hidden = _loginType != 0;
|
||||
|
||||
@@ -740,7 +751,7 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
- (UIImageView *)bgImageView{
|
||||
if(!_bgImageView){
|
||||
_bgImageView = [[UIImageView alloc]init];
|
||||
_bgImageView.image = kImage(@"pi_app_login_new_bg");
|
||||
_bgImageView.image = kImage(@"Login_top_bg");
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _bgImageView;
|
||||
@@ -799,8 +810,8 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
if (!_loginBtn) {
|
||||
_loginBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
|
||||
UIImage *nextImage = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(303), kGetScaleWidth(48))];
|
||||
UIImage *disableImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xD1F9FF),UIColorFromRGB(0xDEE4FF),UIColorFromRGB(0xEEDCFF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(303), kGetScaleWidth(48))];
|
||||
UIImage *nextImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x57e193), UIColorFromRGB(0x14d2a6)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(303), kGetScaleWidth(48))];
|
||||
UIImage *disableImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xa5eec8), UIColorFromRGB(0xabf5e3)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(303), kGetScaleWidth(48))];
|
||||
|
||||
[_loginBtn setImage:nextImage forState:UIControlStateNormal];
|
||||
[_loginBtn setImage:disableImage forState:UIControlStateDisabled];
|
||||
@@ -825,9 +836,8 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
if(!_chooseTypeView){
|
||||
_chooseTypeView = [UIImageView new];
|
||||
_chooseTypeView.userInteractionEnabled = YES;
|
||||
_chooseTypeView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[_chooseTypeView setImage:kImage(@"ms_login_choose_phone_icon")];
|
||||
|
||||
|
||||
}
|
||||
return _chooseTypeView;
|
||||
}
|
||||
@@ -892,4 +902,17 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
return _forgetBtn;
|
||||
}
|
||||
|
||||
- (UIButton *)feedBackButton {
|
||||
if (!_feedBackButton) {
|
||||
_feedBackButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_feedBackButton setTitle:@"反馈" forState:UIControlStateNormal];
|
||||
[_feedBackButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
|
||||
_feedBackButton.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold];
|
||||
[_feedBackButton addTarget:self
|
||||
action:@selector(didTapFeedback)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _feedBackButton;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -48,7 +48,6 @@
|
||||
NIMImageOption *option = [[NIMImageOption alloc] init];
|
||||
option.compressQuality = 0.7;
|
||||
imageObject.option = option;
|
||||
|
||||
return [NIMMessageMaker generateImageMessage:imageObject];
|
||||
}
|
||||
|
||||
@@ -70,16 +69,9 @@
|
||||
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
|
||||
NSString *dateString = [dateFormatter stringFromDate:[NSDate date]];
|
||||
imageObject.displayName = [NSString stringWithFormat:@"%@%@",YMLocalizedString(@"NIMMessageMaker3"), dateString];
|
||||
|
||||
NIMMessage *message = [[NIMMessage alloc] init];
|
||||
message.messageObject = imageObject;
|
||||
message.apnsContent = YMLocalizedString(@"NIMMessageMaker4");
|
||||
|
||||
// NIMAntiSpamOption *spamOption = [[NIMAntiSpamOption alloc] init];
|
||||
// spamOption.yidunEnabled = YES;
|
||||
// spamOption.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
// message.antiSpamOption = spamOption;
|
||||
|
||||
[self setupMessage:message];
|
||||
return message;
|
||||
}
|
||||
@@ -95,10 +87,10 @@
|
||||
setting.apnsEnabled = YES;
|
||||
message.setting = setting;
|
||||
|
||||
// NIMAntiSpamOption *option = [NIMAntiSpamOption new];
|
||||
// option.yidunEnabled = YES;
|
||||
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
// message.antiSpamOption = option;
|
||||
NIMAntiSpamOption *option = [NIMAntiSpamOption new];
|
||||
option.yidunEnabled = YES;
|
||||
option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
message.antiSpamOption = option;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -27,6 +27,15 @@
|
||||
}
|
||||
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:text attributes:[self messageTextAttibutes]];
|
||||
NSRange range = [text rangeOfString:YMLocalizedString(@"MessageRiskAlertModel0")];
|
||||
if ((range.location + range.length) <= text.length) {
|
||||
[attribute addAttribute:NSForegroundColorAttributeName value:[DJDKMIMOMColor appEmphasizeColor] range:range];
|
||||
[attribute yy_setTextHighlightRange:range color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kNetworkRenovateURL);
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
||||
}];
|
||||
}
|
||||
self.isHiddenAvatar = YES;
|
||||
self.attributedText = attribute;
|
||||
CGSize dstRect = CGSizeMake(CONTENT_WIDTH_MAX - MESSAGE_PADDING * 2, MAXFLOAT);
|
||||
|
@@ -113,15 +113,23 @@
|
||||
[IQKeyboardManager sharedManager].enableAutoToolbar = NO;
|
||||
|
||||
[[NIMSDK sharedSDK].chatManager addDelegate:self];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)initHeaderAndFooterRrfresh {
|
||||
[self initData];
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark - 提前加载相册中的图片
|
||||
- (void)loadAlbumPhotos {
|
||||
[YYUtility checkAssetsLibrayAvailable:^{} denied:^{} restriction:^{}];
|
||||
[YYUtility checkAssetsLibrayAvailable:^{
|
||||
} denied:^{
|
||||
} restriction:^{
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - cell的样式
|
||||
@@ -618,34 +626,15 @@
|
||||
[self.messages addObject:model];
|
||||
}
|
||||
}
|
||||
|
||||
if (message.yidunAntiSpamRes) {
|
||||
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
|
||||
id spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
NSDictionary *antispamDic = nil;
|
||||
if ([spamResExt isKindOfClass:[NSArray class]]) {
|
||||
antispamDic = [spamResExt xpSafeObjectAtIndex:0];
|
||||
} else if ([spamResExt isKindOfClass:[NSDictionary class]]) {
|
||||
antispamDic = spamResExt[@"antispam"];
|
||||
}
|
||||
NSDictionary *realAntiDic = nil;
|
||||
if ([[antispamDic allKeys] containsObject:@"antispam"]) {
|
||||
realAntiDic = antispamDic[@"antispam"];;
|
||||
} else {
|
||||
realAntiDic = antispamDic;
|
||||
}
|
||||
if (realAntiDic) {
|
||||
NSInteger suggestion = [realAntiDic[@"suggestion"] integerValue];
|
||||
if (suggestion == 2) {
|
||||
NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
|
||||
NSDictionary * dic = @{@"suggestion": @"2"};
|
||||
message.localExt = dic;
|
||||
[[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
|
||||
|
||||
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[self.sessionTableView reloadData];
|
||||
if(self.messages.count > 0){
|
||||
NSIndexPath *ip = [NSIndexPath indexPathForRow:self.messages.count-1 inSection:0]; //取最后一行数据
|
||||
@@ -653,16 +642,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- (void)sendTextMessage:(NSString *)text {
|
||||
|
||||
NIMMessage *message = [NIMMessageMaker msgWithText:text];
|
||||
message.remoteExt = [self getRemoteExt];
|
||||
|
||||
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
|
||||
// option.yidunEnabled = YES;
|
||||
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
// message.antiSpamOption = option;
|
||||
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
|
||||
|
||||
|
||||
}
|
||||
-(NSDictionary *)getRemoteExt{
|
||||
UserInfoModel *userInfo = self.userInfo;
|
||||
@@ -694,14 +686,14 @@
|
||||
|
||||
#pragma mark - TZImagePickerControllerDelegate
|
||||
- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos {
|
||||
@kWeakify(self);
|
||||
[photos enumerateObjectsUsingBlock:^(UIImage * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
@kStrongify(self);
|
||||
if (obj) {
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:obj];
|
||||
message.remoteExt = [self getRemoteExt];
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
@@ -962,6 +954,9 @@
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
[view resetChoosePhotos];
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -984,16 +979,12 @@
|
||||
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
|
||||
UIImageWriteToSavedPhotosAlbum(selectedPhoto, nil, nil, nil);
|
||||
}
|
||||
|
||||
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
|
||||
// option.yidunEnabled = YES;
|
||||
// option.businessId = @"e9da8bd5c76da23d5e37f87e5ab1f5e9";
|
||||
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto];
|
||||
message.remoteExt = [self getRemoteExt];
|
||||
// message.antiSpamOption = option;
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
|
||||
|
||||
}
|
||||
[picker dismissViewControllerAnimated:YES completion:^{}];
|
||||
}
|
||||
|
@@ -705,43 +705,15 @@
|
||||
[self.messages addObject:model];
|
||||
}
|
||||
|
||||
// if (message.yidunAntiSpamRes) {
|
||||
// NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
|
||||
// NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
// if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
|
||||
// NSDictionary * dic = @{@"suggestion": @"2"};
|
||||
// message.localExt = dic;
|
||||
// [[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
|
||||
// }
|
||||
// }
|
||||
|
||||
if (message.yidunAntiSpamRes) {
|
||||
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
|
||||
id spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
NSDictionary *antispamDic = nil;
|
||||
if ([spamResExt isKindOfClass:[NSArray class]]) {
|
||||
antispamDic = [spamResExt xpSafeObjectAtIndex:0];
|
||||
} else if ([spamResExt isKindOfClass:[NSDictionary class]]) {
|
||||
antispamDic = spamResExt[@"antispam"];
|
||||
}
|
||||
NSDictionary *realAntiDic = nil;
|
||||
if ([[antispamDic allKeys] containsObject:@"antispam"]) {
|
||||
realAntiDic = antispamDic[@"antispam"];;
|
||||
} else {
|
||||
realAntiDic = antispamDic;
|
||||
}
|
||||
if (realAntiDic) {
|
||||
NSInteger suggestion = [realAntiDic[@"suggestion"] integerValue];
|
||||
if (suggestion == 2) {
|
||||
NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
|
||||
NSDictionary * dic = @{@"suggestion": @"2"};
|
||||
message.localExt = dic;
|
||||
[[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:self.session completion:nil];
|
||||
|
||||
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[self.sessionTableView reloadData];
|
||||
[self.sessionTableView nim_scrollToBottom:YES];
|
||||
}
|
||||
|
@@ -215,11 +215,12 @@
|
||||
_titleView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView;
|
||||
|
||||
JXCategoryIndicatorImageView *lineView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
lineView.indicatorImageViewSize = CGSizeMake(45, 10);
|
||||
lineView.verticalMargin = 10;
|
||||
lineView.indicatorImageViewSize = CGSizeMake(24, 7);
|
||||
// lineView.verticalMargin = 10;
|
||||
lineView.indicatorImageView.layer.masksToBounds = YES;
|
||||
lineView.indicatorImageView.layer.cornerRadius = 3;
|
||||
lineView.indicatorImageView.image = [UIImage imageNamed:@"mine_dynamic"];
|
||||
lineView.indicatorImageView.image = [UIImage imageNamed:@"ms_login_choose_phone_icon"];
|
||||
lineView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_titleView.indicators = @[lineView];
|
||||
}
|
||||
return _titleView;
|
||||
@@ -242,7 +243,7 @@
|
||||
-(UIImageView *)headBgImageView{
|
||||
if (!_headBgImageView){
|
||||
_headBgImageView = [UIImageView new];
|
||||
_headBgImageView.image = [UIImage imageNamed:@"ms_tabbar_vc_main_bg"];
|
||||
_headBgImageView.image = [UIImage imageNamed:@"home_top_bg"];
|
||||
}
|
||||
return _headBgImageView;
|
||||
}
|
||||
|
@@ -90,6 +90,7 @@
|
||||
}
|
||||
#pragma mark- UIPickerViewDelegate,UIPickerViewDataSource
|
||||
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
@@ -181,8 +181,6 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
setItem.skipType = XPMineItemType_My_Set;
|
||||
[self.functionArray addObject:setItem];
|
||||
|
||||
|
||||
|
||||
[self.view addSubview:self.bgImageView];
|
||||
[self.view addSubview:self.tableView];
|
||||
// [self.view addSubview:self.settingButton];
|
||||
@@ -785,7 +783,7 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
|
||||
- (UIView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ms_tabbar_vc_main_bg"]];
|
||||
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Login_top_bg"]];
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _bgImageView;
|
||||
|
@@ -43,7 +43,6 @@
|
||||
self.view.backgroundColor = [DJDKMIMOMColor colorWithHexString:@"#F3F5FA"];
|
||||
|
||||
[self setupTopTheme];
|
||||
|
||||
[self setupTopControl];
|
||||
|
||||
_pageContainer = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll
|
||||
@@ -137,11 +136,12 @@
|
||||
}];
|
||||
|
||||
_tabMarks = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"home_top_tab_marks"]];
|
||||
_tabMarks.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[_topControlView addSubview:_tabMarks];
|
||||
[_tabMarks mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-8);
|
||||
make.width.mas_equalTo(10);
|
||||
make.height.mas_equalTo(2.5);
|
||||
make.width.mas_equalTo(14);
|
||||
make.height.mas_equalTo(4);
|
||||
make.centerX.mas_equalTo(self.recommendButton.mas_centerX);
|
||||
}];
|
||||
}
|
||||
@@ -149,14 +149,14 @@
|
||||
- (void)displayMineTab {
|
||||
[_mineButton.titleLabel setFont:kFontBold(21)];
|
||||
[_recommendButton.titleLabel setFont:kFontBold(18)];
|
||||
[_mineButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[_recommendButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.6] forState:UIControlStateNormal];
|
||||
[_mineButton setTitleColor:UIColorRGBAlpha(0x0c1d18, 1) forState:UIControlStateNormal];
|
||||
[_recommendButton setTitleColor:UIColorRGBAlpha(0x0c1d18, 0.6) forState:UIControlStateNormal];
|
||||
|
||||
// [UIView animateWithDuration:0.25 animations:^{
|
||||
[self.tabMarks mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-8);
|
||||
make.width.mas_equalTo(10);
|
||||
make.height.mas_equalTo(2.5);
|
||||
make.width.mas_equalTo(14);
|
||||
make.height.mas_equalTo(4);
|
||||
make.centerX.mas_equalTo(self.mineButton.mas_centerX);
|
||||
}];
|
||||
// [self.view setNeedsLayout];
|
||||
@@ -166,14 +166,14 @@
|
||||
- (void)displayRecommendTab {
|
||||
[_mineButton.titleLabel setFont:kFontBold(18)];
|
||||
[_recommendButton.titleLabel setFont:kFontBold(21)];
|
||||
[_recommendButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[_mineButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.6] forState:UIControlStateNormal];
|
||||
[_recommendButton setTitleColor:UIColorRGBAlpha(0x0c1d18, 1) forState:UIControlStateNormal];
|
||||
[_mineButton setTitleColor:UIColorRGBAlpha(0x0c1d18, 0.6) forState:UIControlStateNormal];
|
||||
|
||||
// [UIView animateWithDuration:0.25 animations:^{
|
||||
[self.tabMarks mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-8);
|
||||
make.width.mas_equalTo(10);
|
||||
make.height.mas_equalTo(2.5);
|
||||
make.width.mas_equalTo(14);
|
||||
make.height.mas_equalTo(4);
|
||||
make.centerX.mas_equalTo(self.recommendButton.mas_centerX);
|
||||
}];
|
||||
// [self.view setNeedsLayout];
|
||||
|
@@ -519,7 +519,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
_titleView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView;
|
||||
|
||||
JXCategoryIndicatorImageView * indicator = [[JXCategoryIndicatorImageView alloc] init];
|
||||
indicator.indicatorImageView.image = [UIImage imageNamed:@"ms_hoem_index_icon"];
|
||||
indicator.indicatorImageView.image = kImage(@"ms_login_choose_phone_icon");
|
||||
indicator.indicatorImageViewSize = CGSizeMake(kGetScaleWidth(24), kGetScaleWidth(24));
|
||||
indicator.verticalMargin = -kGetScaleWidth(4);
|
||||
indicator.contentMode = UIViewContentModeScaleAspectFit;
|
||||
|
@@ -114,10 +114,10 @@
|
||||
message.remoteExt = remoteExt;
|
||||
|
||||
///网易易盾 拦截高风险
|
||||
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
|
||||
// option.yidunEnabled = YES;
|
||||
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
// message.antiSpamOption = option;
|
||||
NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
|
||||
option.yidunEnabled = YES;
|
||||
option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
message.antiSpamOption = option;
|
||||
NSString *publicChatRoomId = [NSString stringWithFormat:@"%@",[ClientConfig shareConfig].configInfo.publicChatRoomIdMap[userInfo.partitionId]];
|
||||
NSString * sessionId = [self.delegate getPublicScreenType] == 0 ? [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].roomId]:publicChatRoomId;
|
||||
//构造会话
|
||||
|
@@ -131,10 +131,10 @@
|
||||
message.remoteExt = remoteExt;
|
||||
|
||||
///网易易盾 拦截高风险
|
||||
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
|
||||
// option.yidunEnabled = YES;
|
||||
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
// message.antiSpamOption = option;
|
||||
NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
|
||||
option.yidunEnabled = YES;
|
||||
option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
message.antiSpamOption = option;
|
||||
NSString * sessionId = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].roomId];
|
||||
//构造会话
|
||||
NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
|
||||
|
@@ -73,16 +73,17 @@
|
||||
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
|
||||
|
||||
|
||||
|
||||
NIMMessage * message = [[NIMMessage alloc] init];
|
||||
message.text = self.inputMessage;
|
||||
NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[AccountInfoStorage instance].getUid];
|
||||
message.remoteExt = remoteExt;
|
||||
|
||||
///网易易盾 拦截高风险
|
||||
// NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
|
||||
// option.yidunEnabled = YES;
|
||||
// option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
// message.antiSpamOption = option;
|
||||
NIMAntiSpamOption *option = [[NIMAntiSpamOption alloc]init];
|
||||
option.yidunEnabled = YES;
|
||||
option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
message.antiSpamOption = option;
|
||||
NSString * sessionId = self.roomId;
|
||||
//构造会话
|
||||
self.sendButton.enabled = NO;
|
||||
|
@@ -252,6 +252,7 @@
|
||||
}
|
||||
self.lockRoomImageView.hidden = roomInfo.roomPwd.length <= 0;
|
||||
}
|
||||
self.topicButton.hidden = roomInfo.type == RoomType_Anchor;
|
||||
}
|
||||
|
||||
- (void)onRoomUpdate {
|
||||
@@ -266,6 +267,8 @@
|
||||
self.collectButton.hidden = NO;
|
||||
// self.collectButton.selected = roomInfo.isRoomFans; 收藏后,房间数据没有及时更新
|
||||
}
|
||||
self.lockRoomImageView.hidden = roomInfo.roomPwd.length <= 0;
|
||||
self.topicButton.hidden = roomInfo.type == RoomType_Anchor;
|
||||
}
|
||||
#pragma mark - Event Response
|
||||
- (void)showSharePanel {
|
||||
|
@@ -1915,40 +1915,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
}
|
||||
//发送消息成功回调
|
||||
- (void)sendMessage:(NIMMessage *)message didCompleteWithError:(NSError *)error {
|
||||
|
||||
// 非本房间不处理
|
||||
if (message.yidunAntiSpamRes) {
|
||||
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
|
||||
id spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
NSDictionary *antispamDic = nil;
|
||||
if ([spamResExt isKindOfClass:[NSArray class]]) {
|
||||
antispamDic = [spamResExt xpSafeObjectAtIndex:0];
|
||||
} else if ([spamResExt isKindOfClass:[NSDictionary class]]) {
|
||||
antispamDic = spamResExt[@"antispam"];
|
||||
}
|
||||
NSDictionary *realAntiDic = nil;
|
||||
if ([[antispamDic allKeys] containsObject:@"antispam"]) {
|
||||
realAntiDic = antispamDic[@"antispam"];;
|
||||
} else {
|
||||
realAntiDic = antispamDic;
|
||||
}
|
||||
if (realAntiDic) {
|
||||
NSInteger suggestion = [realAntiDic[@"suggestion"] integerValue];
|
||||
if (suggestion == 2) {
|
||||
// NSDictionary * dic = @{@"suggestion": @"2"};
|
||||
// message.localExt = dic;
|
||||
// [[NIMSDK sharedSDK].conversationManager updateMessage:message forSession:message.session completion:nil];
|
||||
|
||||
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if (![message.session.sessionId isEqualToString:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]]) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
NSString *publicChatRoomId = [NSString stringWithFormat:@"%@",[ClientConfig shareConfig].configInfo.publicChatRoomIdMap[self.userInfo.partitionId]];
|
||||
if([message.session.sessionId isEqualToString:publicChatRoomId]){
|
||||
// 非本房间不处理
|
||||
@@ -1957,9 +1924,23 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
}else if(message.messageType == NIMMessageTypeImage){
|
||||
[self.messageContainerView handleNIMImageMessage:message];
|
||||
}
|
||||
return;;
|
||||
}
|
||||
|
||||
if (![message.session.sessionId isEqualToString:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]]) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (message.yidunAntiSpamRes) {
|
||||
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
|
||||
NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
|
||||
[self showErrorToast:YMLocalizedString(@"XPRoomViewController10")];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (error) return;
|
||||
if (message.messageType == NIMMessageTypeCustom) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
|
@@ -175,12 +175,10 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showAnchorCardKey:) name:kTabShowAnchorCardKey object:nil];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(switchLanguage:) name:@"kSwitchLanguage" object:nil];
|
||||
}
|
||||
|
||||
-(void)switchLanguage:(NSNotification *)not{
|
||||
[self initTabs:YES];
|
||||
self.selectedIndex = 4;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
@@ -188,6 +186,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
if ([XPRoomMiniManager shareManager].getRoomInfo == nil) {
|
||||
[self.roomMineView hiddenRoomMiniView];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
|
@@ -2332,7 +2332,7 @@ ineHeadView12" = "الحمل";
|
||||
"XPRoomViewController7" = "انتهى وقت البث لصاحب الغرفة";
|
||||
"XPRoomViewController8" = "تم طردك من البث المباشر";
|
||||
"XPRoomViewController9" = "تم حظرك من قبل المشرف";
|
||||
"XPRoomViewController10" = "قد تحتوي الرسالة على معلومات غير قانونية، يرجى التوقف عن إرسال معلومات مماثلة مثل ذلك!";
|
||||
"XPRoomViewController10" = "قد تحتوي الرسالة على معلومات غير ملائمة، يرجى التوقف عن إرسال مثل هذه الرسائل!";
|
||||
"XPRoomViewController11" = "سوف تخرج من الغرفة وتفقد مكانك في قائمة الانتظار، هل أنت متأكد من الخروج؟";
|
||||
"XPRoomViewController12" = "سوف تخرج من الغرفة وتفقد مكانك في قائمة الانتظار، هل أنت متأكد من الخروج؟";
|
||||
"XPRoomViewController13" = "لقد وصلت إلى الأعلى~ سوف يتم إعادتك تلقائيًا إلى الغرفة الحالية";
|
||||
|
@@ -2061,7 +2061,7 @@
|
||||
"XPRoomViewController7" = "The host has gone offline";
|
||||
"XPRoomViewController8" = "You have been kicked out of the live room by the administrator";
|
||||
"XPRoomViewController9" = "You have been blacklisted by the administrator";
|
||||
"XPRoomViewController10" = "The message may contain illegal information, please stop sending similar information like that!";
|
||||
"XPRoomViewController10" = "The message may contain inappropriate content. Please refrain from sending such messages!";
|
||||
"XPRoomViewController11" = "Exiting the room will also exit the current queue. You need to queue again when re-entering. Are you sure you want to exit the room?";
|
||||
"XPRoomViewController12" = "Exiting the room will also exit the current queue. You need to queue again when re-entering. Are you sure you want to exit the room?";
|
||||
"XPRoomViewController13" = "Reached the top~ Automatically return to the current room";
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 7.2 KiB |