瀏覽代碼

登录提示

time 6 年之前
父節點
當前提交
f9b5d126a7

+ 12 - 0
UU_Ent/UU_Ent.xcodeproj/project.pbxproj

@@ -33,6 +33,8 @@
 		9948171422783494007C7CEA /* msg_route.json in Resources */ = {isa = PBXBuildFile; fileRef = 9948171322783494007C7CEA /* msg_route.json */; };
 		9948171722785013007C7CEA /* YRWorkTabCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9948171622785013007C7CEA /* YRWorkTabCell.m */; };
 		9948171A22785044007C7CEA /* YRWorkCollCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9948171922785044007C7CEA /* YRWorkCollCell.m */; };
+		994AC5492283CEE0006FE026 /* YRNavHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 994AC5482283CEE0006FE026 /* YRNavHeaderView.m */; };
+		994AC54C2283FEDC006FE026 /* UINavigationController+alpha.m in Sources */ = {isa = PBXBuildFile; fileRef = 994AC54B2283FEDC006FE026 /* UINavigationController+alpha.m */; };
 		999F6510227E658E00329012 /* UIView+frame.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F650F227E658E00329012 /* UIView+frame.m */; };
 		999F6513227E664C00329012 /* UIImageView+userId.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6512227E664C00329012 /* UIImageView+userId.m */; };
 		999F6516227E688600329012 /* UIView+selector.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6515227E688600329012 /* UIView+selector.m */; };
@@ -204,6 +206,10 @@
 		9948171622785013007C7CEA /* YRWorkTabCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRWorkTabCell.m; sourceTree = "<group>"; };
 		9948171822785044007C7CEA /* YRWorkCollCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRWorkCollCell.h; sourceTree = "<group>"; };
 		9948171922785044007C7CEA /* YRWorkCollCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRWorkCollCell.m; sourceTree = "<group>"; };
+		994AC5472283CEE0006FE026 /* YRNavHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRNavHeaderView.h; sourceTree = "<group>"; };
+		994AC5482283CEE0006FE026 /* YRNavHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRNavHeaderView.m; sourceTree = "<group>"; };
+		994AC54A2283FEDC006FE026 /* UINavigationController+alpha.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+alpha.h"; sourceTree = "<group>"; };
+		994AC54B2283FEDC006FE026 /* UINavigationController+alpha.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+alpha.m"; sourceTree = "<group>"; };
 		999F650E227E658E00329012 /* UIView+frame.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+frame.h"; sourceTree = "<group>"; };
 		999F650F227E658E00329012 /* UIView+frame.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+frame.m"; sourceTree = "<group>"; };
 		999F6511227E664C00329012 /* UIImageView+userId.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImageView+userId.h"; sourceTree = "<group>"; };
@@ -457,6 +463,10 @@
 				270E6C9A2282E6D0008B12B9 /* UINavigationController+safe.m */,
 				2710E65E22801ED10002A4B0 /* YRShowMessageFromNavi.h */,
 				2710E65F22801ED10002A4B0 /* YRShowMessageFromNavi.m */,
+				994AC5472283CEE0006FE026 /* YRNavHeaderView.h */,
+				994AC5482283CEE0006FE026 /* YRNavHeaderView.m */,
+				994AC54A2283FEDC006FE026 /* UINavigationController+alpha.h */,
+				994AC54B2283FEDC006FE026 /* UINavigationController+alpha.m */,
 			);
 			path = UINavigation;
 			sourceTree = "<group>";
@@ -1484,9 +1494,11 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				994AC5492283CEE0006FE026 /* YRNavHeaderView.m in Sources */,
 				99C6FED12276982F00C7070A /* YRTabBar.m in Sources */,
 				27029BD0227709CC00D53A94 /* UIButton+Layout.m in Sources */,
 				99C6FF232276E4C000C7070A /* YRMsgMainCell.m in Sources */,
+				994AC54C2283FEDC006FE026 /* UINavigationController+alpha.m in Sources */,
 				2710E66E2281746E0002A4B0 /* UIPopoverListView.m in Sources */,
 				99C16345228027C8002ED79D /* YRMsgHeader.m in Sources */,
 				991C1464228275B70080B54A /* YRLoginManager.m in Sources */,

+ 18 - 2
UU_Ent/UU_Ent/Modules/Login/Main/Others/YRLoginManager.m

@@ -55,9 +55,17 @@
                 
             } failure:^(SwitchCompanyResponse * _Nullable response, NSError * _Nullable error) {
                 
+                NSString *errStr = response.responseHeader.message;
+                
+                if (errStr.length == 0) {
+                    
+                    errStr = @"服务器异常";
+                    
+                }
+                
                 if (failure) {
                     
-                    failure(response.responseHeader.message);
+                    failure(errStr);
                     
                 }
                 
@@ -67,9 +75,17 @@
         
     } failure:^(AccountSigninResponse * _Nullable response, NSError * _Nullable error) {
         
+        NSString *errStr = response.responseHeader.message;
+        
+        if (errStr.length == 0) {
+            
+            errStr = @"服务器异常";
+            
+        }
+        
         if (failure) {
             
-            failure(response.responseHeader.message);
+            failure(errStr);
             
         }
         

+ 13 - 0
UU_Ent/UU_Ent/Modules/Mine/Child/Setting/Controllers/YRSettingVC.m

@@ -149,6 +149,19 @@ static NSString *cellID = @"cellID";
 #pragma mark --- 创建UI
 -(void)setUpUI
 {
+    
+    CGFloat height = 64;
+    
+    if (statusXLately) {
+        
+        height = 88;
+        
+    }
+    
+    YRNavHeaderView *header = [[YRNavHeaderView alloc]initWithFrame:CGRectMake(0, -height, self_width, height)];
+    
+    [self.view addSubview:header];
+    
     [self.view addSubview:self.tableView];
     
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {

+ 1 - 0
UU_Ent/UU_Ent/Modules/Mine/Main/Controllers/YRMineVC.m

@@ -260,6 +260,7 @@
     
     [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:17.0]}];
     
+    
 }
 
 #pragma mark --- viewAction

+ 2 - 0
UU_Ent/UU_Ent/Modules/Work/Main/Controllers/YRWorkVC.m

@@ -47,6 +47,8 @@
         
     }
     
+    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:17.0]}];
+    
     self.navigationController.navigationBar.hidden = YES;
    
     UIImageView *topView = [[UIImageView alloc]initWithFrame:CGRectMake(0,0, SCREEN_WIDTH, 94)];

+ 1 - 0
UU_Ent/UU_Ent/Supporting Files/defines/common.h

@@ -10,6 +10,7 @@
 #define common_h
 #import <UIKit/UIKit.h>
 
+//GRPC服务器
 static NSString * const kHostAddress = @"uu-api-test.usoftchina.com:9620";
 
 #endif /* common_h */

+ 2 - 0
UU_Ent/UU_Ent/Supporting Files/defines/import.h

@@ -33,6 +33,8 @@
 #import "UIButton+block.h"
 #import "UIButton+Extersion.h"
 #import "UINavigationController+safe.h"
+#import "UINavigationController+alpha.h"
+#import "YRNavHeaderView.h"
 
 
 //第三方导入

+ 19 - 0
UU_Ent/UU_Ent/Utils/UINavigation/UINavigationController+alpha.h

@@ -0,0 +1,19 @@
+//
+//  UINavigationController+alpha.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/9.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UINavigationController (alpha)
+
+- (void)setNeedsNavigationBackground:(CGFloat)alpha;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 36 - 0
UU_Ent/UU_Ent/Utils/UINavigation/UINavigationController+alpha.m

@@ -0,0 +1,36 @@
+//
+//  UINavigationController+alpha.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/9.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "UINavigationController+alpha.h"
+
+@implementation UINavigationController (alpha)
+
+- (void)setNeedsNavigationBackground:(CGFloat)alpha {
+    
+    UIView *barBackgroundView = [[self.navigationBar subviews] objectAtIndex:0];
+    UIImageView *backgroundImageView = [[barBackgroundView subviews] objectAtIndex:0];
+    if (self.navigationBar.isTranslucent && iOS11Lately) {
+        if (backgroundImageView != nil && backgroundImageView.image != nil) {
+            barBackgroundView.alpha = alpha;
+        } else {
+            UIView *backgroundEffectView = [[barBackgroundView subviews] objectAtIndex:1];
+            if (backgroundEffectView != nil) {
+                backgroundEffectView.alpha = alpha;
+            }
+        }
+    } else {
+        
+        barBackgroundView.alpha = alpha;
+        
+    }
+    
+    self.navigationBar.clipsToBounds = alpha == 0.0;
+}
+
+
+@end

+ 0 - 1
UU_Ent/UU_Ent/Utils/UINavigation/UINavigationController+safe.h

@@ -10,6 +10,5 @@
 
 @interface UINavigationController (safe)<UINavigationControllerDelegate>
 
-- (void)setNeedsNavigationBackground:(CGFloat)alpha;
 
 @end

+ 0 - 24
UU_Ent/UU_Ent/Utils/UINavigation/UINavigationController+safe.m

@@ -53,30 +53,6 @@ static char const *const ObjectTagKey = "objectTagKey";
 }
 
 
-- (void)setNeedsNavigationBackground:(CGFloat)alpha {
-   
-    UIView *barBackgroundView = [[self.navigationBar subviews] objectAtIndex:0];
-    UIImageView *backgroundImageView = [[barBackgroundView subviews] objectAtIndex:0];
-    if (self.navigationBar.isTranslucent && iOS11Lately) {
-        if (backgroundImageView != nil && backgroundImageView.image != nil) {
-            barBackgroundView.alpha = alpha;
-        } else {
-            UIView *backgroundEffectView = [[barBackgroundView subviews] objectAtIndex:1];
-            if (backgroundEffectView != nil) {
-                backgroundEffectView.alpha = alpha;
-            }
-        }
-    } else {
-        
-        barBackgroundView.alpha = alpha;
-        
-    }
-    
-    self.navigationBar.clipsToBounds = alpha == 0.0;
-}
-
-
-
 - (NSArray *)safePopToViewController:(UIViewController *)viewController animated:(BOOL)animated {
     
     if(self.viewTransitionInProgress)  return  nil;

+ 17 - 0
UU_Ent/UU_Ent/Utils/UINavigation/YRNavHeaderView.h

@@ -0,0 +1,17 @@
+//
+//  YRNavHeaderView.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/9.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface YRNavHeaderView : UIView
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 22 - 0
UU_Ent/UU_Ent/Utils/UINavigation/YRNavHeaderView.m

@@ -0,0 +1,22 @@
+//
+//  YRNavHeaderView.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/9.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRNavHeaderView.h"
+
+@implementation YRNavHeaderView
+
+- (void)drawRect:(CGRect)rect {
+    
+    UIImage *image = [UIImage imageNamed:@"U_newNarbgX"];
+    
+    [image drawInRect:rect];
+    
+}
+
+
+@end

+ 2 - 2
UU_Ent/UU_Ent/Utils/UIView/UIView+frame.m

@@ -23,7 +23,7 @@
 }
 
 /**
- @param     返回一个Origin.x
+ @param
  */
 - (CGFloat)x
 {
@@ -31,7 +31,7 @@
 }
 
 /**
- @param     设置新的Origin.Y
+ @param    
  */
 - (void)setY:(CGFloat)y
 {