Browse Source

【代码优化】新增是否是零售商功能,零售商隐藏校园通知,作业通知,小红花,绑定设备,修改设备信息隐藏班级,年级,学校

master
公司电脑 1 year ago
parent
commit
e69c17e033
  1. BIN
      LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate
  2. 38
      LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 22
      LekangGuard/Assets.xcassets/meunImg/icon_wechat.imageset/Contents.json
  4. BIN
      LekangGuard/Assets.xcassets/meunImg/icon_wechat.imageset/icon_wechat@2x.png
  5. BIN
      LekangGuard/Assets.xcassets/meunImg/icon_wechat.imageset/icon_wechat@3x.png
  6. 14
      LekangGuard/Home/Chat(微聊)/ChatViewController.m
  7. 66
      LekangGuard/Home/Homes/AddWatchViewController.m
  8. 12
      LekangGuard/Home/Homes/HomeViewController.m
  9. 3
      LekangGuard/Home/Homes/Model/DeviceModel.h
  10. 12
      LekangGuard/Home/Homes/Model/ScanCodeModel.h
  11. 1
      LekangGuard/Home/Homes/SelectContactViewController.m
  12. 9
      LekangGuard/Home/Homes/View/HomeHeaderView.m
  13. 50
      LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m
  14. 3
      LekangGuard/Home/MoreService (更多功能)/View/FunctionView.h
  15. 13
      LekangGuard/Home/MoreService (更多功能)/View/FunctionView.m
  16. 3
      LekangGuard/Home/MoreService (更多功能)/View/MenuCollectionViewCell.h
  17. 36
      LekangGuard/Home/MoreService (更多功能)/View/MenuCollectionViewCell.m
  18. 10
      LekangGuard/Managers/UIURL.h
  19. 13
      LekangGuard/My/VC/MyViewController.m
  20. 24
      LekangGuard/Protection(守护星)/VC/ProtectionViewController.m
  21. 2
      Pods/MSNetwork/MSNetwork/MSNetwork.m

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

Binary file not shown.

38
LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -286,9 +286,9 @@ @@ -286,9 +286,9 @@
filePath = "LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "495"
endingLineNumber = "495"
landmarkName = "-imagePickerController:didFinishPickingMediaWithInfo:"
startingLineNumber = "509"
endingLineNumber = "509"
landmarkName = "-DeviceMsgView"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
@ -530,6 +530,38 @@ @@ -530,6 +530,38 @@
endingLineNumber = "123"
landmarkName = "-GetUnReadTotal"
landmarkType = "7">
<Locations>
<Location
uuid = "40251BFA-978B-4247-8F47-34E947EF01E7 - ced9b8a354112dfc"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "__39-[MessageViewController GetUnReadTotal]_block_invoke"
moduleName = "ECell care"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/ecell/huaxun/LekangGuard/My/Message(%E6%B6%88%E6%81%AF)/MessageViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "123"
endingLineNumber = "123"
offsetFromSymbolStart = "144">
</Location>
<Location
uuid = "40251BFA-978B-4247-8F47-34E947EF01E7 - 6018df1250e4134a"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "__39-[MessageViewController GetUnReadTotal]_block_invoke_2"
moduleName = "ECell care"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/ecell/huaxun/LekangGuard/My/Message(%E6%B6%88%E6%81%AF)/MessageViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "124"
endingLineNumber = "124"
offsetFromSymbolStart = "80">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy

22
LekangGuard/Assets.xcassets/meunImg/icon_wechat.imageset/Contents.json vendored

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icon_wechat@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icon_wechat@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

BIN
LekangGuard/Assets.xcassets/meunImg/icon_wechat.imageset/icon_wechat@2x.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
LekangGuard/Assets.xcassets/meunImg/icon_wechat.imageset/icon_wechat@3x.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

14
LekangGuard/Home/Chat(微聊)/ChatViewController.m

