Browse Source

消息页整理

time 6 years ago
parent
commit
e57f60a7d6
27 changed files with 693 additions and 62 deletions
  1. 4 3
      UU_Ent/Podfile
  2. 52 17
      UU_Ent/UU_Ent.xcodeproj/project.pbxproj
  3. 11 2
      UU_Ent/UU_Ent/Modules/App/AppDelegate.m
  4. 14 0
      UU_Ent/UU_Ent/Modules/Base/YRBaseNav.m
  5. 1 0
      UU_Ent/UU_Ent/Modules/Base/YRBaseVC.m
  6. 2 0
      UU_Ent/UU_Ent/Modules/Login/Main/Controllers/YRLoginVC.h
  7. 56 8
      UU_Ent/UU_Ent/Modules/Login/Main/Controllers/YRLoginVC.m
  8. 145 1
      UU_Ent/UU_Ent/Modules/Message/Main/Controllers/YRMsgVC.m
  9. 67 0
      UU_Ent/UU_Ent/Modules/Message/Main/Others/YRMsgMainModel.h
  10. 13 0
      UU_Ent/UU_Ent/Modules/Message/Main/Others/YRMsgMainModel.m
  11. 19 0
      UU_Ent/UU_Ent/Modules/Message/Main/Views/YRMsgMainCell.h
  12. 31 0
      UU_Ent/UU_Ent/Modules/Message/Main/Views/YRMsgMainCell.m
  13. 25 0
      UU_Ent/UU_Ent/Modules/Mine/Main/Others/YRUserInfo.h
  14. 29 0
      UU_Ent/UU_Ent/Modules/Mine/Main/Others/YRUserInfo.m
  15. 72 2
      UU_Ent/UU_Ent/Modules/Web/Main/YRWebVC.m
  16. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/1125X2436.png
  17. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/1242X2208.png
  18. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/640X1136.png
  19. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/640X960.png
  20. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/750X1334.png
  21. 100 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/Contents.json
  22. 0 25
      UU_Ent/UU_Ent/Supporting Files/Base.lproj/LaunchScreen.storyboard
  23. 0 2
      UU_Ent/UU_Ent/Supporting Files/Info.plist
  24. 5 2
      UU_Ent/UU_Ent/Supporting Files/UU_Ent.pch
  25. 15 0
      UU_Ent/UU_Ent/Supporting Files/defines/common.h
  26. 17 0
      UU_Ent/UU_Ent/Utils/tableView/YRTableView.h
  27. 15 0
      UU_Ent/UU_Ent/Utils/tableView/YRTableView.m

+ 4 - 3
UU_Ent/Podfile

@@ -7,9 +7,10 @@ target 'UU_Ent' do
 
   # Pods for UU_Ent
 
-   pod 'UU_Ent', :path => '.'
-   pod 'MJExtension'
-
+    pod 'UU_Ent', :path => '.'
+    pod 'Masonry'
+    pod 'MJExtension'
+    pod 'SDWebImage'
   target 'UU_EntTests' do
     inherit! :search_paths
     # Pods for testing

+ 52 - 17
UU_Ent/UU_Ent.xcodeproj/project.pbxproj

@@ -13,7 +13,6 @@
 		99C6FE6C22768B5C00C7070A /* UU_EntUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FE6B22768B5C00C7070A /* UU_EntUITests.m */; };
 		99C6FE8F22768EC000C7070A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FE7E22768EC000C7070A /* AppDelegate.m */; };
 		99C6FE9022768EC000C7070A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 99C6FE8722768EC000C7070A /* Assets.xcassets */; };
-		99C6FE9122768EC000C7070A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 99C6FE8822768EC000C7070A /* LaunchScreen.storyboard */; };
 		99C6FE9222768EC000C7070A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FE8A22768EC000C7070A /* main.m */; };
 		99C6FE96227690BE00C7070A /* YRBaseVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FE95227690BE00C7070A /* YRBaseVC.m */; };
 		99C6FE99227690F800C7070A /* YRBaseNav.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FE98227690F800C7070A /* YRBaseNav.m */; };
@@ -24,6 +23,10 @@
 		99C6FECB227696CA00C7070A /* YRMsgVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FECA227696CA00C7070A /* YRMsgVC.m */; };
 		99C6FECE227697DA00C7070A /* YRContactVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FECD227697DA00C7070A /* YRContactVC.m */; };
 		99C6FED12276982F00C7070A /* YRTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FED02276982F00C7070A /* YRTabBar.m */; };
+		99C6FF172276D13500C7070A /* YRUserInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF162276D13500C7070A /* YRUserInfo.m */; };
+		99C6FF1B2276DD3900C7070A /* YRTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF1A2276DD3900C7070A /* YRTableView.m */; };
+		99C6FF202276E11F00C7070A /* YRMsgMainModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF1F2276E11F00C7070A /* YRMsgMainModel.m */; };
+		99C6FF232276E4C000C7070A /* YRMsgMainCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FF222276E4C000C7070A /* YRMsgMainCell.m */; };
 		C2FE1204E87AA4AC2511A808 /* libPods-UU_Ent.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F21F3925C5D7942C9E06A9B7 /* libPods-UU_Ent.a */; };
 		F135D5FAC9D7DD2641DAF236 /* libPods-UU_EntTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 102F3AF440E73FF2A1EB3208 /* libPods-UU_EntTests.a */; };
 /* End PBXBuildFile section */
@@ -63,7 +66,6 @@
 		99C6FE7D22768EC000C7070A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		99C6FE7E22768EC000C7070A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		99C6FE8722768EC000C7070A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
