fix
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#import "NSString+Unicode.h"
|
||||
#import "GIGAMBHUDHelper.h"
|
||||
#import "LXCustomSwith.h"
|
||||
#import "GiGaUserDefault.h"
|
||||
|
||||
//弹幕控制器
|
||||
@interface GiGaFlingCommitVC ()
|
||||
@@ -89,13 +90,12 @@
|
||||
[super viewDidLoad];
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
|
||||
[self.view addSubview: self.commitInputView];
|
||||
[self.view addSubview:self.danmuSwitch];
|
||||
[self.view bringSubviewToFront:self.danmuSwitch];
|
||||
|
||||
|
||||
|
||||
weakify(self);
|
||||
|
||||
self.commitInputView.SendCommentHandler = ^(NSString *content) {
|
||||
GILog(@"发送->:%@",content);
|
||||
NSArray *arr = @[@{
|
||||
@@ -103,9 +103,7 @@
|
||||
@"room":@"",
|
||||
@"sendUserName":@"lianxiang"
|
||||
}];
|
||||
|
||||
[weakSelf.client emit:@"talk" with:arr];
|
||||
|
||||
};
|
||||
|
||||
//开启弹幕
|
||||
@@ -113,13 +111,18 @@
|
||||
[[LXDanMuManager shareInstance] start];
|
||||
//socket
|
||||
[self connetction];
|
||||
|
||||
//显示隐藏输入框
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (!isUserLogin) {
|
||||
self.commitInputView.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)connetction{
|
||||
|
||||
NSURL* url = [[NSURL alloc] initWithString:@"http://wsyts.s1.natapp.cc"];
|
||||
SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"connectParams":@{@"token":@""}}];
|
||||
//@"connectParams":@{@"token":@""}
|
||||
SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"extraHeaders":@{@"device":@"ios"},@"token":@""}];
|
||||
|
||||
_manager = manager;
|
||||
_client = manager.defaultSocket;
|
||||
@@ -175,7 +178,6 @@
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
//弹幕插入
|
||||
-(void)showDanMuWith:(GiGaCommentModel *)model{
|
||||
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
NSAttributedString *title = [GiGaHelper stringWithText:@"开始敷面膜" textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTMEDIUM(13) leterSpace:0];
|
||||
[_startMaskButton setAttributedTitle:title forState:UIControlStateNormal];
|
||||
[_startMaskButton addTarget:self action:@selector(startMaskButtonAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
}
|
||||
return _startMaskButton;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user