@ -171,6 +171,7 @@ @@ -171,6 +171,7 @@
message.senderID = APIManager.sharedManager.loginModel.openid;
[self wavToAmr:voicePath];
[self amrToWav:voicePath];
voicePath = [CJFileUtility changeFileExt:voicePath ext:@"amr"];
kWeakSelf(self)
@ -178,6 +179,7 @@ kWeakSelf(self) @@ -178,6 +179,7 @@ kWeakSelf(self)
[parameters setValue:@(voiceDuration.integerValue) forKey:@"duration"];
[parameters setValue:APIManager.sharedManager.deviceModel.groupid forKey:@"groupId"];
[parameters setValue:@(3) forKey:@"myType"];
[parameters setValue:@([self sizeAtPath:voicePath]) forKey:@"size"];
// [parameters setValue:@"" forKey:@"content"];
[[[APIManager sharedManager] uploadFileWithURL:AddChat_URL parameters:parameters filePath:voicePath fileData:nil] subscribeNext:^(NSArray *x) {
@ -372,7 +374,7 @@ kWeakSelf(self) @@ -372,7 +374,7 @@ kWeakSelf(self)
[[[APIManager sharedManager] APGET:UpdateById_URL parameters:parameters resultClass:nil] subscribeNext:^(id _Nullable x) {
[UICommon HidenLoading];
message.isRead = YES;
self.messageCoutnUpdata();
//self.messageCoutnUpdata();
} error:^(NSError * _Nullable error) {
NSDictionary *dic = error.userInfo;
[UICommon MessageErrorText:dic[NSLocalizedDescriptionKey]];
@ -460,7 +462,15 @@ kWeakSelf(self) @@ -460,7 +462,15 @@ kWeakSelf(self)
}
}
// 文件的大小(字节)
- (unsigned long long)sizeAtPath:(NSString *)filePath
{
NSFileManager *manager = [NSFileManager defaultManager];
if ([manager fileExistsAtPath:filePath]){
return [[manager attributesOfItemAtPath:filePath error:nil] fileSize];
}
return 0;
}
@end

66
LekangGuard/Home/Homes/AddWatchViewController.m

@ -54,13 +54,26 @@ @@ -54,13 +54,26 @@
/// 设备信息View
- (void)DeviceMsgView
{
NSArray *titleArr = @[GJText(@"头像"),
GJText(@"名称"),
GJText(@"性别"),
GJText(@"学校"),
GJText(@"年级"),
GJText(@"班级"),
GJText(@"设备电话号码")];
NSArray *titleArr;
if (self.model.virtualFlag)
{
titleArr = @[GJText(@"头像"),
GJText(@"名称"),
GJText(@"性别"),
GJText(@"设备电话号码")];
}
else
{
titleArr = @[GJText(@"头像"),
GJText(@"名称"),
GJText(@"性别"),
GJText(@"学校"),
GJText(@"年级"),
GJText(@"班级"),
GJText(@"设备电话号码")];
}
UIView *bgView = [UICommon ui_view:CGRectZero backgroundColor:KKWhiteColorColor cornerRadius:0 borderWidth:0 borderColor:KKClearColor];
[self.view addSubview:bgView];
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
@ -111,7 +124,7 @@ @@ -111,7 +124,7 @@
else if (i != 0 && i != 2)
{
/// 姓名和电话号码
UITextField *textfield = [UICommon ui_textField:CGRectZero textColor:KKTextBlackColor backColor:KKClearColor font:FontADA_(13) maxTextNum:i == titleArr.count-1 ? 11 : 20 placeholderColor:KKGrey143 placeholder:GJText(@"请输入设备电话号码") toMaxNum:^(UITextField *textField) {
UITextField *textfield = [UICommon ui_textField:CGRectZero textColor:KKTextBlackColor backColor:KKClearColor font:FontADA_(13) maxTextNum:i == titleArr.count-1 ? 11 : 20 placeholderColor:KKGrey143 placeholder:i == 1 ? GJText(@"请输入名称") : GJText(@"请输入设备电话号码") toMaxNum:^(UITextField *textField) {
} change:^(UITextField *textField) {
@ -121,20 +134,28 @@ @@ -121,20 +134,28 @@
textfield.textColor = KKGrey143;
if (i == 1)
{
if (self.model.virtualFlag)
{
textfield.enabled = YES;
textfield.textColor = KKTextBlackColor;
}
textfield.text = self.model.name;
self.nameField = textfield;
}
if (i == 3)
{
textfield.text = self.model.schName;
}
if (i == 4)
if (!self.model.virtualFlag)
{
textfield.text = self.model.gradeName;
}
if (i == 5)
{
textfield.text = self.model.className;
if (i == 3)
{
textfield.text = self.model.schName;
}
if (i == 4)
{
textfield.text = self.model.gradeName;
}
if (i == 5)
{
textfield.text = self.model.className;
}
}
if (i == titleArr.count-1)
{
@ -153,7 +174,7 @@ @@ -153,7 +174,7 @@
make.height.mas_equalTo(Adapted(44));
}];
}
else
else if (i == 2)
{
/// 性别
NSArray *sexArr = @[GJText(@"男"),
@ -333,6 +354,13 @@ @@ -333,6 +354,13 @@
[parameters setValue:@(self.relationshipId) forKey:@"relationshipId"];
[parameters setValue:@(self.sex) forKey:@"sex"];
[parameters setValue:self.weightBtn.currentTitle forKey:@"weight"];
[parameters setValue:@(self.model.virtualFlag) forKey:@"virtualFlag"];
if (self.model.virtualFlag)
{
[parameters setValue:self.model.schId forKey:@"schId"];
[parameters setValue:self.model.gradeId forKey:@"gradeId"];
[parameters setValue:self.model.classId forKey:@"classId"];
}
[[[APIManager sharedManager] uploadImageWithURL:AddDevice_URL parameters:parameters images:@[self.iconBtn.currentImage]] subscribeNext:^(id _Nullable x) {
[UICommon HidenLoading];
[UICommon MessageSuccessText:@"添加成功"];

12
LekangGuard/Home/Homes/HomeViewController.m

@ -181,6 +181,11 @@ @@ -181,6 +181,11 @@
[self.deviceListArr enumerateObjectsUsingBlock:^(DeviceModel *obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj.imei isEqualToString:APIManager.sharedManager.deviceModel.imei])
[self GetDeviceMenu:obj];
else
{
DeviceModel *model = [DeviceModel yy_modelWithJSON:arr[0]];
[self GetDeviceMenu:model];
}
}];
}
else
@ -411,8 +416,11 @@ @@ -411,8 +416,11 @@
{
[super viewWillAppear:animated];
[self GetDeviceList];
[self getHomeWorkCount];
[self getReadFlowerCount];
if (!APIManager.sharedManager.deviceModel.virtualFlag)
{
[self getHomeWorkCount];
[self getReadFlowerCount];
}
}
- (void)updateAllMessage

3
LekangGuard/Home/Homes/Model/DeviceModel.h

@ -127,6 +127,9 @@ NS_ASSUME_NONNULL_BEGIN @@ -127,6 +127,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 是否在线
@property (nonatomic ,assign) BOOL onlineStatus;
/// 是否是零售
@property (nonatomic ,assign) BOOL virtualFlag;
@end
NS_ASSUME_NONNULL_END

12
LekangGuard/Home/Homes/Model/ScanCodeModel.h

@ -41,6 +41,18 @@ NS_ASSUME_NONNULL_BEGIN @@ -41,6 +41,18 @@ NS_ASSUME_NONNULL_BEGIN
/// 学生名称
@property (nonatomic ,copy) NSString *name;
/// 是否是零售
@property (nonatomic ,assign) BOOL virtualFlag;
/// 学校ID
@property (nonatomic ,copy) NSString *schId;
/// 年级ID
@property (nonatomic ,copy) NSString *gradeId;
/// 班级ID
@property (nonatomic ,copy) NSString *classId;
@end

1
LekangGuard/Home/Homes/SelectContactViewController.m

@ -239,6 +239,7 @@ @@ -239,6 +239,7 @@
[parameters setValue:self.phoneField.text forKey:@"phone"];
[parameters setValue:self.relationship forKey:@"relationship"];
[parameters setValue:@(self.relationshipId) forKey:@"relationshipImageId"];
[parameters setValue:@(self.model.virtualFlag) forKey:@"virtualFlag"];
[[[APIManager sharedManager] APPOST:SendAccount_URL parameters:parameters isJson:YES resultClass:nil] subscribeNext:^(id _Nullable x) {
[UICommon HidenLoading];
[UICommon MessageSuccessText:@"申请关注成功"];

9
LekangGuard/Home/Homes/View/HomeHeaderView.m

@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
[self.iconImg sd_setImageWithURL:[NSURL URLWithString:devicemodel.image] placeholderImage:ImageName_(@"icon_head_boy")];
self.idLabel.text = [NSString stringWithFormat:@"账号:%@",devicemodel.imei];
// [self subBtnView];
[self subBtnView];
}
@ -167,7 +167,7 @@ @@ -167,7 +167,7 @@
make.top.equalTo(titleLabel1.mas_bottom).offset(10);
make.height.mas_equalTo(85);
}];
[self subBtnView];
// [self subBtnView];
}
- (void)subBtnView
@ -181,6 +181,11 @@ @@ -181,6 +181,11 @@
NSArray *titleArray = @[@"班级作业",@"电话本",@"打电话",@"小红花"];
NSArray *imageArray = @[@"icon_homework",@"icon_phonebook",@"icon_call_up",@"icon_red_flower"];
if (APIManager.sharedManager.deviceModel.virtualFlag)
{
titleArray = @[@"电话本",@"打电话"];
imageArray = @[@"icon_phonebook",@"icon_call_up"];
}
CGFloat masx = (SCREEN_WIDTH-44)/titleArray.count;
for (int i = 0; i < titleArray.count; i++)

50
LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m

@ -158,13 +158,24 @@ @@ -158,13 +158,24 @@
/// 设备信息View
- (void)DeviceMsgView
{
NSArray *titleArr = @[GJText(@"头像"),
GJText(@"名称"),
GJText(@"性别"),
GJText(@"学校"),
GJText(@"年级"),
GJText(@"班级"),
GJText(@"设备电话号码")];
NSArray *titleArr;
if (APIManager.sharedManager.deviceModel.virtualFlag)
{
titleArr = @[GJText(@"头像"),
GJText(@"名称"),
GJText(@"性别"),
GJText(@"设备电话号码")];
}
else
{
titleArr = @[GJText(@"头像"),
GJText(@"名称"),
GJText(@"性别"),
GJText(@"学校"),
GJText(@"年级"),
GJText(@"班级"),
GJText(@"设备电话号码")];
}
UIView *bgView = [UICommon ui_view:CGRectZero backgroundColor:KKWhiteColorColor cornerRadius:0 borderWidth:0 borderColor:KKClearColor];
[self.view addSubview:bgView];
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
@ -230,17 +241,20 @@ @@ -230,17 +241,20 @@
textfield.text = self.devModel.name;
self.nameField = textfield;
}
if (i == 3)
{
textfield.text = self.devModel.schName;
}
if (i == 4)
{
textfield.text = self.devModel.gradeName;
}
if (i == 5)
if (!APIManager.sharedManager.deviceModel.virtualFlag)
{
textfield.text = self.devModel.className;
if (i == 3)
{
textfield.text = self.devModel.schName;
}
if (i == 4)
{
textfield.text = self.devModel.gradeName;
}
if (i == 5)
{
textfield.text = self.devModel.className;
}
}
if (i == titleArr.count-1)
{
@ -255,7 +269,7 @@ @@ -255,7 +269,7 @@
make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH-150, Adapted(44)));
}];
}
else
else if (i == 2)
{
/// 性别
NSArray *sexArr = @[GJText(@"男"),

3
LekangGuard/Home/MoreService (更多功能)/View/FunctionView.h

@ -14,6 +14,9 @@ NS_ASSUME_NONNULL_BEGIN @@ -14,6 +14,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic ,strong) NSArray *imgArr;
@property (nonatomic ,strong) NSArray *titleArr;
/// 微聊消息未读数
@property (nonatomic ,assign) NSInteger chatCoutn;
@end
NS_ASSUME_NONNULL_END

13
LekangGuard/Home/MoreService (更多功能)/View/FunctionView.m

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
#import "TimingViewController.h"
#import "VideoChatViewController.h"
#import "MemberManagementViewController.h"
#import "ChatViewController.h"
@interface FunctionView ()<WSLWaterFlowLayoutDelegate,UICollectionViewDelegate,UICollectionViewDataSource>
@ -45,6 +46,12 @@ @@ -45,6 +46,12 @@
- (void)setTitleArr:(NSArray *)titleArr
{
_titleArr = titleArr;
// [self.menuCollectionView reloadData];
}
- (void)setChatCoutn:(NSInteger)chatCoutn
{
_chatCoutn = chatCoutn;
[self.menuCollectionView reloadData];
}
@ -133,6 +140,7 @@ @@ -133,6 +140,7 @@
{
cell.imgStr = self.imgArr[indexPath.row];
cell.titleStr = self.titleArr[indexPath.row];
cell.chatCoutn = self.chatCoutn;
}
return cell;
}
@ -172,6 +180,11 @@ @@ -172,6 +180,11 @@
vc.viewType = [title isEqualToString:GJText(@"设备闹钟")] ? 1 : 2;
[[UICommon currentVC].navigationController pushViewController:vc animated:YES];
}
if ([title isEqualToString:@"微聊"])
{
ChatViewController *vc = [[ChatViewController alloc] init];
[[UICommon currentVC].navigationController pushViewController:vc animated:YES];
}
if ([title isEqualToString:GJText(@"查找设备")])
{
EasyAlertView *alertV = [EasyAlertView alertViewWithTitle:GJText(@"查找设备") subtitle:GJText(@"\n点击查找设备,设备接收到指令,会响铃60秒,按任意键可以取消。若设备处于关机或未联网状态,则无法向设备端发送相关指令") AlertViewType:AlertViewTypeSystemAlert config:nil];

3
LekangGuard/Home/MoreService (更多功能)/View/MenuCollectionViewCell.h

@ -15,6 +15,9 @@ NS_ASSUME_NONNULL_BEGIN @@ -15,6 +15,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic ,strong) NSString *imgStr;
@property (nonatomic ,strong) NSString *titleStr;
/// 微聊消息未读数
@property (nonatomic ,assign) NSInteger chatCoutn;
@end
NS_ASSUME_NONNULL_END

36
LekangGuard/Home/MoreService (更多功能)/View/MenuCollectionViewCell.m

@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
@interface MenuCollectionViewCell ()
@property (nonatomic ,weak) UIImageView *iconImg;
@property (nonatomic ,weak) UILabel *titleLabel;
@property (nonatomic ,weak) UILabel *msgNumLabel;
@end
@ -38,6 +39,26 @@ @@ -38,6 +39,26 @@
self.iconImg.image = ImageName_(imgStr);
}
- (void)setChatCoutn:(NSInteger)chatCoutn
{
_chatCoutn = chatCoutn;
self.msgNumLabel.hidden = YES;
if ([self.titleStr isEqualToString:@"微聊"])
{
self.msgNumLabel.hidden = chatCoutn > 0 ? NO : YES;
self.msgNumLabel.text = [NSString stringWithFormat:@"%ld",chatCoutn];
if (chatCoutn > 0)
{
CGFloat ww = chatCoutn > 9 && chatCoutn < 100 ? 25 : chatCoutn > 99 ? 32 : 20;
[self.msgNumLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.iconImg.mas_right).offset(5);
make.top.equalTo(self.iconImg);
make.size.mas_equalTo(CGSizeMake(ww, 20));
}];
}
}
}
- (void)subMenuCell
{
UIImage *img = ImageName_(@"icon_watch_data");
@ -58,6 +79,21 @@ @@ -58,6 +79,21 @@
make.centerX.equalTo(self.contentView);
}];
UILabel *msgNumLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:Font_(13) textColor:KKWhiteColorColor text:@"" Radius:10];
msgNumLabel.layer.borderWidth = 1.5;
msgNumLabel.layer.borderColor = KKWhiteColorColor.CGColor;
msgNumLabel.backgroundColor = RGB(254, 83, 71);
msgNumLabel.hidden = YES;
self.msgNumLabel = msgNumLabel;
[self.contentView addSubview:msgNumLabel];
[msgNumLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(iconImg.mas_right).offset(3);
make.top.equalTo(iconImg).offset(-3);
make.size.mas_equalTo(CGSizeMake(20, 20));
}];
// UILabel *line = [UILabel new];
// line.backgroundColor = KKLineColor;
// [self.contentView addSubview:line];

10
LekangGuard/Managers/UIURL.h

@ -237,19 +237,19 @@ @@ -237,19 +237,19 @@
#define QueryContentById_URL @"/message/query/queryContentById"
/// 新增消息 POST
#define AddChat_URL @"/chat_group_message_app/message/addChat"
#define AddChat_URL @"/chat-group-member-app/message/addChat"
/// 查询微聊数据GET
#define QueryChat_URL @"/chat_group_message_app/message/queryChat"
#define QueryChat_URL @"/chat-group-member-app/message/queryChat"
/// 根据消息id更新当前消息为已读状态GET
#define UpdateById_URL @"/chat_group_message_app/message/updateById"
#define UpdateById_URL @"/chat-group-message-app/message/updateById"
/// 删除微聊数据GET
#define DeleteChat_URL @"/chat_group_message_app/message/deleteChat"
#define DeleteChat_URL @"/chat-group-message-app/message/deleteChat"
/// 查询当前设备用户未读消息数 GET
#define UnreadTotal_URL @"/chat_group_message_app/message/unreadTotal"
#define UnreadTotal_URL @"/chat-group-message-app/message/unreadTotal"
/// 用户注销

13
LekangGuard/My/VC/MyViewController.m

@ -57,13 +57,12 @@ @@ -57,13 +57,12 @@
[alertV showAlertView];
}];
self.myDataSource = [[NSMutableArray alloc] initWithObjects:@"消息中心",@"校园通知",@"关于我们",@"常见问题",@"清除缓存",@"意见反馈", nil];
self.iconImageArr = [[NSMutableArray alloc] initWithObjects:@"icon_message_center",@"icon_campus_news",@"icon_aboutus",@"icon_question",@"icon_cleanup",@"icon_feedback", nil];
[self.view addSubview:self.moreTableView];
}
- (UITableView *)moreTableView
{
if (!_moreTableView)
@ -202,6 +201,14 @@ @@ -202,6 +201,14 @@
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.myDataSource = [[NSMutableArray alloc] initWithObjects:@"消息中心",@"校园通知",@"关于我们",@"常见问题",@"清除缓存",@"意见反馈", nil];
self.iconImageArr = [[NSMutableArray alloc] initWithObjects:@"icon_message_center",@"icon_campus_news",@"icon_aboutus",@"icon_question",@"icon_cleanup",@"icon_feedback", nil];
if (APIManager.sharedManager.deviceList.count <= 0 || APIManager.sharedManager.deviceModel.virtualFlag)
{
self.myDataSource = [[NSMutableArray alloc] initWithObjects:@"消息中心",@"关于我们",@"常见问题",@"清除缓存",@"意见反馈", nil];
self.iconImageArr = [[NSMutableArray alloc] initWithObjects:@"icon_message_center",@"icon_aboutus",@"icon_question",@"icon_cleanup",@"icon_feedback", nil];
}
[self QueryMsg];
[self GetUnReadTotal];
}

24
LekangGuard/Protection(守护星)/VC/ProtectionViewController.m

@ -31,6 +31,8 @@ @@ -31,6 +31,8 @@
@property (nonatomic ,weak) UIButton *unbundleBtn;
@end
@ -197,6 +199,11 @@ @@ -197,6 +199,11 @@
// [self.menuArr addObject:GJText(@"上课禁用")];
// [self.menuImgArr addObject:@"icon_class_disable"];
// }
// if([APIManager sharedManager].deviceModel.chatFun)
// {
// [self.menuArr addObject:GJText(@"微聊")];
// [self.menuImgArr addObject:@"icon_wechat"];
// }
if([APIManager sharedManager].deviceModel.lookupFun)
{
[self.menuArr addObject:GJText(@"查找设备")];
@ -294,6 +301,22 @@ @@ -294,6 +301,22 @@
}];
}
#pragma mark 查询当前设备用户微聊未读消息数
/// 查询当前设备用户微聊未读消息数
- (void)GetUnreadTotal
{
NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
[parameters setValue:APIManager.sharedManager.deviceModel.groupid forKey:@"groupId"];
[[[APIManager sharedManager] APGET:UnreadTotal_URL parameters:parameters resultClass:nil] subscribeNext:^(NSString *x) {
[UICommon HidenLoading];
NSInteger chatCoutn = x.integerValue;
self.funView.chatCoutn = chatCoutn;
} error:^(NSError * _Nullable error) {
NSDictionary *dic = error.userInfo;
[UICommon MessageErrorText:dic[NSLocalizedDescriptionKey]];
}];
}
- (void)updateAllMessage
{
AfterDispatch(1, ^{
@ -317,6 +340,7 @@ @@ -317,6 +340,7 @@
{
[super viewWillAppear:animated];
[self realTimeUpadteMsg];
[self GetUnreadTotal];
}

2
Pods/MSNetwork/MSNetwork/MSNetwork.m generated

@ -295,7 +295,7 @@ cachePolicy:(MSCachePolicy)cachePolicy @@ -295,7 +295,7 @@ cachePolicy:(MSCachePolicy)cachePolicy
NSData *data = [NSData dataWithContentsOfFile:filePath];
[formData appendPartWithFileData:data
name:@"file"
fileName:@"voice"
fileName:@"voice.amr"
mimeType:@"amr"];
} progress:^(NSProgress * _Nonnull uploadProgress) {
//上传进度

Loading…
Cancel
Save