-		99C6FE8922768EC000C7070A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		99C6FE8A22768EC000C7070A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		99C6FE8B22768EC000C7070A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		99C6FE94227690BE00C7070A /* YRBaseVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRBaseVC.h; sourceTree = "<group>"; };
@@ -85,6 +87,16 @@
 		99C6FECF2276982F00C7070A /* YRTabBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRTabBar.h; sourceTree = "<group>"; };
 		99C6FED02276982F00C7070A /* YRTabBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRTabBar.m; sourceTree = "<group>"; };
 		99C6FF122276A58900C7070A /* UU_Ent.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UU_Ent.pch; sourceTree = "<group>"; };
+		99C6FF132276C90E00C7070A /* libMasonry.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libMasonry.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		99C6FF152276D13500C7070A /* YRUserInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRUserInfo.h; sourceTree = "<group>"; };
+		99C6FF162276D13500C7070A /* YRUserInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRUserInfo.m; sourceTree = "<group>"; };
+		99C6FF192276DD3900C7070A /* YRTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRTableView.h; sourceTree = "<group>"; };
+		99C6FF1A2276DD3900C7070A /* YRTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRTableView.m; sourceTree = "<group>"; };
+		99C6FF1D2276DF2700C7070A /* common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
+		99C6FF1E2276E11F00C7070A /* YRMsgMainModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRMsgMainModel.h; sourceTree = "<group>"; };
+		99C6FF1F2276E11F00C7070A /* YRMsgMainModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRMsgMainModel.m; sourceTree = "<group>"; };
+		99C6FF212276E4C000C7070A /* YRMsgMainCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRMsgMainCell.h; sourceTree = "<group>"; };
+		99C6FF222276E4C000C7070A /* YRMsgMainCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRMsgMainCell.m; sourceTree = "<group>"; };
 		B5220A6F4D02F3A377D1E1D6 /* Pods-UU_EntUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UU_EntUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-UU_EntUITests/Pods-UU_EntUITests.debug.xcconfig"; sourceTree = "<group>"; };
 		DA26F5F8909B0156F0F3EC26 /* Pods-UU_EntTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UU_EntTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-UU_EntTests/Pods-UU_EntTests.debug.xcconfig"; sourceTree = "<group>"; };
 		F21F3925C5D7942C9E06A9B7 /* libPods-UU_Ent.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-UU_Ent.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -258,8 +270,8 @@
 		99C6FE8622768EC000C7070A /* Supporting Files */ = {
 			isa = PBXGroup;
 			children = (
+				99C6FF1C2276DF0D00C7070A /* defines */,
 				99C6FE8722768EC000C7070A /* Assets.xcassets */,
-				99C6FE8822768EC000C7070A /* LaunchScreen.storyboard */,
 				99C6FE8A22768EC000C7070A /* main.m */,
 				99C6FE8B22768EC000C7070A /* Info.plist */,
 				99C6FF122276A58900C7070A /* UU_Ent.pch */,
@@ -277,6 +289,7 @@
 		99C6FE8D22768EC000C7070A /* Utils */ = {
 			isa = PBXGroup;
 			children = (
+				99C6FF182276DD2400C7070A /* tableView */,
 			);
 			path = Utils;
 			sourceTree = "<group>";
@@ -426,6 +439,8 @@
 		99C6FEA92276941900C7070A /* Others */ = {
 			isa = PBXGroup;
 			children = (
+				99C6FF152276D13500C7070A /* YRUserInfo.h */,
+				99C6FF162276D13500C7070A /* YRUserInfo.m */,
 			);
 			path = Others;
 			sourceTree = "<group>";
@@ -486,6 +501,8 @@
 		99C6FEB12276943B00C7070A /* Others */ = {
 			isa = PBXGroup;
 			children = (
+				99C6FF1E2276E11F00C7070A /* YRMsgMainModel.h */,
+				99C6FF1F2276E11F00C7070A /* YRMsgMainModel.m */,
 			);
 			path = Others;
 			sourceTree = "<group>";
@@ -493,6 +510,8 @@
 		99C6FEB22276943C00C7070A /* Views */ = {
 			isa = PBXGroup;
 			children = (
+				99C6FF212276E4C000C7070A /* YRMsgMainCell.h */,
+				99C6FF222276E4C000C7070A /* YRMsgMainCell.m */,
 			);
 			path = Views;
 			sourceTree = "<group>";
@@ -554,9 +573,27 @@
 			path = Main;
 			sourceTree = "<group>";
 		};
+		99C6FF182276DD2400C7070A /* tableView */ = {
+			isa = PBXGroup;
+			children = (
+				99C6FF192276DD3900C7070A /* YRTableView.h */,
+				99C6FF1A2276DD3900C7070A /* YRTableView.m */,
+			);
+			path = tableView;
+			sourceTree = "<group>";
+		};
+		99C6FF1C2276DF0D00C7070A /* defines */ = {
+			isa = PBXGroup;
+			children = (
+				99C6FF1D2276DF2700C7070A /* common.h */,
+			);
+			path = defines;
+			sourceTree = "<group>";
+		};
 		C72D523677B19DCBAEBD26E1 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				99C6FF132276C90E00C7070A /* libMasonry.a */,
 				F21F3925C5D7942C9E06A9B7 /* libPods-UU_Ent.a */,
 				102F3AF440E73FF2A1EB3208 /* libPods-UU_EntTests.a */,
 				F4F857DEEC69AEDCFACDFD51 /* libPods-UU_EntUITests.a */,
@@ -686,7 +723,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				99C6FE9022768EC000C7070A /* Assets.xcassets in Resources */,
-				99C6FE9122768EC000C7070A /* LaunchScreen.storyboard in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -749,7 +785,7 @@
 			files = (
 			);
 			inputPaths = (
-				"${PODS_ROOT}/Target Support Files/Pods-UU_Ent/Pods-UU_Ent-resources.sh",
+				"${SRCROOT}/Pods/Target Support Files/Pods-UU_Ent/Pods-UU_Ent-resources.sh",
 				"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/gRPCCertificates.bundle",
 			);
 			name = "[CP] Copy Pods Resources";
@@ -758,7 +794,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-UU_Ent/Pods-UU_Ent-resources.sh\"\n";
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-UU_Ent/Pods-UU_Ent-resources.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
 		A2F6040888740937A057571A /* [CP] Check Pods Manifest.lock */ = {
@@ -787,14 +823,18 @@
 			buildActionMask = 2147483647;
 			files = (
 				99C6FED12276982F00C7070A /* YRTabBar.m in Sources */,
+				99C6FF232276E4C000C7070A /* YRMsgMainCell.m in Sources */,
 				99C6FECB227696CA00C7070A /* YRMsgVC.m in Sources */,
 				99C6FE9222768EC000C7070A /* main.m in Sources */,
 				99C6FE99227690F800C7070A /* YRBaseNav.m in Sources */,
+				99C6FF202276E11F00C7070A /* YRMsgMainModel.m in Sources */,
 				99C6FE96227690BE00C7070A /* YRBaseVC.m in Sources */,
+				99C6FF172276D13500C7070A /* YRUserInfo.m in Sources */,
 				99C6FEC32276959B00C7070A /* YRWorkVC.m in Sources */,
 				99C6FECE227697DA00C7070A /* YRContactVC.m in Sources */,
 				99C6FEC82276966600C7070A /* YRWebVC.m in Sources */,
 				99C6FEC02276957400C7070A /* YRMineVC.m in Sources */,
+				99C6FF1B2276DD3900C7070A /* YRTableView.m in Sources */,
 				99C6FE8F22768EC000C7070A /* AppDelegate.m in Sources */,
 				99C6FEBA2276950C00C7070A /* YRMainVC.m in Sources */,
 				27029BC72276A23400D53A94 /* YRLoginVC.m in Sources */,
@@ -832,17 +872,6 @@
 		};
 /* End PBXTargetDependency section */
 
-/* Begin PBXVariantGroup section */
-		99C6FE8822768EC000C7070A /* LaunchScreen.storyboard */ = {
-			isa = PBXVariantGroup;
-			children = (
-				99C6FE8922768EC000C7070A /* Base */,
-			);
-			name = LaunchScreen.storyboard;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
 /* Begin XCBuildConfiguration section */
 		99C6FE6E22768B5C00C7070A /* Debug */ = {
 			isa = XCBuildConfiguration;
@@ -961,8 +990,11 @@
 			baseConfigurationReference = 71B4DF45C8EC3368ACFC4193 /* Pods-UU_Ent.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_TEAM = 433WAS8387;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "${SRCROOT}/UU_Ent/Supporting Files/UU_Ent.pch";
 				INFOPLIST_FILE = "UU_Ent/Supporting Files/Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				LD_RUNPATH_SEARCH_PATHS = (
@@ -980,8 +1012,11 @@
 			baseConfigurationReference = 13A4F2D13DACD5857BD40BDE /* Pods-UU_Ent.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_TEAM = 433WAS8387;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "${SRCROOT}/UU_Ent/Supporting Files/UU_Ent.pch";
 				INFOPLIST_FILE = "UU_Ent/Supporting Files/Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				LD_RUNPATH_SEARCH_PATHS = (

+ 11 - 2
UU_Ent/UU_Ent/Modules/App/AppDelegate.m

@@ -7,6 +7,7 @@
 //
 
 #import "AppDelegate.h"
+#import "YRLoginVC.h"
 #import "YRMainVC.h"
 @interface AppDelegate ()
 
@@ -18,11 +19,19 @@
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     // Override point for customization after application launch.
     
-    YRMainVC *mainVC = [[YRMainVC alloc]init];
+    YRLoginVC *loginVC = [[YRLoginVC alloc]init];
+    
+    loginVC.completed = ^(BOOL success) {
+      
+        YRMainVC *mainVC = [[YRMainVC alloc]init];
+        
+        self.window.rootViewController = mainVC;
+        
+    };
     
     self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
     
-    self.window.rootViewController = mainVC;
+    self.window.rootViewController = loginVC;
     
     [self.window makeKeyAndVisible];
     

+ 14 - 0
UU_Ent/UU_Ent/Modules/Base/YRBaseNav.m

@@ -20,5 +20,19 @@
 }
 
 
+-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
+    
+    if (self.childViewControllers.count > 0) {
+        
+        viewController.hidesBottomBarWhenPushed = YES;
+        
+    }
+    
+    
+    [super pushViewController:viewController animated:animated];
+    
+}
+
+
 
 @end

+ 1 - 0
UU_Ent/UU_Ent/Modules/Base/YRBaseVC.m

@@ -17,6 +17,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    [self setUpUI];
 }
 
 

+ 2 - 0
UU_Ent/UU_Ent/Modules/Login/Main/Controllers/YRLoginVC.h

@@ -12,6 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface YRLoginVC : YRBaseVC
 
+@property(copy,nonatomic)void(^completed)(BOOL success);
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 56 - 8
UU_Ent/UU_Ent/Modules/Login/Main/Controllers/YRLoginVC.m

@@ -7,6 +7,9 @@
 //
 
 #import "YRLoginVC.h"
+#import "YRUserInfo.h"
+#import <GRPCClient/GRPCCall+Tests.h>
+#import <UU_Ent/Account.pbrpc.h>
 
 @interface YRLoginVC ()
 
@@ -17,17 +20,62 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    NSLog(@"123456");
+    
 }
 
-/*
-#pragma mark - Navigation
+-(void)setUpUI{
+    
+    self.view.backgroundColor = [UIColor whiteColor];
+    
+    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 80, self.view.frame.size.width, 40)];
+    
+    [self.view addSubview:label];
+    
+    label.text = @"登录";
+    
+}
 
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
+-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
+    
+    [GRPCCall useInsecureConnectionsForHost:kHostAddress];
+    
+    AccountService *client = [[AccountService alloc]initWithHost:kHostAddress];
+    
+    AccountSigninRequest *request = [AccountSigninRequest message];
+    
+    DeviceInfo *model = [DeviceInfo new];
+    model.os = DeviceInfo_OS_Ios;
+    
+    request.deviceInfo = model;
+    
+    request.mobile = @"15018524229";//@"13266699268";
+    
+    request.password = @"111111";
+    
+    [client signinWithRequest:request handler:^(AccountSigninResponse * _Nullable response, NSError * _Nullable error) {
+        
+        if (!error) {//请求成功
+            
+            [YRUserInfo shareManager].token = response.authedToken.token;
+            
+            if (self.completed) {
+                
+                self.completed(YES);
+                
+            }
+            
+        }else{//请求失败
+            
+           
+            
+        }
+        
+        
+    }];
+    
+    
+    
 }
-*/
+
 
 @end

+ 145 - 1
UU_Ent/UU_Ent/Modules/Message/Main/Controllers/YRMsgVC.m

@@ -7,8 +7,18 @@
 //
 
 #import "YRMsgVC.h"
+#import <GRPCClient/GRPCCall+Tests.h>
+#import <UU_Ent/Message.pbrpc.h>
+#import <UU_Ent/Account.pbrpc.h>
+#import "YRUserInfo.h"
+#import "YRMsgMainModel.h"
+#import "YRMsgMainCell.h"
+#import "YRWebVC.h"
+@interface YRMsgVC ()<UITableViewDelegate,UITableViewDataSource>
 
-@interface YRMsgVC ()
+@property(strong,nonatomic)YRTableView *tableView;
+
+@property(strong,nonatomic)NSMutableArray *dataArr;
 
 @end
 
@@ -17,9 +27,143 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    
+}
+
+-(void)setUpUI{
+    
     self.title = @"消息";
+    [self.view addSubview:self.tableView];
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+       
+        make.edges.equalTo(self.view);
+        
+    }];
+    
+    [self getDataFromServer];
+    
 }
 
 
+-(void)getDataFromServer{
+    
+    
+    [GRPCCall useInsecureConnectionsForHost:kHostAddress];
+    
+    MessageService *client = [[MessageService alloc]initWithHost:kHostAddress];
+    
+    GetMessageConfigRequest *request = [GetMessageConfigRequest message];
+    
+    GRPCProtoCall *call = [client RPCTogetConfigWithRequest:request handler:^(GetMessageConfigResponse * _Nullable response, NSError * _Nullable error) {
+        
+        if (!error) {//请求成功
+            
+            NSDictionary *dict = response.mj_keyValues;
+            
+            self.dataArr = [YRMsgMainModel mj_objectArrayWithKeyValuesArray:dict[@"configArray"]];
+            
+            [self.tableView reloadData];
+            
+        }else{//请求失败
+            
+
+            
+        }
+        
+    }];
+    
+    call.requestHeaders[@"authentication"] = [YRUserInfo shareManager].token ;
+    
+    [call start];
+    
+}
+
+#pragma mark - delegate && dataSource
+
+-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    
+    return 1;
+    
+}
+
+-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    
+    return self.dataArr.count;
+    
+}
+
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    YRMsgMainCell *cell = [tableView dequeueReusableCellWithIdentifier:@"YRMsgMainCellReid"];
+    
+    if (!cell) {
+        
+        cell = [[YRMsgMainCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"YRMsgMainCellReid"];
+        
+    }
+    
+    if (indexPath.row < self.dataArr.count) {
+        
+        cell.model = self.dataArr[indexPath.row];
+        
+    }
+    
+    return cell;
+}
+
+
+-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    return 66;
+    
+}
+
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+    YRMsgMainModel *model = self.dataArr[indexPath.row];
+    
+    if (model.viewType == 0) {//原生
+        
+        
+        
+    }else{//网页
+        
+        YRWebVC *webVC = [[YRWebVC alloc]init];
+        
+        webVC.url = model.webURL;
+        
+        [self.navigationController pushViewController:webVC animated:YES];
+        
+    }
+    
+}
+
+-(YRTableView *)tableView{
+    
+    if (!_tableView) {
+        
+        _tableView = [[YRTableView alloc]initWithFrame:self.view.frame];
+        _tableView.delegate = self;
+        _tableView.dataSource = self;
+        _tableView.tableHeaderView = [UIView new];
+        _tableView.tableFooterView = [UIView new];
+        
+    }
+ 
+    return _tableView;
+}
+
+-(NSMutableArray *)dataArr{
+    
+    if (!_dataArr) {
+        
+        _dataArr = [[NSMutableArray alloc]init];
+        
+    }
+    
+    return _dataArr;
+}
 
 @end

+ 67 - 0
UU_Ent/UU_Ent/Modules/Message/Main/Others/YRMsgMainModel.h

@@ -0,0 +1,67 @@
+//
+//  YRMsgMainModel.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/4/29.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+/*
+ androidWidget = "/main/notice";
+ code = "uas.notice";
+ icon = "icon_notice";
+ initialized = 1;
+ iosWidget = noticeAnnouncement;
+ name = "\U901a\U77e5\U516c\U544a";
+ viewType = 0;
+ webURL = "";
+ 
+ */
+@interface YRMsgMainModel : NSObject
+
+/**
+ 安卓平台跳转
+ */
+@property(copy,nonatomic)NSString *androidWidget;
+
+/**
+ 类型编码
+ */
+@property(copy,nonatomic)NSString *code;
+
+/**
+ 图标
+ */
+@property(copy,nonatomic)NSString *icon;
+
+/**
+ iOS平台跳转
+ */
+@property(copy,nonatomic)NSString *iosWidget;
+
+/**
+ 名称
+ */
+@property(copy,nonatomic)NSString *name;
+
+/**
+ 是否初始化
+ */
+@property(assign,nonatomic)NSUInteger initialized;
+
+/**
+ 跳转的判断,0为原生,1为网页
+ */
+@property(assign,nonatomic)NSUInteger viewType;
+
+/**
+ 网页地址
+ */
+@property(copy,nonatomic)NSString *webURL;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 13 - 0
UU_Ent/UU_Ent/Modules/Message/Main/Others/YRMsgMainModel.m

@@ -0,0 +1,13 @@
+//
+//  YRMsgMainModel.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/4/29.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRMsgMainModel.h"
+
+@implementation YRMsgMainModel
+
+@end

+ 19 - 0
UU_Ent/UU_Ent/Modules/Message/Main/Views/YRMsgMainCell.h

@@ -0,0 +1,19 @@
+//
+//  YRMsgMainCell.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/4/29.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "YRMsgMainModel.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface YRMsgMainCell : UITableViewCell
+
+@property(strong,nonatomic)YRMsgMainModel *model;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 31 - 0
UU_Ent/UU_Ent/Modules/Message/Main/Views/YRMsgMainCell.m

@@ -0,0 +1,31 @@
+//
+//  YRMsgMainCell.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/4/29.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRMsgMainCell.h"
+
+@implementation YRMsgMainCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(nullable NSString *)reuseIdentifier{
+    
+    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
+        
+        [self setUpUI];
+        
+    }
+    
+    return self;
+}
+
+
+-(void)setUpUI{
+    
+    
+    
+}
+
+@end

