Browse Source

【代码优化】解决bug

master
公司电脑 1 year ago
parent
commit
77930b7f6f
  1. 8
      tongxin.xcodeproj/project.pbxproj
  2. 2
      tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme
  3. BIN
      tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate
  4. 74
      tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  5. 7
      tongxin/AppDelegate.m
  6. 4
      tongxin/Helpers/myHelper.h
  7. 3
      tongxin/Helpers/myHelper.m
  8. 2
      tongxin/Info.plist
  9. 4
      tongxin/PrefixHeader.pch
  10. 25
      tongxin/ThirdPartyLib/LGAlertView/LGAlertView/LGAlertView.m
  11. 2
      tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h
  12. 16
      tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m
  13. 5
      tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m
  14. 22
      tongxin/VC/HomeMeg/Chat/ChatViewController.m
  15. 4
      tongxin/VC/HomeMeg/HomeMessageViewController.m
  16. 3
      tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m
  17. 37
      tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m
  18. 8
      tongxin/VC/WatchHome/WatchHomeViewController.m
  19. 2
      tongxin/xBase/Model/DMessage.m

8
tongxin.xcodeproj/project.pbxproj

@ -7069,7 +7069,7 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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;

2
tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme

@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

BIN
tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

74
tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -350,8 +350,8 @@ @@ -350,8 +350,8 @@
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "773"
endingLineNumber = "773"
startingLineNumber = "774"
endingLineNumber = "774"
landmarkName = "-applicationWillEnterForeground:"
landmarkType = "7">
</BreakpointContent>
@ -366,8 +366,8 @@ @@ -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">
</BreakpointContent>
@ -398,8 +398,8 @@ @@ -398,8 +398,8 @@
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "610"
endingLineNumber = "610"
startingLineNumber = "611"
endingLineNumber = "611"
landmarkName = "-handlePushMsg:"
landmarkType = "7">
</BreakpointContent>
@ -456,14 +456,14 @@ @@ -456,14 +456,14 @@
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "D5B7D124-D70C-4441-978D-8317D53A6BA8"
shouldBeEnabled = "No"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "603"
endingLineNumber = "603"
startingLineNumber = "604"
endingLineNumber = "604"
landmarkName = "-rtcEngine:didOccurError:"
landmarkType = "7">
</BreakpointContent>
@ -1022,8 +1022,8 @@ @@ -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">
<Locations>
@ -1070,8 +1070,8 @@ @@ -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">
</BreakpointContent>
@ -1086,8 +1086,8 @@ @@ -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">
</BreakpointContent>
@ -1150,8 +1150,8 @@ @@ -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">
</BreakpointContent>
@ -1390,8 +1390,8 @@ @@ -1390,8 +1390,8 @@
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "541"
endingLineNumber = "541"
startingLineNumber = "540"
endingLineNumber = "540"
landmarkName = "-handlePushMsg:"
landmarkType = "7">
</BreakpointContent>
@ -1406,8 +1406,40 @@ @@ -1406,8 +1406,40 @@
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "575"
endingLineNumber = "575"
startingLineNumber = "574"
endingLineNumber = "574"
landmarkName = "-handlePushMsg:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "8A62BD68-A792-44BB-A958-78DC957381CE"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "tongxin/ThirdPartyLib/LGAlertView/LGAlertView/LGAlertView.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "769"
endingLineNumber = "769"
landmarkName = "-initWithProgressViewAndTitle:message:style:progressLabelText:buttonTitles:cancelButtonTitle:destructiveButtonTitle:delegate:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "C3E30ADD-CE7F-455B-B587-C737CB9D2688"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "580"
endingLineNumber = "580"
landmarkName = "-handlePushMsg:"
landmarkType = "7">
</BreakpointContent>

7
tongxin/AppDelegate.m

@ -217,7 +217,6 @@ @@ -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 @@ -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 @@ -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];

4
tongxin/Helpers/myHelper.h

@ -58,10 +58,10 @@ @@ -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"

3
tongxin/Helpers/myHelper.m

@ -502,7 +502,8 @@ @@ -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];

2
tongxin/Info.plist

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>zuoyebang</string>
<string>zuoyebangwatch</string>
</array>
</dict>
<dict>

4
tongxin/PrefixHeader.pch

@ -111,8 +111,8 @@ @@ -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"

25
tongxin/ThirdPartyLib/LGAlertView/LGAlertView/LGAlertView.m

@ -892,14 +892,23 @@ LGAlertViewType; @@ -892,14 +892,23 @@ LGAlertViewType;
destructiveButtonTitle:(NSString *)destructiveButtonTitle
delegate:(id<LGAlertViewDelegate>)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 -

2
tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h

@ -55,7 +55,7 @@ @@ -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;

16
tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m

@ -15,12 +15,12 @@ @@ -15,12 +15,12 @@
@synthesize timestamp = _timestamp;
@synthesize avator = _avator;
+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{
@"Id":@"id",
};
}
//+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
//{
// return @{
// @"Id":@"id",
// };
//}
- (void)setType:(NSNumber *)type{
_type = type;
@ -258,7 +258,7 @@ @@ -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 @@ @@ -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"];

5
tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m

@ -133,11 +133,12 @@ static const CGFloat kXHUserNameLabelHeight = 12; @@ -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];
}
}

22
tongxin/VC/HomeMeg/Chat/ChatViewController.m

@ -209,7 +209,7 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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];

4
tongxin/VC/HomeMeg/HomeMessageViewController.m

@ -122,7 +122,8 @@ @@ -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 @@ @@ -133,6 +134,7 @@
infoCircle.devices = model.devices;
infoCircle.msgNum = model.msgNum;
vc.infoCircle = infoCircle;
vc.infoUser = cUser;
}
else
{

3
tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m

@ -64,7 +64,8 @@ @@ -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)
{

37
tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m

@ -481,19 +481,18 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -580,9 +583,7 @@
}];
}
[weakSelf dismissViewControllerAnimated:YES completion:^{
}];
}];
}
@ -601,6 +602,10 @@ @@ -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 服务即将过期回调

8
tongxin/VC/WatchHome/WatchHomeViewController.m

@ -189,13 +189,11 @@ @@ -189,13 +189,11 @@
[[UIApplication sharedApplication] registerForRemoteNotifications];
}
//上传更新版本到后台
[weakSelf upDataVersion];
[weakSelf viewWillAppear:YES];
}];
//上传更新版本到后台
[weakSelf upDataVersion];
//延迟2秒后订阅通知,不然会调用2viewWillAppear
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@ -291,7 +289,7 @@ @@ -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) {
//判断当前版本是否是最新版本, !! 提示更新 !!

2
tongxin/xBase/Model/DMessage.m

@ -46,7 +46,7 @@ @@ -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);
}
}

Loading…
Cancel
Save