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;