+ 25 - 0
UU_Ent/UU_Ent/Modules/Mine/Main/Others/YRUserInfo.h

@@ -0,0 +1,25 @@
+//
+//  YRUserInfo.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/4/29.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface YRUserInfo : NSObject
+
++(instancetype)shareManager;
+
+/**
+ token
+ */
+@property(copy,nonatomic)NSString *token;
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 29 - 0
UU_Ent/UU_Ent/Modules/Mine/Main/Others/YRUserInfo.m

@@ -0,0 +1,29 @@
+//
+//  YRUserInfo.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/4/29.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRUserInfo.h"
+
+@implementation YRUserInfo
+
++(instancetype)shareManager{
+    
+    static YRUserInfo *instance = nil;
+    
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        
+        instance = [YRUserInfo new];
+       
+        
+    });
+    
+    return instance;
+    
+}
+
+@end

+ 72 - 2
UU_Ent/UU_Ent/Modules/Web/Main/YRWebVC.m

@@ -7,9 +7,13 @@
 //
 
 #import "YRWebVC.h"
+#import <JavaScriptCore/JavaScriptCore.h>
 #import <WebKit/WebKit.h>
-@interface YRWebVC ()
+@interface YRWebVC ()<WKUIDelegate,WKNavigationDelegate,WKScriptMessageHandler,UINavigationControllerDelegate>
 
