|
|
@@ -30,7 +30,6 @@
|
|
|
@property(nonatomic, strong) CalculatorViewController *calculatorVC;
|
|
|
@property(nonatomic, strong) HWWebViewController *webVC;
|
|
|
@property(nonatomic, strong) inputPWDViewController *inputVC;
|
|
|
-@property(nonatomic, strong) NSTimer *checkSNDataTimer;//
|
|
|
@property(nonatomic, strong) customLaunchView *customLaunchV;//
|
|
|
//@property(nonatomic, strong) PlayerViewController *curPlayerVC;
|
|
|
|
|
|
@@ -110,8 +109,8 @@
|
|
|
NSString *SNStr = deviceDict[@"Const_Have_Add_Device_SN"];
|
|
|
NSString *sdnId = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sdnId;
|
|
|
if(SNStr && !sdnId){
|
|
|
- [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:YES didNetEnd:^(bool didSuc) {
|
|
|
- if(!didSuc){
|
|
|
+ [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:YES didNetEnd:^(NSInteger didSuc) {
|
|
|
+ if(didSuc == 0){
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
mainBlock(^{
|
|
|
[weakSelf showNetErrorAlertFun];
|
|
|
@@ -147,23 +146,26 @@
|
|
|
//确保通过SN号拿到密码了
|
|
|
//非扫码进入 进入到这里很可能还没联网拿到设备最新信息
|
|
|
if(![connectDeviceManager shareInstance].DeviceThirdIdMod){
|
|
|
- if(!_checkSNDataTimer){
|
|
|
- _checkSNDataTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(enterMainVCFromScene) userInfo:nil repeats:YES];
|
|
|
-
|
|
|
- //BOOL haveOpenMask = [HWDataManager getBoolWithKey:Const_Mask_View_Open];
|
|
|
- NSInteger maskModel = [HWDataManager getIntegerWithKey:Const_Mask_View_Model];
|
|
|
- //添加默认启动图片
|
|
|
- if(!_customLaunchV && maskModel == 0){
|
|
|
- _customLaunchV = [[customLaunchView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
|
|
|
- [self.window addSubview:_customLaunchV];
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ mainBlock(^{
|
|
|
+ [self enterMainVCFromScene];
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ //BOOL haveOpenMask = [HWDataManager getBoolWithKey:Const_Mask_View_Open];
|
|
|
+ NSInteger maskModel = [HWDataManager getIntegerWithKey:Const_Mask_View_Model];
|
|
|
+ //添加默认启动图片
|
|
|
+ if(!_customLaunchV && maskModel == 0){
|
|
|
+ _customLaunchV = [[customLaunchView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
|
|
|
+ [self.window addSubview:_customLaunchV];
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if(_checkSNDataTimer){
|
|
|
- [_checkSNDataTimer invalidate];
|
|
|
+ if(_customLaunchV){
|
|
|
[_customLaunchV removeFromSuperview];
|
|
|
_customLaunchV = nil;
|
|
|
}
|
|
|
@@ -174,15 +176,11 @@
|
|
|
if(!sdnId){
|
|
|
HLog(@"没有拿到sdnId");
|
|
|
|
|
|
- [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:YES didNetEnd:^(bool didSuc) {
|
|
|
- if(didSuc){
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- mainBlock(^{
|
|
|
- [self enterMainVCFromScene];
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }];
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ mainBlock(^{
|
|
|
+ [self enterMainVCFromScene];
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
return;
|
|
|
}
|