Parcourir la source

1.补充屏蔽新手引导相关 版本检测代码

huangxiaodong il y a 1 semaine
Parent
commit
642471d42a
1 fichiers modifiés avec 0 ajouts et 173 suppressions
  1. 0 173
      创维盒子/code/AppDelegate/SceneDelegate.m

+ 0 - 173
创维盒子/code/AppDelegate/SceneDelegate.m

@@ -1886,179 +1886,6 @@
     [self getLastNoticeFun];
 }
 
-#pragma mark- 网络请求
-- (void)getVersion {
-    
-    //密码框界面 拦着 不给弹出
-    if(!ksharedAppDelegate.isFirstInputPwdDone){
-        return;
-    }
-    
-    NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
-    [paraDict setValue:@"ios" forKey:@"type"];
-    [paraDict setValue:@"skyworth" forKey:@"source"];
-    
-    [[netWorkManager shareInstance] CommonGetWithCallBackCode:upgradeNewVersion Parameters:paraDict success:^(id  _Nonnull responseObject) {
-        //HLog(@"%@", responseObject);
-
-      SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
-
-       if (model && model.status == 0) {
-
-           HWVersionModel *model = [HWVersionModel mj_objectWithKeyValues:responseObject[@"data"]];
-           [self checkVersion:model];
-       }
-       else
-       {
-           [self checkVersion:nil];
-       }
-
-    } failure:^(NSError * _Nonnull error) {
-      HLog(@"%@", error);
-       [self checkVersion:nil];
-    }];
-}
-
-- (void)checkVersion:(HWVersionModel*)versionModel {
-    
-    if(!versionModel){//版本信息错误 检测新手弹框流程
-        [self getLastNoticeFun];
-        return;
-    }
-    
-//  NSString *currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleVersion"];
-    NSString *currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
-    NSString *newVersion = [versionModel.versionNumber stringByReplacingOccurrencesOfString:@"v" withString:@""];  //去掉v
-    newVersion = [newVersion stringByReplacingOccurrencesOfString:@"V" withString:@""];  //去掉v
-    //HLog(@"%@---%@", newVersion, currentVersion);
-    if ([currentVersion compare:newVersion options:NSNumericSearch] == NSOrderedSame) { // 本地版本号 == 服务器版本号
-        [self getLastNoticeFun];
-    }else if ([currentVersion compare:newVersion options:NSNumericSearch] == NSOrderedDescending) { // 本地版本号 > 服务器版本号 (异常情况)
-        [HWDataManager setBoolWithKey:Const_haveVersion value:NO];
-        [self getLastNoticeFun];
-    }else { // 本地版本号 < 服务器版本号 (有新版本)
-        [self showNewVersion:versionModel];
-        [HWDataManager setBoolWithKey:Const_haveVersion value:YES];
-    };
-}
-
-- (void)showNewVersion:(HWVersionModel*)versionModel {
-    
-    HaveNewVersionView *haveNewVersionView = [HaveNewVersionView shardInstance];
-    if (haveNewVersionView.isShow) {
-        return;
-    }
-    
-    //此版本点击过稍后再试
-    NSString *preVersionstr = [HWDataManager getStringWithKey:Const_did_show_version_and_click_wait];
-    if(preVersionstr && [versionModel.versionNumber isEqualToString:preVersionstr]){
-        [self getLastNoticeFun];
-        return;
-    }
-    
-    haveNewVersionView.versionModel = versionModel;
-    haveNewVersionView.isContinueCheckAlert = NO; // 是否继续走下一步弹窗检测流程
-    [haveNewVersionView setBackgroundColor:RGBACOLOR(0, 0, 0, 0.5)];
-    [ksharedAppDelegate.window addSubview:haveNewVersionView];
-    haveNewVersionView.isShow = YES;
-    
-    if(!versionModel.necessary){
-        haveNewVersionView.deleteBtn.hidden = NO;
-    }
-    
-    [haveNewVersionView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.mas_equalTo(0);
-        make.left.mas_equalTo(0);
-        make.right.mas_equalTo(0);
-        make.bottom.mas_equalTo(0);
-    }];
-    haveNewVersionView.alpha = 0.0;
-
-    [UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationOptionCurveEaseIn animations:^ {
-                haveNewVersionView.alpha = 1.0;
-                KyoLog(@"in animate start");
-            } completion:^(BOOL finished) {
-                KyoLog(@"in animate completion");
-    }];
-    
-    KWeakSelf
-    haveNewVersionView.closeViewFun = ^{
-        [weakSelf getLastNoticeFun];
-    };
-}
-
-#pragma mark 弹框流程 3 新手引导弹窗
-- (void)showNewerGuideFun
-{
-    BOOL didShow = [HWDataManager getBoolWithKey:@"Const_did_show_newer_Guide"];
-    
-    if(didShow){
-        [self getLastNoticeFun];
-        return;
-    }
-    
-    //密码框界面 拦着 不给弹出
-    if(ksharedAppDelegate.isDidShowPwdType){
-        KWeakSelf
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-            [weakSelf  getLastNoticeFun];
-        });
-        return;
-    }
-    
-    newerGuideView *guideView =  [[newerGuideView alloc] init];
-    [ksharedAppDelegate.window addSubview:guideView];
-    
-    [guideView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.mas_equalTo(0);
-        make.left.mas_equalTo(0);
-        make.right.mas_equalTo(0);
-        make.bottom.mas_equalTo(0);
-    }];
-    
-    
-    KWeakSelf
-    guideView.didClickButtonFun = ^(NSInteger tag) {
-        [weakSelf didiClickNewerButtonFunBy:tag];
-    };
-    
-}
-
-#pragma mark 新手引导点击事件
-- (void)didiClickNewerButtonFunBy:(NSInteger)tag
-{
-    [HWDataManager setBoolWithKey:@"Const_did_show_newer_Guide" value:YES];
-    
-    if(tag ==1){
-        [self getLastNoticeFun];
-    }
-    else if(tag ==2 || tag == 10){
-        CustomerWebViewController *vc = [[CustomerWebViewController alloc] init];
-        vc.titleStr = NSLocalizedString(@"mine_newuser_title",nil);
-
-        NSString *url = [[NSString alloc] initWithFormat:@"%@/warrantyService/index.html#/novice?isNovice=true",CloudService];
-        if(tag == 10){
-            url = [url stringByReplacingOccurrencesOfString:@"?isNovice=true" withString:@""];
-        }
-        
-        vc.webUrl = url;
-        //[self pushViewController:vc animated:YES];
-        
-        NSArray*curVCArr = ksharedAppDelegate.mainTabBar.viewControllers;
-        NSInteger selectedIndex = ksharedAppDelegate.mainTabBar.selectedIndex;
-        
-        if(selectedIndex < curVCArr.count){
-            UINavigationController * curNav = curVCArr[selectedIndex];
-            [curNav pushViewController:vc animated:YES];
-            
-            KWeakSelf
-            vc.didClickBackFun = ^{
-                [weakSelf getLastNoticeFun];
-            };
-        }
-        
-    }
-}
 
 #pragma mark 弹框流程 4  通知公告弹窗
 - (void)getLastNoticeFun