From 57da001dbd1267f2deec87ca78b8673bab672232 Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Tue, 14 Mar 2023 19:46:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=83=E9=B1=BC?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E6=98=B5=E7=A7=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Appdelegate/AppDelegate+ThirdConfig.m | 3 +- .../Main/Tabbar/View/TabbarViewController.m | 49 +++++++++++-------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/xplan-ios/Appdelegate/AppDelegate+ThirdConfig.m b/xplan-ios/Appdelegate/AppDelegate+ThirdConfig.m index 96ab4a9a..eafd4949 100644 --- a/xplan-ios/Appdelegate/AppDelegate+ThirdConfig.m +++ b/xplan-ios/Appdelegate/AppDelegate+ThirdConfig.m @@ -39,7 +39,7 @@ UIKIT_EXTERN NSString * adImageName; [self configUMengSDK]; [self initEmojiData]; [self configBugly]; -// [self configQIYUSDK]; + [self configQIYUSDK]; } - (void)configShareSDK { @@ -76,7 +76,6 @@ UIKIT_EXTERN NSString * adImageName; } - (void)configQIYUSDK { [[QYSDK sharedSDK] registerAppId:@"b6b7ca22f8ce319dea3a7456dc211fec" appName:@"音萌"]; - [QYSDK sharedSDK].customUIConfig.sessionBackground.backgroundColor = [UIColor redColor]; [QYSDK sharedSDK].customUIConfig.showAudioEntry = NO; [QYSDK sharedSDK].customUIConfig.autoShowKeyboard = NO; [QYSDK sharedSDK].customUIConfig.serviceHeadImage = [UIImage imageNamed:@"ming_setting_about_us"]; diff --git a/xplan-ios/Main/Tabbar/View/TabbarViewController.m b/xplan-ios/Main/Tabbar/View/TabbarViewController.m index 5de00f52..5b41fcb9 100644 --- a/xplan-ios/Main/Tabbar/View/TabbarViewController.m +++ b/xplan-ios/Main/Tabbar/View/TabbarViewController.m @@ -32,6 +32,7 @@ #import "Api+Monents.h" #import "XPAdImageTool.h" #import "YYUtility.h" +#import "NSMutableDictionary+Saft.h" ///Model #import "AccountModel.h" #import "RoomInfoModel.h" @@ -242,6 +243,33 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; for (BaseViewController *vc in self.viewControllers) { vc.parentMode = self.parentMode; } + + NSLog(@"登录陈宫"); + NSString * uid = [AccountInfoStorage instance].getUid; + QYUserInfo * userinfo = [[QYUserInfo alloc] init]; + userinfo.userId = uid; + userinfo.data = userInfo.toJSONString; + NSMutableArray * array = [NSMutableArray array]; + NSMutableDictionary * nickDic = [NSMutableDictionary dictionary]; + [nickDic safeSetObject:@"real_name" forKey:@"key"]; + [nickDic safeSetObject:userInfo.nick forKey:@"value"]; + + NSMutableDictionary * accountDic = [NSMutableDictionary dictionary]; + [accountDic safeSetObject:@"0" forKey:@"index"]; + [accountDic safeSetObject:@"account" forKey:@"key"]; + [accountDic safeSetObject:@"音萌号" forKey:@"label"]; + [accountDic safeSetObject:@(userInfo.erbanNo) forKey:@"value"]; + + NSMutableDictionary * genderDic = [NSMutableDictionary dictionary]; + [genderDic safeSetObject:@"1" forKey:@"index"]; + [genderDic safeSetObject:@"sex" forKey:@"key"]; + [genderDic safeSetObject:@"性别" forKey:@"label"]; + [genderDic safeSetObject:userInfo.gender == GenderType_Male ? @"男" : @"女" forKey:@"value"]; + [array addObject:nickDic]; + [array addObject:accountDic]; + [array addObject:genderDic]; + userinfo.data = array.toJSONString; + [[QYSDK sharedSDK] setUserInfo:userinfo]; } - (void)checkInviteUserInfoSuccess:(InviteUserInfoModel *)inviteInfo { @@ -373,27 +401,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; [self.presenter logout]; } -//- (void)onLogin:(NIMLoginStep)step { -// if(step == NIMLoginStepLoginOK) { -// NSLog(@"登录陈宫"); -// NSString * uid = [AccountInfoStorage instance].getUid; -// if ([QYSDK sharedSDK].currentUserID != uid) { -// [[QYSDK sharedSDK] logout:^(BOOL success) { -// if (success) { -// QYUserInfo * userinfo = [[QYUserInfo alloc] init]; -// userinfo.userId = uid; -// [[QYSDK sharedSDK] setUserInfo:userinfo]; -// } -// }]; -// -// } else { -// QYUserInfo * userinfo = [[QYUserInfo alloc] init]; -// userinfo.userId = uid; -// [[QYSDK sharedSDK] setUserInfo:userinfo]; -// } -// } -//} - - (void)onKickout:(NIMLoginKickoutResult *)result { [XCHUDTool showErrorWithMessage:@"您已被踢下线,若非正常行为,请及时修改密码"]; UIViewController *rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController;