diff --git a/tongxin.xcodeproj/project.pbxproj b/tongxin.xcodeproj/project.pbxproj index bef3b35..c23ff8d 100644 --- a/tongxin.xcodeproj/project.pbxproj +++ b/tongxin.xcodeproj/project.pbxproj @@ -882,6 +882,8 @@ 61D46EE325BAD0E200539110 /* AnyChatCoreSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61D46EE225BAD0E200539110 /* AnyChatCoreSDK.framework */; }; 61D46EE925BAFA0200539110 /* CheckCodeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D46EE725BAFA0200539110 /* CheckCodeTableViewCell.m */; }; 61D46EEA25BAFA0200539110 /* CheckCodeTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61D46EE825BAFA0200539110 /* CheckCodeTableViewCell.xib */; }; + 61DF3BCC2AA9C56700E69AE9 /* CommonPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61DF3BCA2AA9C56700E69AE9 /* CommonPopView.m */; }; + 61DF3BCF2AA9C59B00E69AE9 /* ReportTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61DF3BCE2AA9C59B00E69AE9 /* ReportTableViewCell.m */; }; 61F206B225650D5B00FF2247 /* BRManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F206B125650D5B00FF2247 /* BRManager.m */; }; 61F206B52565427500FF2247 /* BairuiModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F206B42565427500FF2247 /* BairuiModel.m */; }; 61F206B92565494F00FF2247 /* VideoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61F206B62565494B00FF2247 /* VideoViewController.xib */; }; @@ -2441,6 +2443,10 @@ 61D46EE625BAFA0200539110 /* CheckCodeTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CheckCodeTableViewCell.h; sourceTree = ""; }; 61D46EE725BAFA0200539110 /* CheckCodeTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CheckCodeTableViewCell.m; sourceTree = ""; }; 61D46EE825BAFA0200539110 /* CheckCodeTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CheckCodeTableViewCell.xib; sourceTree = ""; }; + 61DF3BCA2AA9C56700E69AE9 /* CommonPopView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommonPopView.m; sourceTree = ""; }; + 61DF3BCB2AA9C56700E69AE9 /* CommonPopView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonPopView.h; sourceTree = ""; }; + 61DF3BCD2AA9C59B00E69AE9 /* ReportTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportTableViewCell.h; sourceTree = ""; }; + 61DF3BCE2AA9C59B00E69AE9 /* ReportTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportTableViewCell.m; sourceTree = ""; }; 61F206B025650D5B00FF2247 /* BRManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BRManager.h; sourceTree = ""; }; 61F206B125650D5B00FF2247 /* BRManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BRManager.m; sourceTree = ""; }; 61F206B32565427500FF2247 /* BairuiModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BairuiModel.h; sourceTree = ""; }; @@ -4903,8 +4909,12 @@ 61263DA32A5FABEF005D1694 /* Discover */ = { isa = PBXGroup; children = ( + 61DF3BCB2AA9C56700E69AE9 /* CommonPopView.h */, + 61DF3BCA2AA9C56700E69AE9 /* CommonPopView.m */, 61263DA42A5FABEF005D1694 /* DiscoverViewController.h */, 61263DA52A5FABEF005D1694 /* DiscoverViewController.m */, + 61DF3BCD2AA9C59B00E69AE9 /* ReportTableViewCell.h */, + 61DF3BCE2AA9C59B00E69AE9 /* ReportTableViewCell.m */, 61263DA62A5FABEF005D1694 /* View */, ); path = Discover; @@ -6454,6 +6464,7 @@ 396990551F0B384F0050D916 /* QRCodeGenerator.m in Sources */, 3C9DBEEE20EB222E005699F0 /* UserAnnotationView.m in Sources */, 61B030BD2A4139940018CBDB /* NSObject+YYAddForKVO.m in Sources */, + 61DF3BCF2AA9C59B00E69AE9 /* ReportTableViewCell.m in Sources */, 3C14F8A21FB010C8006E3D89 /* CustomAnnotationView.m in Sources */, 1870D2182323AA6100FA55E4 /* JuPhoonCallViewController.m in Sources */, 61B030B92A4139940018CBDB /* NSDate+YYAdd.m in Sources */, @@ -6911,6 +6922,7 @@ 61BACC4E2A5E7B6A00ED4D2C /* SmSModel.m in Sources */, 61F206BE25654A1700FF2247 /* MZTimerLabel.m in Sources */, 612F37DA28055DC9004B9A95 /* TihuVideoCallViewController.m in Sources */, + 61DF3BCC2AA9C56700E69AE9 /* CommonPopView.m in Sources */, 61B030B22A4139940018CBDB /* NSBundle+YYAdd.m in Sources */, 3999D95C1F0A354100508F2B /* Locate.m in Sources */, 397877151F15FF3500F0D282 /* SELinkText.m in Sources */, diff --git a/tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme b/tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme index abbd434..e019739 100644 --- a/tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme +++ b/tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme @@ -60,7 +60,7 @@ @@ -270,8 +270,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "224" - endingLineNumber = "224" + startingLineNumber = "237" + endingLineNumber = "237" landmarkName = "-pushRegistry:didReceiveIncomingPushWithPayload:forType:" landmarkType = "7"> @@ -471,22 +471,6 @@ - - - - - - - - @@ -596,5 +564,21 @@ landmarkType = "7"> + + + + diff --git a/tongxin/AppDelegate.h b/tongxin/AppDelegate.h index 13f7e81..ad6605c 100644 --- a/tongxin/AppDelegate.h +++ b/tongxin/AppDelegate.h @@ -87,6 +87,6 @@ /// 注册远程通知 - (void)registerForRemoteNotification; -- (void)showRootViewController; +- (void)showRootViewController:(NSInteger)type; @end diff --git a/tongxin/AppDelegate.m b/tongxin/AppDelegate.m index bf2f204..3570d09 100644 --- a/tongxin/AppDelegate.m +++ b/tongxin/AppDelegate.m @@ -56,9 +56,15 @@ @property (nonatomic, strong) BUSplashAd *splashAd; @property (nonatomic, strong) CLLocationManager *locationManager; +/// 广告需要,增加一张启动图 +@property (nonatomic ,strong) UIImageView *LaunchImage; + /// 广告提示【互动广告】 @property (nonatomic ,weak) UILabel *splashLabel; +/// 进入后台计时器开启 +@property (nonatomic ,assign) NSInteger timeout; + @end @implementation AppDelegate @@ -69,7 +75,7 @@ NSUserDefaults* userDefault = [[NSUserDefaults alloc] initWithSuiteName:@"group.tongxin"]; [userDefault setValue:@"童信APP活着的状态" forKey:@"APPStatus"]; [User loadFormFile]; - [self showRootViewController]; + [self showRootViewController:1]; [self requestIDFATracking]; [self getadSwitch]; self.window.backgroundColor = [UIColor whiteColor]; @@ -145,6 +151,11 @@ // [Bluetooth.shareInstance connectPeripheralWithUUID]; // } + NSError *setCategoryErr = nil; + NSError *activationErr = nil; + [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &setCategoryErr]; + [[AVAudioSession sharedInstance] setActive: YES error: &activationErr]; + [self.window makeKeyAndVisible]; return YES; } @@ -155,13 +166,15 @@ return _tabbarView; } -- (void)showRootViewController +- (void)showRootViewController:(NSInteger)type { NSLog(@"登录信息==%@",cUser); if (cUser) { self.window.rootViewController = self.tabbarView; self.tabbarView.selectedIndex = 0; + if (type == 1) + [self.tabbarView.view addSubview:self.LaunchImage]; } else { @@ -758,6 +771,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + [self startTimer]; } @@ -766,6 +780,25 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:nil]; // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + + UIApplication *app = [UIApplication sharedApplication]; + __block UIBackgroundTaskIdentifier bgTask; + bgTask = [app beginBackgroundTaskWithExpirationHandler:^{ + dispatch_async(dispatch_get_main_queue(), ^{ + if (bgTask != UIBackgroundTaskInvalid) + { + bgTask = UIBackgroundTaskInvalid; + } + }); + }]; + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + dispatch_async(dispatch_get_main_queue(), ^{ + if (bgTask != UIBackgroundTaskInvalid) + { + bgTask = UIBackgroundTaskInvalid; + } + }); + }); } //MARK: APP将要从后台返回 @@ -783,6 +816,10 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response [self setNotificationData:self.backgroudMsg.userInfo]; self.backgroudMsg = nil; } + [self resetTimer]; + if (self.timeout > 300) + [self setupBUAdSDK]; + // [self getadSwitch]; } @@ -811,6 +848,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response NSUserDefaults* userDefault = [[NSUserDefaults alloc] initWithSuiteName:@"group.tongxin"]; // [userDefault setValue:@(NO) forKey:@"APPStatus"]; [userDefault removeObjectForKey:@"APPStatus"]; + [self resetTimer]; } - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray> * __nullable restorableObjects))restorationHandler @@ -866,10 +904,13 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response else { [self disYulan]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } } failure:^(id faiObject) { - + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; }]; } @@ -949,7 +990,10 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response } ///当材料加载成功时调用此方法 -- (void)splashAdLoadSuccess:(nonnull BUSplashAd *)splashAd { +- (void)splashAdLoadSuccess:(nonnull BUSplashAd *)splashAd +{ + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; UIWindow *keyWindow = self.window; [splashAd showSplashViewInRootViewController:keyWindow.rootViewController]; @@ -966,6 +1010,8 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response - (void)splashAdLoadFail:(nonnull BUSplashAd *)splashAd error:(BUAdError * _Nullable)error { [self disYulan]; [self pbu_logWithSEL:_cmd msg:@""]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } ///当闪屏视图渲染失败时调用此方法 @@ -973,26 +1019,36 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response [self disYulan]; [self pbu_logWithSEL:_cmd msg:@""]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } ///当渲染成功时调用这个方法 - (void)splashAdRenderSuccess:(nonnull BUSplashAd *)splashAd { [self pbu_logWithSEL:_cmd msg:@""]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } ///这个方法将在显示splash视图时调用 - (void)splashAdWillShow:(nonnull BUSplashAd *)splashAd { [self pbu_logWithSEL:_cmd msg:@""]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } ///这个方法在弹出视图显示时被调用 - (void)splashAdDidShow:(nonnull BUSplashAd *)splashAd { [self disYulan]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } ///这个方法在点击splash视图时被调用。 - (void)splashAdDidClick:(nonnull BUSplashAd *)splashAd { [self pbu_logWithSEL:_cmd msg:@""]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } /// 广告加载关闭是调用 @@ -1002,6 +1058,8 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response [self disYulan]; self.splashLabel.hidden = YES; [self.splashLabel removeFromSuperview]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } - (void)splashAdDidClose:(BUSplashAd *)splashAd closeType:(BUSplashAdCloseType)closeType @@ -1010,6 +1068,18 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response [self disYulan]; self.splashLabel.hidden = YES; [self.splashLabel removeFromSuperview]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; +} + +/// 当视频广告播放完成或发生错误时调用此方法。 +- (void)splashVideoAdDidPlayFinish:(BUSplashAd *)splashAd didFailWithError:(NSError *)error +{ + [self disYulan]; + self.splashLabel.hidden = YES; + [self.splashLabel removeFromSuperview]; + if (self.LaunchImage) + [self.LaunchImage removeFromSuperview]; } - (void)disYulan @@ -1024,6 +1094,21 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response } +- (UIImageView *)LaunchImage +{ + if (!_LaunchImage) + { + _LaunchImage = [UIImageView new]; + _LaunchImage.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight); + if(ScreenHeight >= 812) + _LaunchImage.image = ImageName_(@"启动图X"); + else + _LaunchImage.image = ImageName_(@"启动图"); + + } + return _LaunchImage; +} + - (void)upding { //定位一次自身的位置 @@ -1046,6 +1131,31 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response } +static dispatch_source_t _timer; + + +- (void)startTimer +{ + [self resetTimer]; + WEAKSELF + self.timeout = 0; //倒计时时间 + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue); + dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行 + dispatch_source_set_event_handler(_timer, ^{ + self.timeout++; + NSLog(@"%ld",self.timeout); + }); + dispatch_resume(_timer); +} +- (void)resetTimer +{ + if (_timer) + { + dispatch_source_cancel(_timer); + _timer = nil; + } +} @end diff --git a/tongxin/Assets.xcassets/通用/comm_report_select_no.imageset/Contents.json b/tongxin/Assets.xcassets/通用/comm_report_select_no.imageset/Contents.json new file mode 100644 index 0000000..730d086 --- /dev/null +++ b/tongxin/Assets.xcassets/通用/comm_report_select_no.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "comm_report_select_no@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tongxin/Assets.xcassets/通用/comm_report_select_no.imageset/comm_report_select_no@2x.png b/tongxin/Assets.xcassets/通用/comm_report_select_no.imageset/comm_report_select_no@2x.png new file mode 100644 index 0000000..74b0803 Binary files /dev/null and b/tongxin/Assets.xcassets/通用/comm_report_select_no.imageset/comm_report_select_no@2x.png differ diff --git a/tongxin/Assets.xcassets/通用/comm_report_select_yes.imageset/Contents.json b/tongxin/Assets.xcassets/通用/comm_report_select_yes.imageset/Contents.json new file mode 100644 index 0000000..4093809 --- /dev/null +++ b/tongxin/Assets.xcassets/通用/comm_report_select_yes.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "comm_report_select_yes@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tongxin/Assets.xcassets/通用/comm_report_select_yes.imageset/comm_report_select_yes@2x.png b/tongxin/Assets.xcassets/通用/comm_report_select_yes.imageset/comm_report_select_yes@2x.png new file mode 100644 index 0000000..5edd496 Binary files /dev/null and b/tongxin/Assets.xcassets/通用/comm_report_select_yes.imageset/comm_report_select_yes@2x.png differ diff --git a/tongxin/Helpers/myHttp/NetHeader.h b/tongxin/Helpers/myHttp/NetHeader.h index 6e97440..b27b6bd 100644 --- a/tongxin/Helpers/myHttp/NetHeader.h +++ b/tongxin/Helpers/myHttp/NetHeader.h @@ -85,7 +85,7 @@ typedef NS_ENUM(NSInteger, HTTP_CODE) #define HTTP_CHATGROUPS__MESSAGE @"getway/chatGroups/[groupid]/message" -#define HTTP_REPORT__MESSAGE @"getway/accounts/[openid]/report" +#define HTTP_REPORT__MESSAGE @"getway/accounts/[openid]/report2" #define HTTP_POST_ACCOUNTS_LOGIN @"getway/accounts/login"//用户登录 diff --git a/tongxin/Info.plist b/tongxin/Info.plist index 22131fa..aa4602b 100644 --- a/tongxin/Info.plist +++ b/tongxin/Info.plist @@ -203,5 +203,9 @@ Light UIViewControllerBasedStatusBarAppearance + WKBackgroundModes + + App plays audio + diff --git a/tongxin/MyTabBarViewController.m b/tongxin/MyTabBarViewController.m index fa8e5e3..3e317da 100644 --- a/tongxin/MyTabBarViewController.m +++ b/tongxin/MyTabBarViewController.m @@ -116,7 +116,7 @@ //MARK: 有时会在首页显示之后再显示广告, 就是闪现首页,所以这里加个 View 做下过渡 会在首页加载完成数据后删除 _TransitionImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight)]; _TransitionImageView.image = [UIImage imageNamed:LaunchImageName]; - [self.view addSubview: _TransitionImageView]; + //[self.view addSubview: _TransitionImageView]; } @@ -227,7 +227,7 @@ ![[self getCurrentVC] isKindOfClass:[RegisteredViewController class]]) { AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate; - [app showRootViewController]; + [app showRootViewController:0]; } // UINavigationController *vc = [addDeviceSB instantiateViewControllerWithIdentifier:@"LoginNav"]; diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Common/XHConfigurationHelper.m b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Common/XHConfigurationHelper.m index c5f8404..43fdc81 100755 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Common/XHConfigurationHelper.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Common/XHConfigurationHelper.m @@ -64,8 +64,8 @@ NSString *kXHMessageTableCustomLoadAvatarNetworImageKey = @"com.HUAJIE.MDK.XHMes self = [super init]; if (self) { self.popMenuTitles = @[NSLocalizedStringFromTable(@"copy", @"MessageDisplayKitString", @"复制文本消息"), - NSLocalizedStringFromTable(@"transpond", @"MessageDisplayKitString", @"转发"), - NSLocalizedStringFromTable(@"favorites", @"MessageDisplayKitString", @"收藏"), +// NSLocalizedStringFromTable(@"transpond", @"MessageDisplayKitString", @"转发"), +// NSLocalizedStringFromTable(@"favorites", @"MessageDisplayKitString", @"收藏"), NSLocalizedStringFromTable(@"report", @"MessageDisplayKitString", @"举报"),]; } return self; diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h index 9bda7c0..066a500 100755 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h @@ -55,6 +55,7 @@ @property (nonatomic, copy) NSNumber *senderType; @property (nonatomic, copy) NSNumber *type; @property (nonatomic, copy) NSString *online; +@property (nonatomic, copy) NSString *Id; @property (nonatomic, assign) BOOL hide; diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m index 50aa63a..1c4790b 100755 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m @@ -15,6 +15,13 @@ @synthesize timestamp = _timestamp; @synthesize avator = _avator; ++ (NSDictionary *)modelCustomPropertyMapper +{ + return @{ + @"Id":@"id", + }; +} + - (void)setType:(NSNumber *)type{ _type = type; if ([type isEqualToNumber:@(10005)]) { @@ -250,6 +257,7 @@ _avatar = [aDecoder decodeObjectForKey:@"avatar"]; _avator = [aDecoder decodeObjectForKey:@"avator"]; + _Id = [aDecoder decodeObjectForKey:@"Id"]; _senderID = [aDecoder decodeObjectForKey:@"senderID"]; _timestamp = [aDecoder decodeObjectForKey:@"timestamp"]; @@ -285,6 +293,7 @@ [aCoder encodeObject:self.avator forKey:@"avator"]; + [aCoder encodeObject:self.Id forKey:@"Id"]; [aCoder encodeObject:self.senderID forKey:@"senderID"]; [aCoder encodeObject:self.timestamp forKey:@"timestamp"]; diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m index 3b85705..f275dea 100644 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m @@ -9,6 +9,7 @@ #import "XHMessageTableViewCell.h" #import "Circle.h" #import "JSToastDialogs.h" +#import "CommonPopView.h" static const CGFloat kXHLabelPadding = 5.0f; static const CGFloat kXHTimeStampLabelHeight = 20.0f; @@ -130,6 +131,14 @@ static const CGFloat kXHUserNameLabelHeight = 20; - (void)transpond:(id)sender { DLog(@"Cell was transpond"); + // 举报 + NSLog(@"消息id--%@",self.messageBubbleView.message.Id); + if (self.messageBubbleView.message.content && self.messageBubbleView.message.senderID) { + + CommonPopView *popview = [CommonPopView new]; + [popview reportPopView:self.messageBubbleView.message.senderID]; + + } } - (void)favorites:(id)sender { @@ -139,21 +148,7 @@ static const CGFloat kXHUserNameLabelHeight = 20; - (void)more:(id)sender { DLog(@"Cell was more"); - if (self.messageBubbleView.message.content && self.messageBubbleView.message.senderID) { - - NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init]; - [parameters setObject:self.messageBubbleView.message.content forKey:@"content"]; - [parameters setObject:self.messageBubbleView.message.senderID forKey:@"reportID"]; - - Circle *circle = [[Circle alloc] init]; - [circle reportCircleMessageWithParameters:parameters - success:^(id responseObject) { - DLog(@"Report success"); - [[JSToastDialogs shareInstance] makeToast:@"举报发送成功" duration:3]; - } failure:^{ - DLog(@"Report failure"); - }]; - } + } diff --git a/tongxin/VC/DeviceTab/DeviceTabViewController.m b/tongxin/VC/DeviceTab/DeviceTabViewController.m index cf9beb5..ad731b7 100644 --- a/tongxin/VC/DeviceTab/DeviceTabViewController.m +++ b/tongxin/VC/DeviceTab/DeviceTabViewController.m @@ -326,14 +326,14 @@ [menuTitleArr1 addObject:cUser.cDevice.support_whiteList.intValue == 0 ? @"电话本" : @"管理员"]; [menuImageArr1 addObject:@"icon_phonebook"]; } -// if(cUser.cDevice.support_video.intValue == 4 || cUser.cDevice.support_video.intValue == 5 || cUser.cDevice.support_video.intValue == 1) + if(cUser.cDevice.support_video.intValue == 4 || cUser.cDevice.support_video.intValue == 5 || cUser.cDevice.support_video.intValue == 1) if(cUser.cDevice.support_video) { [menuTitleArr1 addObject:@"视频通话"]; [menuImageArr1 addObject:@"icon_home_video_call"]; } - //if (cUser.cDevice.support_chat && cUser.cDevice.support_chat.intValue == 0) + if (cUser.cDevice.support_chat && cUser.cDevice.support_chat.intValue == 0) { [menuTitleArr1 addObject:@"微聊"]; [menuImageArr1 addObject:@"icon_small_talk"]; @@ -376,11 +376,18 @@ [menuTitleArr2 addObject:@"课程表"]; [menuImageArr2 addObject:@"icon_fun_schedule"]; } + if(cUser.cDevice.support_family && cUser.cDevice.support_family.intValue == 1) { [menuTitleArr2 addObject:@"亲情号"]; [menuImageArr2 addObject:@"icon_family"]; } + // 学生卡 + if(cUser.cDevice.deviceType && cUser.cDevice.deviceType.intValue == 2) { + [menuTitleArr2 addObject:@"亲情号"]; + [menuImageArr2 addObject:@"icon_family"]; + } + if(cUser.cDevice.support_ppFriend && cUser.cDevice.support_ppFriend.intValue == 1) { [menuTitleArr2 addObject:@"好友列表"]; diff --git a/tongxin/VC/Discover/CommonPopView.h b/tongxin/VC/Discover/CommonPopView.h new file mode 100644 index 0000000..7660af9 --- /dev/null +++ b/tongxin/VC/Discover/CommonPopView.h @@ -0,0 +1,23 @@ +// +// CommonPopView.h +// tongxin +// +// Created by ecell on 2023/5/26. +// Copyright © 2023 xTT. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface CommonPopView : UIView + ++ (instancetype)sharedManager; + +#pragma mark 举报弹窗 +/// 举报弹窗 +- (void)reportPopView:(NSString *)reportID; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tongxin/VC/Discover/CommonPopView.m b/tongxin/VC/Discover/CommonPopView.m new file mode 100644 index 0000000..e44f46f --- /dev/null +++ b/tongxin/VC/Discover/CommonPopView.m @@ -0,0 +1,235 @@ +// +// CommonPopView.m +// tongxin +// +// Created by ecell on 2023/5/26. +// Copyright © 2023 xTT. All rights reserved. +// + +#import "CommonPopView.h" + +#import "User.h" +#import "ReportTableViewCell.h" +#import "Circle.h" + +@interface CommonPopView () + +/// 背景 +@property (nonatomic ,weak) UIView *bgView; + +@property (nonatomic ,strong) NSArray *titleArr; + +@property (nonatomic ,strong) NSMutableArray *selectTitleArr; + + + +@end + +@implementation CommonPopView + ++ (instancetype)sharedManager{ + static dispatch_once_t onceToken; + static CommonPopView *instance; + dispatch_once(&onceToken, ^{ + instance = [[CommonPopView alloc] init]; + }); + return instance; +} + +-(instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) + { + self.frame = [UIScreen mainScreen].bounds; + self.backgroundColor = RGBA(0, 0, 0, 0.4); + } + return self; +} + + +#pragma mark 举报弹窗 +/// 举报弹窗 +- (void)reportPopView:(NSString *)reportID +{ + WEAKSELF + UIView *bgView = [UICommon ui_view:CGRectZero backgroundColor:KKWhiteColorColor cornerRadius:18 borderWidth:0 borderColor:KKWhiteColorColor]; + self.bgView = bgView; + [self addSubview:bgView]; + [bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(self); + make.centerY.equalTo(self); + make.size.mas_equalTo(CGSizeMake(331, 520)); + }]; + + UILabel *titleLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:FontBold_(20) textColor:KKTextColor text:@"举报" Radius:0]; + [bgView addSubview:titleLabel]; + [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(bgView); + make.top.equalTo(bgView).offset(24); + }]; + + UILabel *textsLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:FontBold_(16) textColor:KKTextColor text:@"举报原因" Radius:0]; + [bgView addSubview:textsLabel]; + [textsLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(bgView).offset(20); + make.top.equalTo(titleLabel.mas_bottom).offset(18); + }]; + + + + UIButton *escBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(16) normalColor:KKTextColor normalText:@"取消" click:^(id x) { + [self dismiss]; + }]; + escBtn.layer.borderWidth = 1; + escBtn.layer.borderColor = RGB(240, 239, 237).CGColor; + escBtn.layer.cornerRadius = 24; + //view.layer.masksToBounds = YES; + [bgView addSubview:escBtn]; + [escBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(bgView.mas_bottom).inset(28); + make.left.equalTo(bgView).offset(24); + make.size.mas_equalTo(CGSizeMake(125, 48)); + }]; + + UIButton *okBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(16) normalColor:KKWhiteColorColor normalText:@"确定" click:^(id x) { + if (self.selectTitleArr.count <= 0) + { + [SVProgressHUD showErrorWithStatus:@"请选择举报原因"]; + AfterDispatch(1.5, ^{ + [SVProgressHUD dismiss]; + }); + return; + } + [self setReport:reportID]; + }]; + okBtn.backgroundColor = mainColor; + okBtn.layer.cornerRadius = 24; + okBtn.layer.masksToBounds = YES; + [bgView addSubview:okBtn]; + [okBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.equalTo(escBtn); + make.right.equalTo(bgView.mas_right).inset(24); + make.size.mas_equalTo(CGSizeMake(125, 48)); + }]; + + self.titleArr = @[@"谣言",@"有害信息",@"违法信息",@"色情低俗",@"人身攻击",@"垃圾营销",@"政治敏感",@"其他"]; + + UITableView *tableView = [UITableView new]; + tableView.delegate = self; + tableView.dataSource = self; + tableView.rowHeight = 40; + tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + [tableView registerClass:ReportTableViewCell.class forCellReuseIdentifier:NSStringFromClass(ReportTableViewCell.class)]; + tableView.showsVerticalScrollIndicator = NO; + tableView.allowsMultipleSelection = YES; //让CollectionView支持多选 + tableView.scrollEnabled = NO; + [bgView addSubview:tableView]; + [tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(bgView).inset(20); + make.top.equalTo(textsLabel.mas_bottom).offset(5); + make.bottom.equalTo(escBtn.mas_top).inset(15); + }]; + + + [self showPopView]; +} + + +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + ReportTableViewCell *cell = [ReportTableViewCell cellWithTableView:tableView indexPath:indexPath]; + cell.cellText = self.titleArr[indexPath.row]; + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + NSLog(@"选择-%@",self.titleArr[indexPath.row]); + NSString *title = self.titleArr[indexPath.row]; + [self.selectTitleArr addObject:title]; +} + +-(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath +{ + NSLog(@"取消选择-%@",self.titleArr[indexPath.row]); + NSString *title = self.titleArr[indexPath.row]; + [self.selectTitleArr removeObject:title]; +} + +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.titleArr.count; +} + + +- (void)setReport:(NSString *)reportID +{ + [SVProgressHUD showInfoWithStatus:@"举报中"]; + NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init]; + [parameters setObject:[self.selectTitleArr componentsJoinedByString:@"@"] forKey:@"content"]; + [parameters setObject:reportID forKey:@"reportID"]; + [parameters setValue:cUser.accesstoken forKey:@"accesstoken"]; + Circle *circle = [[Circle alloc] init]; + [circle reportCircleMessageWithParameters:parameters + success:^(id responseObject) { + [self dismiss]; + [SVProgressHUD dismiss]; + [SVProgressHUD showSuccessWithStatus:@"举报发送成功"]; + } failure:^{ + [SVProgressHUD showErrorWithStatus:@"举报失败"]; + }]; +} + + + +- (void)showPopView +{ + [self showWithAlert:self.bgView]; + [[UIApplication sharedApplication].delegate.window addSubview:self];; +} + +/** + 添加Alert入场动画 + @param alert 添加动画的View + */ +- (void)showWithAlert:(UIView*)alert +{ + CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; + animation.duration = 0.6; + NSMutableArray *values = [NSMutableArray array]; + [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]]; + [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.1, 1.1, 1.0)]]; + [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]]; + [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]]; + animation.values = values; + [alert.layer addAnimation:animation forKey:nil]; +} + +- (void)dismiss +{ + [UICommon resignKeyboard]; + [UIView animateWithDuration:0.6f animations:^{ + self.backgroundColor = [UIColor clearColor]; + self.alpha = 0; + }completion:^(BOOL finished) { + [self removeFromSuperview]; + } ]; +} + + +- (NSMutableArray *)selectTitleArr +{ + if (!_selectTitleArr) _selectTitleArr = [NSMutableArray new]; + return _selectTitleArr; +} + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect { + // Drawing code +} +*/ + +@end diff --git a/tongxin/VC/Discover/DiscoverViewController.m b/tongxin/VC/Discover/DiscoverViewController.m index 3644662..1058346 100644 --- a/tongxin/VC/Discover/DiscoverViewController.m +++ b/tongxin/VC/Discover/DiscoverViewController.m @@ -40,22 +40,22 @@ UIImage *img = ImageName_(@"Discover_banner"); -// UIButton *ximaBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(0) normalColor:KKWhiteColorColor normalText:@"" click:^(id x) { -// ActivityWebViewController *vc = [[ActivityWebViewController alloc] init]; -// vc.zx_navTitle = @"喜马拉雅"; -// vc.url = @"https://m.ximalaya.com/kidiot-service-app?appKey=6b267bcd4f91494aa182bb4a89b95a0b&channelId=72e7cc893dd049dc83d62e277080fdbd"; -// [self.navigationController pushViewController:vc animated:YES]; -// }]; -// ximaBtn.layer.cornerRadius = 10; -// ximaBtn.layer.masksToBounds = YES; -// [ximaBtn setBackgroundImage:img forState:0]; -// [self.view addSubview:ximaBtn]; -// [ximaBtn mas_makeConstraints:^(MASConstraintMaker *make) { -// make.left.right.equalTo(self.view).inset(15); -// make.height.mas_equalTo(img.size.height); -//// make.top.equalTo(searchBar.mas_bottom).offset(15); -// make.top.equalTo(self.disTableView.mas_bottom).offset(15); -// }]; + UIButton *ximaBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(0) normalColor:KKWhiteColorColor normalText:@"" click:^(id x) { + ActivityWebViewController *vc = [[ActivityWebViewController alloc] init]; + vc.zx_navTitle = @"喜马拉雅"; + vc.url = @"https://m.ximalaya.com/kidiot-service-app?appKey=6b267bcd4f91494aa182bb4a89b95a0b&channelId=72e7cc893dd049dc83d62e277080fdbd"; + [self.navigationController pushViewController:vc animated:YES]; + }]; + ximaBtn.layer.cornerRadius = 10; + ximaBtn.layer.masksToBounds = YES; + [ximaBtn setBackgroundImage:img forState:0]; + [self.view addSubview:ximaBtn]; + [ximaBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self.view).inset(15); + make.height.mas_equalTo(img.size.height); +// make.top.equalTo(searchBar.mas_bottom).offset(15); + make.top.equalTo(self.disTableView.mas_bottom).offset(15); + }]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section diff --git a/tongxin/VC/Discover/ReportTableViewCell.h b/tongxin/VC/Discover/ReportTableViewCell.h new file mode 100644 index 0000000..7fe6b11 --- /dev/null +++ b/tongxin/VC/Discover/ReportTableViewCell.h @@ -0,0 +1,19 @@ +// +// ReportTableViewCell.h +// tongxin +// +// Created by ecell on 2023/9/7. +// Copyright © 2023 xTT. All rights reserved. +// + +#import "ZZTableViewCell.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface ReportTableViewCell : ZZTableViewCell + +@property (nonatomic ,strong) NSString *cellText; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tongxin/VC/Discover/ReportTableViewCell.m b/tongxin/VC/Discover/ReportTableViewCell.m new file mode 100644 index 0000000..faefa6e --- /dev/null +++ b/tongxin/VC/Discover/ReportTableViewCell.m @@ -0,0 +1,72 @@ +// +// ReportTableViewCell.m +// tongxin +// +// Created by ecell on 2023/9/7. +// Copyright © 2023 xTT. All rights reserved. +// + +#import "ReportTableViewCell.h" + +@interface ReportTableViewCell () + +@property (nonatomic ,weak) UIImageView *leftImg; + +@property (nonatomic ,weak) UILabel *textsLabel; + +@end + +@implementation ReportTableViewCell + +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier +{ + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if (self) + { + self.selectionStyle = UITableViewCellSelectionStyleNone; + self.backgroundColor = KKClearColor; + [self subCellView]; + } + + return self; +} + +- (void)setCellText:(NSString *)cellText +{ + _cellText = cellText; + self.textsLabel.text = cellText; +} + +- (void)subCellView +{ + UIImageView *leftImg = [UICommon ui_imageView:CGRectZero fileName:@"comm_report_select_no"]; + self.leftImg = leftImg; + [self.contentView addSubview:leftImg]; + [leftImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.contentView); + make.centerY.equalTo(self.contentView); + make.size.mas_equalTo(leftImg.image.size); + }]; + + UILabel *textsLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:FontBold_(16) textColor:KKTextColor text:@"" Radius:0]; + self.textsLabel = textsLabel; + [self.contentView addSubview:textsLabel]; + [textsLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(leftImg.mas_right).offset(15); + make.centerY.equalTo(self.contentView); + }]; +} + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + self.leftImg.image = selected ? ImageName_(@"comm_report_select_yes") : ImageName_(@"comm_report_select_no"); + // Configure the view for the selected state +} + +@end diff --git a/tongxin/VC/Login/LoginViewController.m b/tongxin/VC/Login/LoginViewController.m index e8f18a3..8e34b2a 100644 --- a/tongxin/VC/Login/LoginViewController.m +++ b/tongxin/VC/Login/LoginViewController.m @@ -272,7 +272,7 @@ [[NSNotificationCenter defaultCenter] postNotificationName:@"LoginComplete" object:nil]; }]; - [app showRootViewController]; + [app showRootViewController:0]; [app.tabbarView removeTransitionImageView]; } failure:^(id faiObject) { diff --git a/tongxin/VC/Login/PhoneLoginViewController.m b/tongxin/VC/Login/PhoneLoginViewController.m index 6e01a9b..1386590 100644 --- a/tongxin/VC/Login/PhoneLoginViewController.m +++ b/tongxin/VC/Login/PhoneLoginViewController.m @@ -209,7 +209,7 @@ [UserDefaults synchronize]; [weakSelf getUserDevices:weakSelf.pwdTextField.text]; AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate; - [app showRootViewController]; + [app showRootViewController:0]; [app.tabbarView removeTransitionImageView]; } failure:^(id faiObject) { [weakSelf setBtnBadRoGoodFlag:YES WithBtn:weakSelf.loginBtn]; diff --git a/tongxin/VC/Map/MapViewController.m b/tongxin/VC/Map/MapViewController.m index 829dbfd..5dceab9 100644 --- a/tongxin/VC/Map/MapViewController.m +++ b/tongxin/VC/Map/MapViewController.m @@ -704,17 +704,7 @@ NSLog(@"%@",cUser.cDevice.lastLocation.address); NSString *dateStr = [myHelper distanceTimeWithBeforeTime:[self.curLocate.timestamp doubleValue]]; self.locationTimeLabel.text = dateStr; - if (self.curLocate.address.length < 1 && cUser.cDevice.lastLocation.address.length < 1) - { - [cUser.cDevice getDeviceInfoSuccess:^(id responseObject) { - NSDictionary *dic = responseObject[@"lastLocation"]; - self.locationAddressLabel.text = dic[@"address"]; - } failure:^(id faiObject) { - - }]; - } - else - self.locationAddressLabel.text = self.curLocate.address.length > 0 ? self.curLocate.address : cUser.cDevice.lastLocation.address; + self.locationAddressLabel.text = self.curLocate.address.length > 0 ? self.curLocate.address : cUser.cDevice.lastLocation.address.length > 0 ? cUser.cDevice.lastLocation.address : @"当前位置未知,请确保设备开机且能够联网,再点击定位按钮进行定位"; } self.regeo.location = [AMapGeoPoint locationWithLatitude:[self.curLocate.lat floatValue] longitude:[self.curLocate.lon floatValue]]; @@ -781,14 +771,33 @@ return nil; } -#pragma mark ====高德地图位置解析回调==== +#pragma mark ====高德地图位置解析错误回调==== +- (void)AMapSearchRequest:(id)request didFailWithError:(NSError *)error +{ + [cUser.cDevice getDeviceInfoSuccess:^(id responseObject) { + NSDictionary *dic = responseObject[@"lastLocation"]; + self.locationAddressLabel.text = dic[@"address"]; + } failure:^(id faiObject) { + + }]; +} +#pragma mark ====高德地图位置解析回调==== -(void)onReGeocodeSearchDone:(AMapReGeocodeSearchRequest *)request response:(AMapReGeocodeSearchResponse *)response{ if (response.regeocode != nil) { NSString *name = response.regeocode.formattedAddress; self.locationAddressLabel.text = name; } + else + { + [cUser.cDevice getDeviceInfoSuccess:^(id responseObject) { + NSDictionary *dic = responseObject[@"lastLocation"]; + self.locationAddressLabel.text = dic[@"address"]; + } failure:^(id faiObject) { + + }]; + } } diff --git a/tongxin/VC/WatchHome/Chat/ChatViewController.m b/tongxin/VC/WatchHome/Chat/ChatViewController.m index c028b2e..14b2711 100644 --- a/tongxin/VC/WatchHome/Chat/ChatViewController.m +++ b/tongxin/VC/WatchHome/Chat/ChatViewController.m @@ -630,7 +630,7 @@ [self.infoCircle sendCircleMessageWithParameters:parameters success:^(id responseObject) { [weakSelf setLastShowTimetampWithMessage:message]; - message.id = responseObject[@"id"]; + message.Id = responseObject[@"id"]; [weakSelf addMessage:message]; self->presenter.isSended = YES; } failure:^{ @@ -646,7 +646,7 @@ [parameters setValue:cUser.accesstoken forKey:@"token"]; [self.infoCircle sendCircleMessageWithImei:self.imei Parameters:parameters success:^(id responseObject) { [weakSelf setLastShowTimetampWithMessage:message]; - message.id = responseObject[@"id"]; + message.Id = responseObject[@"id"]; [weakSelf addMessage:message]; self->presenter.isSended = YES; } failure:^{ @@ -679,7 +679,7 @@ @"content":UIImageJPEGRepresentation(photo, 0.1)}]; [self.infoCircle sendCircleMessageWithParameters:parameters success:^(id responseObject) { - message.id = responseObject[@"id"]; + message.Id = responseObject[@"id"]; [weakSelf setLastShowTimetampWithMessage:message]; [weakSelf addMessage:message]; [weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypePhoto]; @@ -693,7 +693,7 @@ [parameters setValue:cUser.openid forKey:@"openid"]; [parameters setValue:cUser.accesstoken forKey:@"token"]; [self.infoCircle sendCircleMessageWithImei:self.imei Parameters:parameters success:^(id responseObject) { - message.id = responseObject[@"id"]; + message.Id = responseObject[@"id"]; [weakSelf setLastShowTimetampWithMessage:message]; [weakSelf addMessage:message]; [weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypePhoto]; @@ -754,7 +754,7 @@ NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithDictionary:@{@"type":@(3), @"content":data,@"duration":voiceDuration}]; [self.infoCircle sendCircleMessageWithParameters:parameters success:^(id responseObject) { - message.id = responseObject[@"id"]; + message.Id = responseObject[@"id"]; [weakSelf setLastShowTimetampWithMessage:message]; NSString *fileName = [NSString stringWithFormat:@"%@.wav",responseObject[@"id"]]; NSString *wavPath = [CJFileUtility documentsPathSubDir:@"msg_audio" andFile:fileName]; @@ -777,7 +777,7 @@ [parameters setValue:cUser.accesstoken forKey:@"token"]; [self.infoCircle sendCircleMessageWithImei:self.imei Parameters:parameters success:^(id responseObject) { - message.id = responseObject[@"id"]; + message.Id = responseObject[@"id"]; [weakSelf setLastShowTimetampWithMessage:message]; NSString *fileName = [NSString stringWithFormat:@"%@.wav",responseObject[@"id"]]; NSString *wavPath = [CJFileUtility documentsPathSubDir:@"msg_audio" andFile:fileName]; @@ -814,7 +814,7 @@ [self.infoCircle sendCircleMessageWithParameters:parameters success:^(id responseObject) { [weakSelf setLastShowTimetampWithMessage:emotionMessage]; - emotionMessage.id = responseObject[@"id"]; + emotionMessage.Id = responseObject[@"id"]; [weakSelf addMessage:emotionMessage]; self->presenter.isSended = YES; [weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypeEmotion]; @@ -831,7 +831,7 @@ [parameters setValue:cUser.accesstoken forKey:@"token"]; [self.infoCircle sendCircleMessageWithImei:self.imei Parameters:parameters success:^(id responseObject) { [weakSelf setLastShowTimetampWithMessage:emotionMessage]; - emotionMessage.id = responseObject[@"id"]; + emotionMessage.Id = responseObject[@"id"]; [weakSelf addMessage:emotionMessage]; self->presenter.isSended = YES; [weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypeEmotion];