1、变更推送为阿里云推,清除云信IM以及推送内容;

2、消息页面全新改版;
3、部分微小Bug修复
This commit is contained in:
wbzhan
2019-05-24 19:21:31 +08:00
parent c586949438
commit 25c051d5f1
1544 changed files with 17136 additions and 78376 deletions
@@ -17,13 +17,7 @@
#import "IfishCameraModel.h"
#define CELL_KANHURAG1 555
#import "UIImageView+WebCache.h"
#import "NIMKit.h"
//自定义
#import "IfishSessionViewController.h"
//抽离demo
#import "NIMSessionViewController.h"
@interface MineKanHuViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,UIActionSheetDelegate>
@property(nonatomic,strong) UITableView *tableView;
@@ -70,15 +64,14 @@
-(void)initUI{
//self.rightItem = [[UIBarButtonItem alloc] initWithTitle:@"管理" style:UIBarButtonItemStylePlain target:self action:@selector(guanliActon)];
UIBarButtonItem*rightItem= [[UIBarButtonItem alloc] initWithTitle:@"管理" style:UIBarButtonItemStyleDone target:self action:@selector(guanliActon)];
self.navigationItem.rightBarButtonItem= rightItem;
self.navigationItem.rightBarButtonItem.tintColor = [UIColor whiteColor];
CGFloat BtnH = self.view.frame.size.width * 0.12;
CGFloat BtnH = 50;
self.tableView = [[UITableView alloc] init ];
self.tableView.frame =CGRectMake(0,0, self.view.frame.size.width,self.view.frame.size.height - BtnH);
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
@@ -86,6 +79,11 @@
self.tableView.backgroundColor = TABLE_BACKGROUD_COLOR;
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.width.mas_equalTo(self.view);
make.bottom.mas_equalTo(-BtnH);
}];
NSString *str= @" 打给TA";
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:str];
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
@@ -95,7 +93,7 @@
[attri insertAttributedString:attristr atIndex:0];
UIButton *tel =[UIButton buttonWithType:UIButtonTypeCustom];
[tel setAttributedTitle:attri forState:UIControlStateNormal];
tel.frame = CGRectMake(0,CGRectGetMaxY(self.tableView.frame),self.view.frame.size.width/2, BtnH);
tel.frame = CGRectMake(0,CGRectGetMaxY(self.tableView.frame),self.view.frame.size.width, BtnH);
tel.backgroundColor = RGB(0, 180,239);
[attri addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0,str.length+1)];
[attri addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:NSMakeRange(0,str.length+1)];
@@ -103,22 +101,10 @@
[self.view addSubview:tel];
NSString *str2= @" 咨询TA";
NSMutableAttributedString *attri2 = [[NSMutableAttributedString alloc] initWithString:str2];
NSTextAttachment *attch2 = [[NSTextAttachment alloc] init];
attch2.image = [UIImage imageNamed:@"businesslistings_comments"];
attch2.bounds = CGRectMake(0,-4,17,16);;//35*33
NSAttributedString *attristr2=[NSAttributedString attributedStringWithAttachment:attch2];
[attri2 insertAttributedString:attristr2 atIndex:0];
UIButton *zixunbtn =[UIButton buttonWithType:UIButtonTypeCustom];
[zixunbtn setAttributedTitle:attri2 forState:UIControlStateNormal];
zixunbtn.frame = CGRectMake(CGRectGetMaxX(tel.frame),CGRectGetMinY(tel.frame), self.view.frame.size.width/2, BtnH);
zixunbtn.backgroundColor = RGB(255, 115, 92);
[attri2 addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0,str2.length+1)];
[attri2 addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:NSMakeRange(0,str2.length+1)];
[zixunbtn addTarget:self action:@selector(chatBtnAction:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:zixunbtn];
[tel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.tableView.mas_bottom);
make.left.width.bottom.mas_equalTo(self.view);
}];
}
@@ -518,32 +504,7 @@
-(void)chatBtnAction:(UIButton *)btn{
UserModel*model=[[DataCenter defaultDtacenter]valueForKey:@"UserLogIn"];
NSString *myAcount = [NSString stringWithFormat:@"%@",model.userId];
NSString *tarGetAcount = [NSString stringWithFormat:@"%@",self.xinXiModel.userId];
[[NIMSDK sharedSDK].loginManager login:myAcount token:model.neteaseToken completion:^(NSError *error) {
if (!error) {
NSLog(@"登录成功");
//创建session
NIMSession *session = [NIMSession session:tarGetAcount type:NIMSessionTypeP2P];
//创建聊天页,这个页面继承自 NIMKit 中的组件 NIMSessionViewController
self.hidesBottomBarWhenPushed = YES;
IfishSessionViewController *vc = [[IfishSessionViewController alloc] initWithSession:session];
//vc.targetChatname = self.xinXiModel.userName;
[self.navigationController pushViewController:vc animated:YES];
// NIMSessionViewController *vc = [[NIMSessionViewController alloc] initWithSession:session];
// [self.navigationController pushViewController:vc animated:YES];
}else{
NSLog(@"登录失败");
}
}];
}
#pragma mark - guanliActon