diff --git a/tongxin.xcodeproj/project.pbxproj b/tongxin.xcodeproj/project.pbxproj index c23ff8d..a9c57e8 100644 --- a/tongxin.xcodeproj/project.pbxproj +++ b/tongxin.xcodeproj/project.pbxproj @@ -7246,7 +7246,7 @@ "$(PROJECT_DIR)/sdk/lib/ios", ); MACH_O_TYPE = mh_execute; - MARKETING_VERSION = 1.4.3; + MARKETING_VERSION = 1.4.5; "OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--generate-entitlement-der"; OTHER_LDFLAGS = ( "$(inherited)", @@ -7362,7 +7362,7 @@ "$(PROJECT_DIR)/tongxin/ThirdPartyLib/ShareSDK/ShareSDK/Support/PlatformSDK/WeChatSDK", "$(PROJECT_DIR)/sdk/lib/ios", ); - MARKETING_VERSION = 1.4.3; + MARKETING_VERSION = 1.4.5; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate index 751408d..e3c3161 100644 Binary files a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate and b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 2d5da46..e839af7 100644 --- a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -14,8 +14,8 @@ filePath = "tongxin/Helpers/myHttp/MyHttp.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "589" - endingLineNumber = "589" + startingLineNumber = "590" + endingLineNumber = "590" landmarkName = "-UploadPictureByFileName:Path:success:failure:" landmarkType = "7"> @@ -30,8 +30,8 @@ filePath = "tongxin/Helpers/myHttp/MyHttp.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "582" - endingLineNumber = "582" + startingLineNumber = "583" + endingLineNumber = "583" landmarkName = "-UploadPictureByFileName:Path:success:failure:" landmarkType = "7"> @@ -375,22 +375,6 @@ - - - - @@ -503,81 +487,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tongxin/Helpers/myHttp/MyHttp.m b/tongxin/Helpers/myHttp/MyHttp.m index 103ceea..b5e01ca 100644 --- a/tongxin/Helpers/myHttp/MyHttp.m +++ b/tongxin/Helpers/myHttp/MyHttp.m @@ -492,6 +492,7 @@ + (NSString *)getURL:(NSString *)URL objArr:(NSArray *)objArr { + __block NSString *urlStr = URL;//self.caInterface[@"prefix"]; NSArray *arr = @[@"[openid]",@"[imei]",@"[vendor]",@"[groupid]"]; @try { diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h index 066a500..9bda7c0 100755 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.h @@ -55,7 +55,6 @@ @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 1c4790b..50aa63a 100755 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Models/XHMessage.m @@ -15,13 +15,6 @@ @synthesize timestamp = _timestamp; @synthesize avator = _avator; -+ (NSDictionary *)modelCustomPropertyMapper -{ - return @{ - @"Id":@"id", - }; -} - - (void)setType:(NSNumber *)type{ _type = type; if ([type isEqualToNumber:@(10005)]) { @@ -257,7 +250,6 @@ _avatar = [aDecoder decodeObjectForKey:@"avatar"]; _avator = [aDecoder decodeObjectForKey:@"avator"]; - _Id = [aDecoder decodeObjectForKey:@"Id"]; _senderID = [aDecoder decodeObjectForKey:@"senderID"]; _timestamp = [aDecoder decodeObjectForKey:@"timestamp"]; @@ -293,7 +285,6 @@ [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 f275dea..a0a47f1 100644 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m @@ -132,11 +132,11 @@ static const CGFloat kXHUserNameLabelHeight = 20; - (void)transpond:(id)sender { DLog(@"Cell was transpond"); // 举报 - NSLog(@"消息id--%@",self.messageBubbleView.message.Id); + //NSLog(@"消息id--%@",self.messageBubbleView.message.msgId); 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/DeviceTab/ChatListViewController.m b/tongxin/VC/DeviceTab/ChatListViewController.m index d4e7765..9870338 100644 --- a/tongxin/VC/DeviceTab/ChatListViewController.m +++ b/tongxin/VC/DeviceTab/ChatListViewController.m @@ -57,12 +57,14 @@ } selectedCell:^(UITableView * _Nonnull tableView, NSIndexPath * _Nonnull indexPath) { ChatListModel *model = self.myDataSource[indexPath.row]; - + NSLog(@"%@",cUser.cDevice); ChatViewController *vc = [[ChatViewController alloc] init]; + vc.infoDevice = cUser.cDevice; vc.zx_navTitle = model.groupid ? @"家庭群聊" : model.name; vc.chatType = model.groupid ? 222: 111; if (model.groupid) { + vc.imei = cUser.cDevice.imei; Circle *infoCircle = [[Circle alloc] init]; infoCircle.groupid = model.groupid; infoCircle.creator = model.creator; @@ -70,6 +72,7 @@ infoCircle.devices = model.devices; infoCircle.msgNum = model.msgNum; vc.infoCircle = infoCircle; + vc.infoUser = cUser; } else { diff --git a/tongxin/VC/DeviceTab/DeviceTabViewController.m b/tongxin/VC/DeviceTab/DeviceTabViewController.m index ad731b7..2cae940 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) +// if(cUser.cDevice.support_video.intValue == 4 || cUser.cDevice.support_video.intValue == 5 || cUser.cDevice.support_video.intValue == 1) + if (cUser.cDevice.support_video && cUser.cDevice.support_video.intValue != 0) { [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.boolValue) { [menuTitleArr1 addObject:@"微聊"]; [menuImageArr1 addObject:@"icon_small_talk"]; diff --git a/tongxin/VC/More/Message/AttentionMessageViewController.m b/tongxin/VC/More/Message/AttentionMessageViewController.m index 960b329..af51bd6 100644 --- a/tongxin/VC/More/Message/AttentionMessageViewController.m +++ b/tongxin/VC/More/Message/AttentionMessageViewController.m @@ -24,6 +24,10 @@ [super viewWillAppear:animated]; [self loadMoreDataWithDMessage:nil]; } +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; + [SVProgressHUD dismiss]; +} - (void)viewDidLoad { [super viewDidLoad]; @@ -77,9 +81,6 @@ } cancelHandler:nil destructiveHandler:nil]; [alertView showAnimated:YES completionHandler:nil]; - - - } - (void)loadMoreDataWithDMessage:(DMessage *)dMessage{ @@ -230,8 +231,10 @@ [params setValue:dMessage.id forKey:@"id"]; [params setValue:@(ifAgree) forKey:@"agree"]; + [SVProgressHUD showInfoWithStatus:@"正在处理"]; [DMessage manageAttentionWithParams:params success:^{ //刷新数据 + [SVProgressHUD dismiss]; [weakSelf.myDataSource removeAllObjects]; [weakSelf.listDataSoure removeAllObjects]; [weakSelf.dateArr removeAllObjects]; diff --git a/tongxin/VC/More/Set/ChangePasswordViewController.m b/tongxin/VC/More/Set/ChangePasswordViewController.m index a190697..9bff7e2 100644 --- a/tongxin/VC/More/Set/ChangePasswordViewController.m +++ b/tongxin/VC/More/Set/ChangePasswordViewController.m @@ -79,7 +79,7 @@ success:^(NSURLSessionDataTask *task, id responseObject) { if ([responseObject[@"code"] intValue] == HTTP_SUCCESS) { - [SVProgressHUD showErrorWithStatus:@"修改成功,请重新登录"]; + [SVProgressHUD showSuccessWithStatus:@"修改成功,请重新登录"]; [User setCurrentUser:nil]; if (!cUser) { @@ -87,11 +87,10 @@ [UserDefaults setBool:NO forKey:kifRememberPWDKey]; [UserDefaults removeObjectForKey:@"lastpwd"]; - [SVProgressHUD dismissWithDelay:1 - completion:^{ - [[NSNotificationCenter defaultCenter] postNotificationName:@"outLogin" - object:nil]; - }]; + [SVProgressHUD dismissWithDelay:1 completion:^{ + [self.navigationController popToRootViewControllerAnimated:YES]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"outLogin" object:nil]; + }]; } } } failure:^(NSURLSessionDataTask *task, NSError *error) {}]; diff --git a/tongxin/VC/WatchHome/Chat/ChatViewController.h b/tongxin/VC/WatchHome/Chat/ChatViewController.h index c4ab710..7c0da8d 100644 --- a/tongxin/VC/WatchHome/Chat/ChatViewController.h +++ b/tongxin/VC/WatchHome/Chat/ChatViewController.h @@ -14,6 +14,9 @@ @property (strong, nonatomic) Circle *infoCircle; + +@property (strong, nonatomic) Device *infoDevice; + ///// 群聊单聊类型区分 111:单聊 222:群聊 //@property (nonatomic ,assign) NSInteger chatType; diff --git a/tongxin/VC/WatchHome/Chat/ChatViewController.m b/tongxin/VC/WatchHome/Chat/ChatViewController.m index 14b2711..a74f8d4 100644 --- a/tongxin/VC/WatchHome/Chat/ChatViewController.m +++ b/tongxin/VC/WatchHome/Chat/ChatViewController.m @@ -207,7 +207,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) @@ -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]; diff --git a/tongxin/VC/WatchHome/Family/FamilyViewController.m b/tongxin/VC/WatchHome/Family/FamilyViewController.m index b089cf7..2ae1f05 100644 --- a/tongxin/VC/WatchHome/Family/FamilyViewController.m +++ b/tongxin/VC/WatchHome/Family/FamilyViewController.m @@ -47,7 +47,7 @@ - (void)viewDidLoad { [super viewDidLoad]; [self setRightBarBtnTitle:nil RoImage:[UIImage imageNamed:@"icon_delete"]]; - [self setTitle:@"情号码"]; + [self setTitle:@"亲情号码"]; // CGRect newFrame = self.myTableView.frame; // newFrame.size.height = newFrame.size.height - 45 - 22; self.myTableView.frame = CGRectMake(0, iPhoneX_NavHeight, ScreenWidth, ScreenHeight-iPhoneX_NavHeight-76); diff --git a/tongxin/VC/WatchHome/Family/SelectFamilyContactViewController.m b/tongxin/VC/WatchHome/Family/SelectFamilyContactViewController.m index f842674..ed912e7 100644 --- a/tongxin/VC/WatchHome/Family/SelectFamilyContactViewController.m +++ b/tongxin/VC/WatchHome/Family/SelectFamilyContactViewController.m @@ -82,8 +82,8 @@ self.title = @"修改亲情号"; } - _menu1OptionTitles = cUser.cDevice.support_family && cUser.cDevice.support_family.intValue == 1 ? @[@"1",@"2",@"3"] : @[@"1",@"2",@"3",@"4"]; - _menu1OptionIcons = cUser.cDevice.support_family && cUser.cDevice.support_family.intValue == 1 ? @[@"icon_to_enable",@"icon_to_enable",@"icon_to_enable"] : @[@"icon_to_enable",@"icon_to_enable",@"icon_to_enable",@"icon_to_enable"]; + _menu1OptionTitles = cUser.cDevice.deviceType.intValue != 2 ? @[@"1",@"2",@"3"] : @[@"1",@"2",@"3",@"4"]; + _menu1OptionIcons = cUser.cDevice.deviceType.intValue != 2 ? @[@"icon_to_enable",@"icon_to_enable",@"icon_to_enable"] : @[@"icon_to_enable",@"icon_to_enable",@"icon_to_enable",@"icon_to_enable"]; self.apiFamily = [[FamilyContact alloc] init]; [self.view setBackgroundColor:[UIColor whiteColor]]; diff --git a/tongxin/VC/WatchHome/NewHomeVC/HomeHeaderTableView.m b/tongxin/VC/WatchHome/NewHomeVC/HomeHeaderTableView.m index f4e72ac..ed7fbcb 100644 --- a/tongxin/VC/WatchHome/NewHomeVC/HomeHeaderTableView.m +++ b/tongxin/VC/WatchHome/NewHomeVC/HomeHeaderTableView.m @@ -158,7 +158,8 @@ [titleArray addObject:@"上课禁用"]; [imageArray addObject:@"icon_disabled"]; } - if(cUser.cDevice.support_video) +// if(cUser.cDevice.support_video.intValue == 4 || cUser.cDevice.support_video.intValue == 5 || cUser.cDevice.support_video.intValue == 1) + if (cUser.cDevice.support_video && cUser.cDevice.support_video.intValue != 0) { [titleArray addObject:@"视频通话"]; [imageArray addObject:@"icon_home_video_call"]; diff --git a/tongxin/xBase/Model/Circle.m b/tongxin/xBase/Model/Circle.m index 2a64555..4d721f1 100644 --- a/tongxin/xBase/Model/Circle.m +++ b/tongxin/xBase/Model/Circle.m @@ -66,8 +66,10 @@ #pragma 获取圈详情 - (void)getCircleInfoSuccess:(void (^)())success failure:(void (^)())failure{ - NSString *urlStr = [MyHttp getURL:HTTP_CHATGROUPS__ - objArr:@[self]]; +// NSString *urlStr = [MyHttp getURL:HTTP_CHATGROUPS__ +// objArr:@[self]]; + + NSString *urlStr = [NSString stringWithFormat:@"getway/chatGroups/%@",self.groupid]; [xMyHttp URL:urlStr method:@"GET" parameters:@{} @@ -90,8 +92,9 @@ #pragma 获取圈邀请码 - (void)getCircleInviteTokenSuccess:(void (^)(id responseObject))success failure:(void (^)())failure{ - NSString *urlStr = [MyHttp getURL:HTTP_CHATGROUPS__INVITETOKEN - objArr:@[self]]; +// NSString *urlStr = [MyHttp getURL:HTTP_CHATGROUPS__INVITETOKEN objArr:@[self]]; + + NSString *urlStr = [NSString stringWithFormat:@"getway/chatGroups/%@/inviteToken",self.groupid]; NSMutableDictionary *param = [NSMutableDictionary dictionary]; [param setValue:TargetName forKey:@"channel"]; @@ -118,8 +121,10 @@ success:(void (^)(id responseObject))success failure:(void (^)())failure { - NSString *urlStr = [MyHttp getURL:HTTP_CHATGROUPS__MESSAGE - objArr:@[self]]; +// NSString *urlStr = [MyHttp getURL:HTTP_CHATGROUPS__MESSAGE +// objArr:@[self]]; + + NSString *urlStr = [NSString stringWithFormat:@"getway/chatGroups/%@/message",self.groupid]; NSLog(@"get msg url = %@", urlStr); @@ -203,8 +208,10 @@ success:(void (^)(id responseObject))success failure:(void (^)())failure{ - NSString *urlStr = [MyHttp getURL:HTTP_CHATGROUPS__MESSAGE - objArr:@[self]]; +// NSString *urlStr = [MyHttp getURL:HTTP_CHATGROUPS__MESSAGE +// objArr:@[self]]; + + NSString *urlStr = [NSString stringWithFormat:@"getway/chatGroups/%@/message",self.groupid]; NSData *data = parameters[@"content"]; diff --git a/tongxin/xBase/Model/Device.h b/tongxin/xBase/Model/Device.h index 1589d9f..5499a89 100644 --- a/tongxin/xBase/Model/Device.h +++ b/tongxin/xBase/Model/Device.h @@ -20,275 +20,276 @@ @interface Device : baseModel -@property (nonatomic, strong) NSNumber *vendor; -@property (nonatomic, strong) NSString *imei; -@property (nonatomic, strong) NSNumber *accountNum;//设备绑定的用户数量 -@property (nonatomic, strong) NSMutableArray *chatGroupList;//设备绑定的用户数量 -@property (nonatomic, strong) NSString *authcode;//注册码 +@property (nonatomic, copy) NSNumber *vendor; +@property (nonatomic, copy) NSString *imei; +@property (nonatomic, copy) NSNumber *accountNum;//设备绑定的用户数量 +@property (nonatomic, copy) NSMutableArray *chatGroupList;//设备绑定的用户数量 +@property (nonatomic, copy) NSString *authcode;//注册码 -@property (nonatomic, strong) NSString *mac; -@property (nonatomic, strong) NSMutableArray *contacts; -//@property (nonatomic, strong) NSMutableArray *locations; +@property (nonatomic, copy) NSString *mac; +@property (nonatomic, copy) NSMutableArray *contacts; +//@property (nonatomic, copy) NSMutableArray *locations; -@property (nonatomic, strong) NSNumber *voltage; +@property (nonatomic, copy) NSNumber *voltage; -@property (nonatomic, strong) NSNumber *lock; +@property (nonatomic, copy) NSNumber *lock; -@property (nonatomic, strong) NSNumber *step; +@property (nonatomic, copy) NSNumber *step; -@property (nonatomic, strong) NSMutableArray *alerts; +@property (nonatomic, copy) NSMutableArray *alerts; -@property (nonatomic ,strong) NSNumber *opRejectStrangeCall;//设置腕表是否拒绝陌生人来电 -@property (nonatomic ,strong) NSNumber *opMonitor;//设置监听腕表 -@property (nonatomic ,strong) NSString *opMonitorPhone;//设置腕表定位模式 +@property (nonatomic ,copy) NSNumber *opRejectStrangeCall;//设置腕表是否拒绝陌生人来电 +@property (nonatomic ,copy) NSNumber *opMonitor;//设置监听腕表 +@property (nonatomic ,copy) NSString *opMonitorPhone;//设置腕表定位模式 -@property (nonatomic ,strong) NSNumber *opSettingVolume;//设置腕表音量等级 +@property (nonatomic ,copy) NSNumber *opSettingVolume;//设置腕表音量等级 -@property (nonatomic ,strong) NSNumber *opFlower;//设置和获取属性 腕表小红花奖励个数 +@property (nonatomic ,copy) NSNumber *opFlower;//设置和获取属性 腕表小红花奖励个数 -@property (nonatomic ,strong) NSNumber *opLocationMode;//设置腕表定位频率值 // MARK: update by lsz 2021-06-23 +@property (nonatomic ,copy) NSNumber *opLocationMode;//设置腕表定位频率值 // MARK: update by lsz 2021-06-23 -@property (nonatomic, strong) NSString *location_model1; // 省电模式 -@property (nonatomic, strong) NSString *location_model2; // 正常模式 -@property (nonatomic, strong) NSString *location_model3; // 低频模式 +@property (nonatomic, copy) NSString *location_model1; // 省电模式 +@property (nonatomic, copy) NSString *location_model2; // 正常模式 +@property (nonatomic, copy) NSString *location_model3; // 低频模式 -@property (nonatomic, strong) NSNumber *location_interval1; // 省电模式定位频率 -@property (nonatomic, strong) NSNumber *location_interval2; // 正常模式定位频率 -@property (nonatomic, strong) NSNumber *location_interval3; // 低频模式定位频率 -@property (nonatomic, strong) NSString *model; // 设备型号 -@property (nonatomic, strong) NSNumber *deviceType; // 设备类型 +@property (nonatomic, copy) NSNumber *location_interval1; // 省电模式定位频率 +@property (nonatomic, copy) NSNumber *location_interval2; // 正常模式定位频率 +@property (nonatomic, copy) NSNumber *location_interval3; // 低频模式定位频率 +@property (nonatomic, copy) NSString *model; // 设备型号 +@property (nonatomic, copy) NSNumber *deviceType; // 设备类型 -@property (nonatomic, strong) NSNumber *opDialSwitch; // 拨号盘 +@property (nonatomic, copy) NSNumber *opDialSwitch; // 拨号盘 /** 是否支持视频通话 0声网 4 菊风 5 佰锐 6 鹈鹕 */ -@property (nonatomic, strong) NSNumber *support_video; +@property (nonatomic, copy) NSNumber *support_video; /** 是否支持远程拍照 */ -@property (nonatomic, strong) NSNumber *support_photo; +@property (nonatomic, copy) NSNumber *support_photo; /** 是否支持计步功能 */ -@property (nonatomic, strong) NSNumber *support_step; +@property (nonatomic, copy) NSNumber *support_step; /** 是否支持查找设备 */ -@property (nonatomic, strong) NSNumber *support_find; +@property (nonatomic, copy) NSNumber *support_find; /** 是否支持查询流量话费 */ -@property (nonatomic, strong) NSNumber *support_costFlow; +@property (nonatomic, copy) NSNumber *support_costFlow; /** 是否支持设置爱心奖励 */ -@property (nonatomic, strong) NSNumber *support_flower; +@property (nonatomic, copy) NSNumber *support_flower; /** 是否支持设置设备WIFI */ -@property (nonatomic, strong) NSNumber *support_wifi; +@property (nonatomic, copy) NSNumber *support_wifi; /** 是否支持定时开关机 */ -@property (nonatomic, strong) NSNumber *support_timingSwitch; +@property (nonatomic, copy) NSNumber *support_timingSwitch; /** 是否支持体温 */ -@property (nonatomic, strong) NSNumber *support_temperature; +@property (nonatomic, copy) NSNumber *support_temperature; /** 是否支持心率 */ -@property (nonatomic, strong) NSNumber *support_heartRate; +@property (nonatomic, copy) NSNumber *support_heartRate; /** 是否支持白名单 */ -@property (nonatomic, strong) NSNumber *support_whiteList; +@property (nonatomic, copy) NSNumber *support_whiteList; /** 是否支持火火兔白名单删除功能 */ -@property (nonatomic, strong) NSNumber *support_hht; +@property (nonatomic, copy) NSNumber *support_hht; /** 是否支持表盘中心 */ -@property (nonatomic, strong) NSNumber *support_downDial; +@property (nonatomic, copy) NSNumber *support_downDial; /** 是否支持监听 */ -@property (nonatomic, strong) NSNumber *support_monitor; +@property (nonatomic, copy) NSNumber *support_monitor; /** 是否支持闹钟 */ -@property (nonatomic, strong) NSNumber *support_alarm; +@property (nonatomic, copy) NSNumber *support_alarm; /** 是否支持上课禁用 */ -@property (nonatomic, strong) NSNumber *support_disturb; +@property (nonatomic, copy) NSNumber *support_disturb; /** 是否支持SOS号码 */ -@property (nonatomic, strong) NSNumber *support_sos; +@property (nonatomic, copy) NSNumber *support_sos; /** 是否支持血压 */ -@property (nonatomic, strong) NSNumber *support_blood; +@property (nonatomic, copy) NSNumber *support_blood; /** 是否支持血氧 */ -@property (nonatomic, strong) NSNumber *support_oxygen; +@property (nonatomic, copy) NSNumber *support_oxygen; /** 是否支持拨号盘 */ -@property (nonatomic, strong) NSNumber *support_callPhone; +@property (nonatomic, copy) NSNumber *support_callPhone; /** 是否支持电子围栏 */ -@property (nonatomic, strong) NSNumber *support_safeArea; +@property (nonatomic, copy) NSNumber *support_safeArea; /** 是否支持微聊 */ -@property (nonatomic, strong) NSNumber *support_chat; +@property (nonatomic, copy) NSNumber *support_chat; /** 是否支持碰碰交友 */ -@property (nonatomic, strong) NSNumber *support_ppFriend; +@property (nonatomic, copy) NSNumber *support_ppFriend; /** 是否支持课程表 */ -@property (nonatomic, strong) NSNumber *support_schedul; +@property (nonatomic, copy) NSNumber *support_schedul; + /** 设备的电量 */ -@property (nonatomic ,strong) NSNumber *battery; +@property (nonatomic ,copy) NSNumber *battery; /** 设备的最大电量格数 (旧设备没有) */ -@property (nonatomic ,strong) NSNumber *max_level; +@property (nonatomic ,copy) NSNumber *max_level; /// 类型 -@property (nonatomic ,strong) NSString *modules; +@property (nonatomic ,copy) NSString *modules; /** 亲情号 */ -@property (nonatomic ,strong) NSNumber *support_family; +@property (nonatomic ,copy) NSNumber *support_family; /** jjm */ -@property (nonatomic ,strong) NSNumber *support_healthCode; +@property (nonatomic ,copy) NSNumber *support_healthCode; ///jjmTitle -@property (nonatomic ,strong) NSString *qrcodeCN; +@property (nonatomic ,copy) NSString *qrcodeCN; /// 是否支持设备防丢 -@property (nonatomic ,strong) NSNumber *support_BT_Avoid_Losing; +@property (nonatomic ,copy) NSNumber *support_BT_Avoid_Losing; /// 是否支持短信 -@property (nonatomic ,strong) NSNumber *support_sms; +@property (nonatomic ,copy) NSNumber *support_sms; /// 是否支持核酸码 -@property (nonatomic ,strong) NSNumber *support_hsCode; +@property (nonatomic ,copy) NSNumber *support_hsCode; /// 是否支持应用管理 -@property (nonatomic ,strong) NSNumber *support_appControl; +@property (nonatomic ,copy) NSNumber *support_appControl; /** 设备是否在线 */ -@property (nonatomic ,strong) NSNumber *onlineStatus; +@property (nonatomic ,copy) NSNumber *onlineStatus; /** 设备的当前电量格数 (旧设备没有) */ -@property (nonatomic ,strong) NSNumber *curr_level; +@property (nonatomic ,copy) NSNumber *curr_level; -@property (nonatomic, strong) NSNumber *upDownNotice; +@property (nonatomic, copy) NSNumber *upDownNotice; -@property (nonatomic, strong) NSNumber *fall_status; +@property (nonatomic, copy) NSNumber *fall_status; -@property (nonatomic, strong) NSString *gps_strategy; +@property (nonatomic, copy) NSString *gps_strategy; -@property (nonatomic, strong) Locate *lastLocation; +@property (nonatomic, copy) Locate *lastLocation; /** 性别 女孩 girl , 男孩 man default 30 girl */ -@property (nonatomic, strong) NSString *sex; +@property (nonatomic, copy) NSString *sex; /** 生日 default now day */ -@property (nonatomic, strong) NSString *birthday; +@property (nonatomic, copy) NSString *birthday; /** 身高 default 100 */ -@property (nonatomic, strong) NSString *height; +@property (nonatomic, copy) NSString *height; /** 体重 default 30 */ -@property (nonatomic, strong) NSString *weight; +@property (nonatomic, copy) NSString *weight; /** 该用户绑定设备的 我的电话号码 */ -@property (nonatomic, strong) NSString *my_phone; +@property (nonatomic, copy) NSString *my_phone; /** 该用户对于 该 设备 的 身份 */ -@property (nonatomic, strong) NSString *identity; +@property (nonatomic, copy) NSString *identity; /** 关系 情况 eg : 妈妈,爸爸,爷爷 ... default 亲人 */ -@property (nonatomic, strong) NSString * relationship; +@property (nonatomic, copy) NSString * relationship; /** 关系的 ID default 9 */ -@property (nonatomic, strong) NSNumber * relationship_image_id; +@property (nonatomic, copy) NSNumber * relationship_image_id; /** 设备最近一次心率 */ -@property (nonatomic, strong) NSString *lastHeartRate; +@property (nonatomic, copy) NSString *lastHeartRate; /** 设备最近一次心率时间 */ -@property (nonatomic, strong) NSNumber *lastHeartRateTime; +@property (nonatomic, copy) NSNumber *lastHeartRateTime; /** 设备最近一次体温 */ -@property (nonatomic, strong) NSString *lastTemperature; +@property (nonatomic, copy) NSString *lastTemperature; /** 设备最近一次体温时间 */ -@property (nonatomic, strong) NSNumber *lastTemperatureTime; +@property (nonatomic, copy) NSNumber *lastTemperatureTime; - (UIImage *)getImageWithRim:(CGSize)size; diff --git a/tongxin/xBase/Model/Device.m b/tongxin/xBase/Model/Device.m index 81726c7..9ec45a7 100644 --- a/tongxin/xBase/Model/Device.m +++ b/tongxin/xBase/Model/Device.m @@ -441,6 +441,7 @@ failure:(void (^)(void))failure{ NSString *urlStr = [MyHttp getURL:HTTP_DEVICES__VIDEO_USER_LIST objArr:@[self]]; + NSLog(@"%@",cUser.cDevice); [xMyHttp URL:urlStr method:@"GET" parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) @@ -706,7 +707,7 @@ success(responseObject); } else { if (failure) { - NSString *domain = @"com.zuoyebang.iot.watch"; + NSString *domain = @"com.ecellsz.lekang.guard"; NSDictionary *userInfo = @{@"msg" : responseObject[@"msg"]}; NSError *err = [NSError errorWithDomain:domain code:-1 userInfo:userInfo]; failure(err); @@ -734,7 +735,7 @@ success(responseObject); } else { if (failure) { - NSString *domain = @"com.zuoyebang.iot.watch"; + NSString *domain = @"com.ecellsz.lekang.guard"; NSDictionary *userInfo = @{@"msg" : responseObject[@"msg"]}; NSError *err = [NSError errorWithDomain:domain code:-1 userInfo:userInfo]; failure(err); diff --git a/tongxin/xBase/Model/User.h b/tongxin/xBase/Model/User.h index 3d9d5ff..d3a8dee 100755 --- a/tongxin/xBase/Model/User.h +++ b/tongxin/xBase/Model/User.h @@ -22,28 +22,28 @@ /** 菊风SDK的Key */ -@property (nonatomic, strong) NSString *juphoonKey; +@property (nonatomic, copy) NSString *juphoonKey; -@property (nonatomic, strong) NSString *openid; -@property (nonatomic, strong) NSString *accesstoken; +@property (nonatomic, copy) NSString *openid; +@property (nonatomic, copy) NSString *accesstoken; -@property (nonatomic, strong) NSMutableArray *myDevices; -@property (nonatomic, strong) NSMutableArray *ownedDevices; -@property (nonatomic, strong) NSMutableArray *chatGroupDevices; +@property (nonatomic, copy) NSMutableArray *myDevices; +@property (nonatomic, copy) NSMutableArray *ownedDevices; +@property (nonatomic, copy) NSMutableArray *chatGroupDevices; -@property (nonatomic, strong) NSMutableArray *chatGroups; +@property (nonatomic, copy) NSMutableArray *chatGroups; //@property (nonatomic, strong) NSMutableArray *myFamily;//家庭成员 -@property (nonatomic, strong) Device *cDevice; +@property (nonatomic, copy) Device *cDevice; //@property (nonatomic, strong) NSNumber *locate_offset; -@property (nonatomic, strong) NSString *user_email; -@property (nonatomic, strong) NSNumber *share_locate; +@property (nonatomic, copy) NSString *user_email; +@property (nonatomic, copy) NSNumber *share_locate; /** 公众号模板消息开关状态(打开:1,关闭:0,未关注公众号:2) @@ -52,35 +52,35 @@ //@property (nonatomic, strong) NSMutableArray *myDevice; -@property (nonatomic, strong) NSMutableArray *questions; +@property (nonatomic, copy) NSMutableArray *questions; -@property (nonatomic, strong) CLLocation *curLocation; +@property (nonatomic, copy) CLLocation *curLocation; /** 登录时的账号名称 或者 适用 imei号登录时的imei号 用 位数 区分 15,14,10 (imei) 11 (手机号) */ -@property (nonatomic, strong) NSString *loginName; +@property (nonatomic, copy) NSString *loginName; /** 微信登录时, 这个是 微信的 昵称 */ -@property (nonatomic, strong) NSString *wx_name; +@property (nonatomic, copy) NSString *wx_name; /** 是否绑定了微信 无 0 有 1 */ -@property (nonatomic, strong) NSNumber *wx_status; +@property (nonatomic, copy) NSNumber *wx_status; /** 是(1)否(0)手机账号登录 */ -@property (nonatomic, strong) NSNumber *account_status; -@property (nonatomic, strong) NSString *wxid; -@property (nonatomic, strong) NSString *qqid; +@property (nonatomic, copy) NSNumber *account_status; +@property (nonatomic, copy) NSString *wxid; +@property (nonatomic, copy) NSString *qqid; /** 佰锐视频信息 */ -@property (nonatomic, strong) NSString *BRVideoKey; -@property (nonatomic, strong) NSNumber *bairui_id; +@property (nonatomic, copy) NSString *BRVideoKey; +@property (nonatomic, copy) NSNumber *bairui_id; diff --git a/tongxin/xBase/Model/baseModel.h b/tongxin/xBase/Model/baseModel.h index cac6139..da59d8d 100644 --- a/tongxin/xBase/Model/baseModel.h +++ b/tongxin/xBase/Model/baseModel.h @@ -16,7 +16,7 @@ -@interface baseModel : NSObject +@interface baseModel : NSObject @property (nonatomic, strong) NSString *id; @property (nonatomic, strong) NSNumber *status; diff --git a/tongxin/xBase/Model/baseModel.m b/tongxin/xBase/Model/baseModel.m index 7af4c56..7205522 100644 --- a/tongxin/xBase/Model/baseModel.m +++ b/tongxin/xBase/Model/baseModel.m @@ -56,4 +56,35 @@ } } +- (void)encodeWithCoder:(NSCoder *)aCoder +{ + [self yy_modelEncodeWithCoder:aCoder]; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + self = [super init]; + return [self yy_modelInitWithCoder:aDecoder]; +} + +- (id)copyWithZone:(NSZone *)zone +{ + return [self yy_modelCopy]; +} + +- (NSUInteger)hash +{ + return [self yy_modelHash]; +} + +- (BOOL)isEqual:(id)object +{ + return [self yy_modelIsEqual:object]; +} + +- (NSString *)description +{ + return [self yy_modelDescription]; +} + @end