+@property(strong,nonatomic)WKWebView *webView;
+@property(nonatomic,strong)JSContext *context;
+@property(nonatomic,strong)WKUserContentController *userContentController;
 
 @end
 
@@ -17,9 +21,75 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    // Do any additional setup after loading the view.
+    
 }
 
 
+-(void)setUpUI{
+    
+    //创建配置对象
+    WKWebViewConfiguration *webConfig = [[WKWebViewConfiguration alloc]init];
+    
+    //为配置对象设置偏好设置
+    WKPreferences *preferences = [[WKPreferences alloc]init];
+    webConfig.preferences = preferences;
+    
+    //允许js和native交互
+    preferences.javaScriptEnabled = YES;
+    
+    WKUserContentController *userContent = [[WKUserContentController alloc]init];
+    //监听相应的事件
+    webConfig.userContentController = userContent;
+    self.userContentController = userContent;
+    
+    self.webView = [[WKWebView alloc]initWithFrame:CGRectMake(0, 64, self.view.frame.size.width, self.view.frame.size.height) configuration:webConfig];
+    
+    [self.view addSubview:self.webView];
+    
+    [self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
+       
+        make.edges.equalTo(self.view);
+        
+    }];
+    
+    self.webView.navigationDelegate = self;
+    
+    
+    NSURL *url = [NSURL URLWithString:self.url];
+    
+    NSURLRequest *request = [NSURLRequest requestWithURL:url];
+    
+    [self.webView loadRequest:request];
+    
+    
+}
+
+-(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
+    
+    [self.webView evaluateJavaScript:@"document.title" completionHandler:^(NSString * _Nullable title , NSError * _Nullable error) {
+        
+        self.title = title;
+        
+    }];
+    
+    
+}
+//接受js发送的消息
+-(void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message{
+    
+    if ([message.name isEqualToString:@"event"]) {
+        
+        
+        
+        
+    }
+    
+}
+
+-(void)dealloc{
+    
+    [self.userContentController removeScriptMessageHandlerForName:@"event"];
+    
+}
 
 @end

BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/1125X2436.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/1242X2208.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/640X1136.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/640X960.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/750X1334.png


+ 100 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/LaunchImage.launchimage/Contents.json

@@ -0,0 +1,100 @@
+{
+  "images" : [
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "12.0",
+      "subtype" : "2688h",
+      "scale" : "3x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "12.0",
+      "subtype" : "2688h",
+      "scale" : "3x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "12.0",
+      "subtype" : "1792h",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "12.0",
+      "subtype" : "1792h",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "2436h",
+      "filename" : "1125X2436.png",
+      "minimum-system-version" : "11.0",
+      "orientation" : "portrait",
+      "scale" : "3x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "11.0",
+      "subtype" : "2436h",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "736h",
+      "filename" : "1242X2208.png",
+      "minimum-system-version" : "8.0",
+      "orientation" : "portrait",
+      "scale" : "3x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "8.0",
+      "subtype" : "736h",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "667h",
+      "filename" : "750X1334.png",
+      "minimum-system-version" : "8.0",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "640X960.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "retina4",
+      "filename" : "640X1136.png",
+      "minimum-system-version" : "7.0",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 0 - 25
UU_Ent/UU_Ent/Supporting Files/Base.lproj/LaunchScreen.storyboard

@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <scenes>
-        <!--View Controller-->
-        <scene sceneID="EHf-IW-A2E">
-            <objects>
-                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                        <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
-                    </view>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="53" y="375"/>
-        </scene>
-    </scenes>
-</document>

+ 0 - 2
UU_Ent/UU_Ent/Supporting Files/Info.plist

@@ -20,8 +20,6 @@
 	<string>1</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
-	<key>UILaunchStoryboardName</key>
-	<string>LaunchScreen</string>
 	<key>UIRequiredDeviceCapabilities</key>
 	<array>
 		<string>armv7</string>

+ 5 - 2
UU_Ent/UU_Ent/Supporting Files/UU_Ent.pch

@@ -8,7 +8,10 @@
 
 #ifndef UU_Ent_pch
 #define UU_Ent_pch
+#import "common.h"
 
-
-
+#import<Masonry/Masonry.h>
+#import<MJExtension/MJExtension.h>
+#import "YRUserInfo.h"
+#import "YRTableView.h"
 #endif /* UU_Ent_pch */

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

@@ -0,0 +1,15 @@
+//
+//  common.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/4/29.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#ifndef common_h
+#define common_h
+#import <UIKit/UIKit.h>
+
+static NSString * const kHostAddress = @"10.1.81.83:9620";
+
+#endif /* common_h */

+ 17 - 0
UU_Ent/UU_Ent/Utils/tableView/YRTableView.h

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

+ 15 - 0
UU_Ent/UU_Ent/Utils/tableView/YRTableView.m

@@ -0,0 +1,15 @@
+//
+//  YRTableView.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/4/29.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "YRTableView.h"
+
+@implementation YRTableView
+
+
+
+@end