diff --git a/tongxin.xcodeproj/project.pbxproj b/tongxin.xcodeproj/project.pbxproj index d6d3a4f..a6afa08 100644 --- a/tongxin.xcodeproj/project.pbxproj +++ b/tongxin.xcodeproj/project.pbxproj @@ -7069,7 +7069,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1.2.1; + CURRENT_PROJECT_VERSION = 1.2.4; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8P345JS8F2; @@ -7169,7 +7169,7 @@ PRODUCT_NAME = "作业帮手表"; PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = watchReleaseProvisioning2; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = watchAdHocProvisioning3; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -7192,7 +7192,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1.2.1; + CURRENT_PROJECT_VERSION = 1.2.4; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8P345JS8F2; ENABLE_BITCODE = NO; @@ -7284,7 +7284,7 @@ PRODUCT_NAME = "作业帮手表"; PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = watchReleaseProvisioning2; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = watchAdHocProvisioning3; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; diff --git a/tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme b/tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme index c31df81..a0968ec 100644 --- a/tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme +++ b/tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme @@ -60,7 +60,7 @@ @@ -366,8 +366,8 @@ filePath = "tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "656" - endingLineNumber = "656" + startingLineNumber = "661" + endingLineNumber = "661" landmarkName = "-rtcEngine:localVideoStats:" landmarkType = "7"> @@ -398,8 +398,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "610" - endingLineNumber = "610" + startingLineNumber = "611" + endingLineNumber = "611" landmarkName = "-handlePushMsg:" landmarkType = "7"> @@ -456,14 +456,14 @@ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> @@ -1022,8 +1022,8 @@ filePath = "tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "438" - endingLineNumber = "438" + startingLineNumber = "439" + endingLineNumber = "439" landmarkName = "+calculateCellHeightWithMessage:displaysTimestamp:" landmarkType = "7"> @@ -1070,8 +1070,8 @@ filePath = "tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "585" - endingLineNumber = "585" + startingLineNumber = "586" + endingLineNumber = "586" landmarkName = "-layoutSubviews" landmarkType = "7"> @@ -1086,8 +1086,8 @@ filePath = "tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "562" - endingLineNumber = "562" + startingLineNumber = "563" + endingLineNumber = "563" landmarkName = "-layoutSubviews" landmarkType = "7"> @@ -1150,8 +1150,8 @@ filePath = "tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "432" - endingLineNumber = "432" + startingLineNumber = "433" + endingLineNumber = "433" landmarkName = "+calculateCellHeightWithMessage:displaysTimestamp:" landmarkType = "7"> @@ -1390,8 +1390,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "541" - endingLineNumber = "541" + startingLineNumber = "540" + endingLineNumber = "540" landmarkName = "-handlePushMsg:" landmarkType = "7"> @@ -1406,8 +1406,40 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "575" - endingLineNumber = "575" + startingLineNumber = "574" + endingLineNumber = "574" + landmarkName = "-handlePushMsg:" + landmarkType = "7"> + + + + + + + + diff --git a/tongxin/AppDelegate.m b/tongxin/AppDelegate.m index 8a79740..1c072d0 100644 --- a/tongxin/AppDelegate.m +++ b/tongxin/AppDelegate.m @@ -217,7 +217,6 @@ /** MARK: -----注册获取设备 PushKit 唯一 token 这个代理方法是获取了设备的唯一tokenStr,是要给服务器的 - */ - (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)pushCredentials forType:(PKPushType)type{ _deviceVoIPTokenData = pushCredentials.token; @@ -578,7 +577,8 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response if(![navVC.visibleViewController isKindOfClass:[ChatViewController class]]) { ChatViewController *vc = [[ChatViewController alloc] init]; - vc.zx_navTitle = [dict[@"type"] isEqualToString:@"chatGroupMessage"] ? @"家庭群聊" : @""; + //vc.zx_navTitle = [dict[@"type"] isEqualToString:@"chatGroupMessage"] ? @"家庭群聊" : @""; + vc.zx_navTitle = dict[@"name"]; vc.chatType = [dict[@"type"] isEqualToString:@"chatGroupMessage"] ? 222: 111; if ([dict[@"type"] isEqualToString:@"chatGroupMessage"]) { @@ -589,7 +589,8 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response else { Circle *infoCircle = [[Circle alloc] init]; - // vc.imei = model.imei; + if (dict[@"imei"]) + vc.imei = dict[@"imei"]; vc.infoCircle = infoCircle; } [[UICommon currentVC].navigationController pushViewController:vc animated:YES]; diff --git a/tongxin/Helpers/myHelper.h b/tongxin/Helpers/myHelper.h index 468d48e..1c82908 100644 --- a/tongxin/Helpers/myHelper.h +++ b/tongxin/Helpers/myHelper.h @@ -58,10 +58,10 @@ // 39.108.227.227 api.ecellsz.com //#ifdef DEBUG //测试环境 -//#define xBaseUrl @"http://api.test.ecellsz.com" +#define xBaseUrl @"http://api.test.ecellsz.com" //#else //正式环境 -#define xBaseUrl @"http://39.108.227.227" +//#define xBaseUrl @"http://39.108.227.227" //#endif //#define xBaseUrl @"http://39.108.227.227" //#define xBaseUrl @"http://api.test.ecellsz.com" diff --git a/tongxin/Helpers/myHelper.m b/tongxin/Helpers/myHelper.m index 6440424..c302ee0 100644 --- a/tongxin/Helpers/myHelper.m +++ b/tongxin/Helpers/myHelper.m @@ -502,7 +502,8 @@ if([[UIApplication sharedApplication] canOpenURL:url]) { - NSURL*url =[NSURL URLWithString:UIApplicationOpenSettingsURLString];           [[UIApplication sharedApplication] openURL:url]; + NSURL*url =[NSURL URLWithString:UIApplicationOpenSettingsURLString]; + [[UIApplication sharedApplication] openURL:url]; } } cancelHandler:nil destructiveHandler:nil]; diff --git a/tongxin/Info.plist b/tongxin/Info.plist index 2b549a6..b9c27c6 100644 --- a/tongxin/Info.plist +++ b/tongxin/Info.plist @@ -27,7 +27,7 @@ CFBundleURLSchemes - zuoyebang + zuoyebangwatch diff --git a/tongxin/PrefixHeader.pch b/tongxin/PrefixHeader.pch index dcb90d7..e688b95 100644 --- a/tongxin/PrefixHeader.pch +++ b/tongxin/PrefixHeader.pch @@ -111,8 +111,8 @@ #define FontADA_(x) [UIFont fontWithName:@"HelveticaNeue" size: Adapted(x)] #define FontBoldADA_(x) [UIFont fontWithName:@"HelveticaNeue-Bold" size: Adapted(x)] -#define TargetName @"lekangshouhu" //作业帮手表 -//lekang +#define TargetName @"zuoyebang" //作业帮手表 +//zuoyebang #define WXAPPID @"wxc0ca3e7f672ac786" #define WXAPPSecret @"009bbe40ee4b6a6f8a1b413a2989167a" diff --git a/tongxin/ThirdPartyLib/LGAlertView/LGAlertView/LGAlertView.m b/tongxin/ThirdPartyLib/LGAlertView/LGAlertView/LGAlertView.m index 2c12cb1..fc18f43 100644 --- a/tongxin/ThirdPartyLib/LGAlertView/LGAlertView/LGAlertView.m +++ b/tongxin/ThirdPartyLib/LGAlertView/LGAlertView/LGAlertView.m @@ -892,14 +892,23 @@ LGAlertViewType; destructiveButtonTitle:(NSString *)destructiveButtonTitle delegate:(id)delegate { - return [[self alloc] alertViewWithTextFieldsAndTitle:title - message:message - numberOfTextFields:numberOfTextFields - textFieldsSetupHandler:textFieldsSetupHandler - buttonTitles:buttonTitles - cancelButtonTitle:cancelButtonTitle - destructiveButtonTitle:destructiveButtonTitle - delegate:delegate]; +// return [[self alloc] alertViewWithTextFieldsAndTitle:title +// message:message +// numberOfTextFields:numberOfTextFields +// textFieldsSetupHandler:textFieldsSetupHandler +// buttonTitles:buttonTitles +// cancelButtonTitle:cancelButtonTitle +// destructiveButtonTitle:destructiveButtonTitle +// delegate:delegate]; + + return [[self alloc] initWithTextFieldsAndTitle:title + message:message + numberOfTextFields:numberOfTextFields + textFieldsSetupHandler:textFieldsSetupHandler + buttonTitles:buttonTitles + cancelButtonTitle:cancelButtonTitle + destructiveButtonTitle:destructiveButtonTitle + delegate:delegate]; } #pragma mark - diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h index 066a500..bd29e0f 100755 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h @@ -55,7 +55,7 @@ @property (nonatomic, copy) NSNumber *senderType; @property (nonatomic, copy) NSNumber *type; @property (nonatomic, copy) NSString *online; -@property (nonatomic, copy) NSString *Id; +//@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 6d5faca..278232d 100755 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m @@ -15,12 +15,12 @@ @synthesize timestamp = _timestamp; @synthesize avator = _avator; -+ (NSDictionary *)modelCustomPropertyMapper -{ - return @{ - @"Id":@"id", - }; -} +//+ (NSDictionary *)modelCustomPropertyMapper +//{ +// return @{ +// @"Id":@"id", +// }; +//} - (void)setType:(NSNumber *)type{ _type = type; @@ -258,7 +258,7 @@ _avator = [aDecoder decodeObjectForKey:@"avator"]; _senderID = [aDecoder decodeObjectForKey:@"senderID"]; - _Id = [aDecoder decodeObjectForKey:@"id"]; +// _Id = [aDecoder decodeObjectForKey:@"Id"]; _timestamp = [aDecoder decodeObjectForKey:@"timestamp"]; _messageMediaType = [[aDecoder decodeObjectForKey:@"messageMediaType"] integerValue]; @@ -294,7 +294,7 @@ [aCoder encodeObject:self.senderID forKey:@"senderID"]; - [aCoder encodeObject:self.Id forKey:@"Id"]; +// [aCoder encodeObject:self.Id forKey:@"Id"]; [aCoder encodeObject:self.timestamp forKey:@"timestamp"]; [aCoder encodeObject:[NSNumber numberWithInteger:self.messageMediaType] forKey:@"messageMediaType"]; diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m index c460f4a..b8d8987 100644 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m @@ -133,11 +133,12 @@ static const CGFloat kXHUserNameLabelHeight = 12; - (void)transpond:(id)sender { DLog(@"Cell was transpond"); - NSLog(@"消息id--%@",self.messageBubbleView.message.Id); + // 举报 + 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]; + [popview reportPopView:self.messageBubbleView.message.id]; } } diff --git a/tongxin/VC/HomeMeg/Chat/ChatViewController.m b/tongxin/VC/HomeMeg/Chat/ChatViewController.m index e42610d..1b9d6ef 100644 --- a/tongxin/VC/HomeMeg/Chat/ChatViewController.m +++ b/tongxin/VC/HomeMeg/Chat/ChatViewController.m @@ -209,7 +209,7 @@ presenter = [[ChatPresenter alloc] initWithViewController:self]; self.infoUser = cUser; - self.infoUser.cDevice.imei = self.imei; + //self.infoUser.cDevice.imei = self.imei; // self.infoCircle = [cUser getCircleWithImei:cUser.cDevice.imei]; NSLog(@"%@",self.infoCircle); if (!self.chatType && self.infoCircle) @@ -632,7 +632,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:^{ @@ -648,7 +648,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:^{ @@ -683,7 +683,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]; @@ -697,7 +697,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]; @@ -764,7 +764,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]; @@ -772,7 +772,7 @@ message.voicePath = wavPath; [weakSelf addMessage:message]; [weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypeVoice]; - presenter.isSended = YES; + self->presenter.isSended = YES; } failure:^{ }]; @@ -787,7 +787,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]; @@ -795,7 +795,7 @@ message.voicePath = wavPath; [weakSelf addMessage:message]; [weakSelf finishSendMessageWithBubbleMessageType:XHBubbleMessageMediaTypeVoice]; - presenter.isSended = YES; + self->presenter.isSended = YES; } failure:^{ }]; @@ -826,7 +826,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]; @@ -843,7 +843,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]; diff --git a/tongxin/VC/HomeMeg/HomeMessageViewController.m b/tongxin/VC/HomeMeg/HomeMessageViewController.m index c404fa8..4494923 100644 --- a/tongxin/VC/HomeMeg/HomeMessageViewController.m +++ b/tongxin/VC/HomeMeg/HomeMessageViewController.m @@ -122,7 +122,8 @@ HomeChatListModel *model = self.myDataSource[indexPath.row]; ChatViewController *vc = [[ChatViewController alloc] init]; - vc.zx_navTitle = model.groupid ? @"家庭群聊" : model.name; + //vc.zx_navTitle = model.groupid ? @"家庭群聊" : model.name; + vc.zx_navTitle = model.name; vc.chatType = model.groupid ? 222: 111; if (model.groupid) { @@ -133,6 +134,7 @@ infoCircle.devices = model.devices; infoCircle.msgNum = model.msgNum; vc.infoCircle = infoCircle; + vc.infoUser = cUser; } else { diff --git a/tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m b/tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m index 2311251..1f08100 100644 --- a/tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m +++ b/tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m @@ -64,7 +64,8 @@ } else [self.iconImg sd_setImageWithURL:[NSURL URLWithString:listModel.avator] placeholderImage:ImageName_(@"设备默认头像")]; - self.titleLabel.text = listModel.groupid ? @"家庭群聊" : listModel.name; +// self.titleLabel.text = listModel.groupid ? @"家庭群聊" : listModel.name; + self.titleLabel.text = listModel.name; NSString *message = @"--"; if (listModel.message) { diff --git a/tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m b/tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m index 6e1aa43..b9837a7 100755 --- a/tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m +++ b/tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m @@ -481,19 +481,18 @@ { [self stopRing]; [self leaveChannel]; - if(!hangUping) +// if(!hangUping) { WEAKSELF if(sender){ + [weakSelf dismissViewControllerAnimated:YES completion:nil]; //调 API 接口 下发指令给设备 上传 video_id [cUser activeHangUpVideoID:self.video_id WithDevice:self.device WithSuccess:^(id responseObject) { xLog(@"主动挂断成功"); - self->hangUping = NO; - [weakSelf dismissViewControllerAnimated:YES completion:nil]; + //self->hangUping = NO; } failure:^{ xLog(@"主动挂断失败"); - self->hangUping = NO; - [weakSelf dismissViewControllerAnimated:YES completion:nil]; + //self->hangUping = NO; }]; } else @@ -503,7 +502,7 @@ } //MARK: 收到设备主动挂断 后的 推送的 动作 //[UICommon MessageUpload:@""InfoWithStatus:[NSString stringWithFormat:@"%@ 拒绝了你的通话请求",cUser.cDevice.name]]; - [UICommon MessageSuccessText:@"视频通话结束" isImg:NO]; + [UICommon MessageSuccessText:self.isReceiveCall ? @"拒绝通话" : @"视频通话结束" isImg:NO]; AfterDispatch(1, ^{ [weakSelf dismissViewControllerAnimated:YES completion:nil]; }); @@ -520,19 +519,21 @@ - (void)hangUpButton:(UIButton *)sender { [self stopRing]; [self leaveChannel]; - if(!hangUping){ - hangUping = YES; +// if(!hangUping) +// { +// hangUping = YES; + WEAKSELF + [weakSelf dismissViewControllerAnimated:YES completion:nil]; //调 API 接口 下发指令给设备 上传 video_id [cUser activeHangUpVideoID:self.video_id WithDevice:self.device WithSuccess:^(id responseObject) { xLog(@"主动挂断成功"); - [weakSelf dismissViewControllerAnimated:YES completion:nil]; - self->hangUping = NO; + // self->hangUping = NO; } failure:^{ xLog(@"主动挂断失败"); - self->hangUping = NO; + //self->hangUping = NO; }]; - } +// } } @@ -549,13 +550,15 @@ } WEAKSELF [self.agoraKit leaveChannel:^(AgoraChannelStats *stat) { - //取消不自动锁屏 [UIApplication sharedApplication].idleTimerDisabled = NO; [weakSelf.remoteVideo removeFromSuperview]; [weakSelf.localVideo removeFromSuperview]; //停止定时器 [weakSelf _stopTimeTimer]; + [weakSelf dismissViewControllerAnimated:YES completion:^{ + + }]; if(weakSelf.isCall){ //上传视频时间 @@ -580,9 +583,7 @@ }]; } - [weakSelf dismissViewControllerAnimated:YES completion:^{ - - }]; + }]; } @@ -601,6 +602,10 @@ /// 发生错误回调 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didOccurError:(AgoraErrorCode)errorCode{ xLog(@"===发生错误回调 errorCode:%ld",errorCode); +// [UICommon MessageErrorText:@"接听失败"]; +// AfterDispatch(1, ^{ +// [self dismissViewControllerAnimated:YES completion:nil]; +// }); } /// Token 服务即将过期回调 diff --git a/tongxin/VC/WatchHome/WatchHomeViewController.m b/tongxin/VC/WatchHome/WatchHomeViewController.m index 1d3e11d..2fd4899 100644 --- a/tongxin/VC/WatchHome/WatchHomeViewController.m +++ b/tongxin/VC/WatchHome/WatchHomeViewController.m @@ -189,13 +189,11 @@ [[UIApplication sharedApplication] registerForRemoteNotifications]; } - //上传更新版本到后台 - [weakSelf upDataVersion]; - [weakSelf viewWillAppear:YES]; }]; - + //上传更新版本到后台 + [weakSelf upDataVersion]; //延迟2秒后订阅通知,不然会调用2次 viewWillAppear dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ @@ -291,7 +289,7 @@ //当前版本号 NSString *version = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"]; [params setValue:version forKey:@"version"]; - [params setValue:TargetName forKey:@"channel"]; + [params setValue:@"zuoyebang" forKey:@"channel"]; [xMyHttp URL:HTTP_VERSION method:@"POST" parameters:params success:^(NSURLSessionDataTask *task, id responseObject) { //判断当前版本是否是最新版本, !! 提示更新 !! diff --git a/tongxin/xBase/Model/DMessage.m b/tongxin/xBase/Model/DMessage.m index 0ef09b3..9e14d33 100644 --- a/tongxin/xBase/Model/DMessage.m +++ b/tongxin/xBase/Model/DMessage.m @@ -46,7 +46,7 @@ } @catch (NSException *exception) { if (failure) { NSDictionary *userInfo = @{NSLocalizedDescriptionKey:@"公共接口异常"}; - NSError *error = [NSError errorWithDomain:@"com.ecellsz.lekang" code:-1 userInfo:userInfo]; + NSError *error = [NSError errorWithDomain:@"com.zuoyebang.iot.watch" code:-1 userInfo:userInfo]; failure(error); } }