Steven 2 years ago
parent
commit
14507042af
50 changed files with 384 additions and 196 deletions
  1. BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  2. 22 54
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 5 0
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.h
  4. 137 27
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  5. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_course_share.imageset/Contents.json
  6. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_course_share.imageset/live_share@2x.png
  7. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_course_share.imageset/live_share@3x.png
  8. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_ikon.imageset/home_ikon@2x.png
  9. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_ikon.imageset/home_ikon@3x.png
  10. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineLive_active.imageset/mineLive_active@2x.png
  11. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineLive_active.imageset/mineLive_active@3x.png
  12. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineLive_nomal.imageset/mineLive_nomal@2x.png
  13. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineLive_nomal.imageset/mineLive_nomal@3x.png
  14. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineMusic_active.imageset/mineMusic_active@2x.png
  15. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineMusic_active.imageset/mineMusic_active@3x.png
  16. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineMusic_nomal.imageset/mineMusic_nomal@2x.png
  17. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineMusic_nomal.imageset/mineMusic_nomal@3x.png
  18. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineStyle_active.imageset/mineStyle_active@2x.png
  19. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineStyle_active.imageset/mineStyle_active@3x.png
  20. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineStyle_nomal.imageset/mineStyle_nomal@2x.png
  21. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineStyle_nomal.imageset/mineStyle_nomal@3x.png
  22. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineVideo_active.imageset/mineVideo_active@2x.png
  23. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineVideo_active.imageset/mineVideo_active@3x.png
  24. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineVideo_nomal.imageset/mineVideo_nomal@2x.png
  25. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineVideo_nomal.imageset/mineVideo_nomal@3x.png
  26. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/status_authing.imageset/status_authing@2x.png
  27. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/status_authing.imageset/status_authing@3x.png
  28. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/status_unAuth.imageset/status_unAuth@2x.png
  29. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/status_unAuth.imageset/status_unAuth@3x.png
  30. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Base.lproj/LaunchScreen.storyboard
  31. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseViewController.m
  32. 0 4
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSRCIMDataSource.m
  33. 30 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  34. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/FreezeListViewController.m
  35. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/IncomeRecordHeadView.h
  36. 18 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/IncomeRecordHeadView.m
  37. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/IncomeRecordHeadView.xib
  38. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/MyIncomeListCell.m
  39. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m
  40. 8 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m
  41. 12 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m
  42. 42 45
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.xib
  43. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeNavView.xib
  44. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.m
  45. 42 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m
  46. 10 14
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageTopView.xib
  47. 10 14
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.xib
  48. 6 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineNavView.h
  49. 6 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineNavView.m
  50. 18 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineNavView.xib

BIN
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 22 - 54
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -649,8 +649,8 @@
             filePath = "KulexiuForTeacher/AppDelegate.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "659"
-            endingLineNumber = "659"
+            startingLineNumber = "653"
+            endingLineNumber = "653"
             landmarkName = "-getVCUserInfoDict:"
             landmarkType = "7">
          </BreakpointContent>
@@ -665,8 +665,8 @@
             filePath = "KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "36"
-            endingLineNumber = "36"
+            startingLineNumber = "37"
+            endingLineNumber = "37"
             landmarkName = "-refreshView"
             landmarkType = "7">
          </BreakpointContent>
@@ -818,22 +818,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "120EF888-B33A-40B3-AD68-AE093061823D"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Login/Model/UserInfoManager.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "133"
-            endingLineNumber = "133"
-            landmarkName = "-queryUserInfoConnectRongCloud:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "451323DA-57B6-4068-B93A-B2EF3FD80E77"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -930,22 +914,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "9C80762C-C9B4-4929-860A-69A628EAC212"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/Controller/HomeViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "202"
-            endingLineNumber = "202"
-            landmarkName = "-requestHomeButton"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "44164F8D-AEE9-4B1A-9AFB-6E9F05102DF0"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -978,22 +946,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "FD68DCA4-D6D4-40BF-860A-FC0F44F9B628"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/Controller/MineViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "95"
-            endingLineNumber = "95"
-            landmarkName = "-requsetUserMessage"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "9D463288-7D23-4CCD-802E-7FE580596AA1"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
@@ -1017,8 +969,8 @@
             filePath = "KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "159"
-            endingLineNumber = "159"
+            startingLineNumber = "163"
+            endingLineNumber = "163"
             landmarkName = "-requestData"
             landmarkType = "7">
          </BreakpointContent>
@@ -1055,5 +1007,21 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "84AD3706-FFAD-49C0-ACD9-0C1BE4559E28"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Login/Controller/VefiCodeLoginController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "137"
+            endingLineNumber = "137"
+            landmarkName = "-loginAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 5 - 0
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.h

@@ -18,11 +18,16 @@
 //记录当前界面是否支持横竖屏旋转
 @property (assign, nonatomic)BOOL allowAutoRotate;
 
+@property (nonatomic, strong) NSMutableDictionary *outLinkParm;
+
+
 - (void)initTableBar;
 - (void)requestRongCloudToken;
 - (void)appTrackActionAuth;
 
 - (void)initLoginView;
 
+- (void)handleNotiferSource;
+
 @end
 

+ 137 - 27
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -39,6 +39,7 @@
 #import "GuideViewController.h"
 #import "MyCourseViewController.h"
 #import "NotiferMessageViewController.h"
+#import "MyMusicViewController.h"
 #import "LaunchAnimationViewController.h"
 
 @interface RCNaviDataInfo : NSObject
@@ -65,11 +66,6 @@
 
 @property (nonatomic, assign) BOOL hasCheckTrackAuth;
 
-/// 推送的数据
-@property (nonatomic, strong) NSMutableDictionary *notiferParm;
-
-@property (nonatomic, strong) NSURL *outlinkUrl;
-
 @end
 
 @implementation AppDelegate
@@ -179,12 +175,6 @@
             [self initTableBar];
             self.window.rootViewController=_tabBarController;
             
-            if (self.notiferParm) {
-                [self getVCUserInfoDict:self.notiferParm];
-            }
-            else if (self.outlinkUrl) {
-                [self handleOutLink:self.outlinkUrl];
-            }
         }
     }
 }
@@ -589,14 +579,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     completionHandler();  // 系统要求执行这个方法
     
     NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithDictionary:userInfo];
-    UIViewController *vc = self.window.rootViewController;
-    
-    if ([vc isKindOfClass:[LaunchAnimationViewController class]]) {
-        self.notiferParm = [NSMutableDictionary dictionaryWithDictionary:infoDict];
-    }
-    else {
-        [self getVCUserInfoDict:infoDict];
-    }
+    [self getVCUserInfoDict:infoDict];
 }
 
 #pragma mark 根据不同消息跳转不同界面
@@ -606,6 +589,12 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
         NSError *error;
         NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
         if (!error) {
+            UIViewController *vc = self.window.rootViewController;
+            NSString *token = UserDefault(TokenKey);
+            if ([vc isKindOfClass:[LaunchAnimationViewController class]] || [NSString isEmptyString:token]) {
+                self.outLinkParm = [NSMutableDictionary dictionaryWithDictionary:dict];
+                return;
+            }
             NSString *action = [dict stringValueForKey:@"action"];
             if ([action isEqualToString:@"app"]) { // 跳原生
                 NSString *pageType = [dict stringValueForKey:@"pageTag"];
@@ -632,6 +621,11 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                         [navCtrl pushViewController:detailVC animated:YES];
                     }
                 }
+                else if ([pageType isEqualToString:@"musicSheet"]) {
+                    MyMusicViewController *musicCtrl = [[MyMusicViewController alloc] init];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl pushViewController:musicCtrl animated:YES];
+                }
                 else if ([pageType isEqualToString:@"message"]) {
                     UIViewController *vc = [UIApplication sharedApplication].keyWindow.rootViewController;
                     if ([vc isKindOfClass:[UITabBarController class]]) {
@@ -848,6 +842,12 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                 return NO;
             }
             else {
+                UIViewController *vc = self.window.rootViewController;
+                NSString *token = UserDefault(TokenKey);
+                if ([vc isKindOfClass:[LaunchAnimationViewController class]] || [NSString isEmptyString:token]) {
+                    self.outLinkParm = [NSMutableDictionary dictionaryWithDictionary:dict];
+                    return NO;
+                }
                 NSString *action = [dict stringValueForKey:@"action"];
                 if ([action isEqualToString:@"app"]) {
                     NSString *pageType = [dict stringValueForKey:@"pageTag"];
@@ -890,15 +890,8 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 }
 #pragma mark ---- 处理外链
 - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
-    UIViewController *vc = self.window.rootViewController;
-    if ([vc isKindOfClass:[LaunchAnimationViewController class]]) {
-        self.outlinkUrl = url;
-        return YES;
-    }
-    else {
-        return [self handleOutLink:url];
-    }
     
+    return [self handleOutLink:url];
 }
 
 - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
@@ -923,4 +916,121 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     }
     return _alertView;
 }
+
+- (void)handleNotiferSource {
+    if (self.outLinkParm) {
+        NSDictionary *dict = [NSDictionary dictionaryWithDictionary:self.outLinkParm];
+        NSString *action = [dict stringValueForKey:@"action"];
+        if ([action isEqualToString:@"app"]) { // 跳原生
+            NSString *pageType = [dict stringValueForKey:@"pageTag"];
+            if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->陪练课
+                DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
+                MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+                [ctrl displayWithIndex:index];
+                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                [navCtrl pushViewController:ctrl animated:YES];
+            }
+            else if ([pageType isEqualToString:@"liveClass"]) { // 我的课程 ->直播课
+                DISPLAY_INDEX index = DISPLAY_INDEX_LIVE;
+                MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+                [ctrl displayWithIndex:index];
+                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                [navCtrl pushViewController:ctrl animated:YES];
+            }
+            else if ([pageType isEqualToString:@"videoClass"]) { // 我的课程 ->视频课
+                DISPLAY_INDEX index = DISPLAY_INDEX_VIEO;
+                MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+                [ctrl displayWithIndex:index];
+                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                [navCtrl pushViewController:ctrl animated:YES];
+            }
+            else if ([pageType isEqualToString:@"buyPractice"] || [pageType isEqualToString:@"courseRemind"]) {
+                [self.tabBarController tabBarSelectedWithIndex:1];
+                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                [navCtrl popToRootViewControllerAnimated:YES];
+            }
+            else if ([pageType isEqualToString:@"evaluate"]) {
+                [self.tabBarController tabBarSelectedWithIndex:0];
+                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                ReceiveEvaluateListController *ctrl = [[ReceiveEvaluateListController alloc] init];
+                [navCtrl pushViewController:ctrl animated:YES];
+            }
+            else if ([pageType isEqualToString:@"homework"]) {
+                NSString *parmString = [dict stringValueForKey:@"params"];
+                NSData *parmData = [parmString mj_JSONData];
+                NSError *error;
+                NSDictionary *parm = [NSJSONSerialization JSONObjectWithData:parmData options:NSJSONReadingMutableContainers error:&error];
+                if (!error) {
+                    HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
+                    detailVC.courseId = [parm stringValueForKey:@"courseId"];
+                    detailVC.studentId = [parm stringValueForKey:@"studentId"];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl pushViewController:detailVC animated:YES];
+                }
+            }
+            else if ([pageType isEqualToString:@"musicSheet"]) {
+                MyMusicViewController *musicCtrl = [[MyMusicViewController alloc] init];
+                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                [navCtrl pushViewController:musicCtrl animated:YES];
+            }
+            else if ([pageType isEqualToString:@"message"]) {
+                UIViewController *vc = [UIApplication sharedApplication].keyWindow.rootViewController;
+                if ([vc isKindOfClass:[UITabBarController class]]) {
+                    KSTabBarViewController *tabCtrl = (KSTabBarViewController *)vc;
+                    CustomNavViewController *navCtrl = (CustomNavViewController *)tabCtrl.selectedViewController;
+                    if ([navCtrl.visibleViewController isKindOfClass:NSClassFromString(@"NotiferMessageViewController")]) {
+                        NotiferMessageViewController *ctrl = (NotiferMessageViewController *)navCtrl.visibleViewController;
+                        [ctrl refreshView];
+                    }
+                    else {
+                        [self.tabBarController tabBarSelectedWithIndex:0];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
+                        [navCtrl pushViewController:ctrl animated:YES];
+                    }
+                }
+                else {
+                    [self.tabBarController tabBarSelectedWithIndex:0];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
+                    [navCtrl pushViewController:ctrl animated:YES];
+                }
+            }
+            else {  // 统一跳转消息列表
+                UIViewController *vc = [UIApplication sharedApplication].keyWindow.rootViewController;
+                if ([vc isKindOfClass:[UITabBarController class]]) {
+                    KSTabBarViewController *tabCtrl = (KSTabBarViewController *)vc;
+                    CustomNavViewController *navCtrl = (CustomNavViewController *)tabCtrl.selectedViewController;
+                    if ([navCtrl.visibleViewController isKindOfClass:NSClassFromString(@"NotiferMessageViewController")]) {
+                        NotiferMessageViewController *ctrl = (NotiferMessageViewController *)navCtrl.visibleViewController;
+                        [ctrl refreshView];
+                    }
+                    else {
+                        [self.tabBarController tabBarSelectedWithIndex:0];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
+                        [navCtrl pushViewController:ctrl animated:YES];
+                    }
+                }
+                else {
+                    [self.tabBarController tabBarSelectedWithIndex:0];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
+                    [navCtrl pushViewController:ctrl animated:YES];
+                }
+            }
+        }
+        else {
+            NSString *webUrl = [dict stringValueForKey:@"url"];
+            if (![NSString isEmptyString:webUrl]) {
+                KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+                webCtrl.url = webUrl;
+                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                [navCtrl pushViewController:webCtrl animated:YES];
+            }
+        }
+        self.outLinkParm = nil;
+    }
+    
+}
 @end

+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_share.imageset/Contents.json → KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_course_share.imageset/Contents.json


+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_share.imageset/live_share@2x.png → KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_course_share.imageset/live_share@2x.png


+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_share.imageset/live_share@3x.png → KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/Income/live_course_share.imageset/live_share@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_ikon.imageset/home_ikon@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_ikon.imageset/home_ikon@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineLive_active.imageset/mineLive_active@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineLive_active.imageset/mineLive_active@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineLive_nomal.imageset/mineLive_nomal@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineLive_nomal.imageset/mineLive_nomal@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineMusic_active.imageset/mineMusic_active@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineMusic_active.imageset/mineMusic_active@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineMusic_nomal.imageset/mineMusic_nomal@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineMusic_nomal.imageset/mineMusic_nomal@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineStyle_active.imageset/mineStyle_active@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineStyle_active.imageset/mineStyle_active@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineStyle_nomal.imageset/mineStyle_nomal@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineStyle_nomal.imageset/mineStyle_nomal@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineVideo_active.imageset/mineVideo_active@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineVideo_active.imageset/mineVideo_active@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineVideo_nomal.imageset/mineVideo_nomal@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/home_vefi/mineVideo_nomal.imageset/mineVideo_nomal@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/status_authing.imageset/status_authing@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/status_authing.imageset/status_authing@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/status_unAuth.imageset/status_unAuth@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/status_unAuth.imageset/status_unAuth@3x.png


+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Base.lproj/LaunchScreen.storyboard

@@ -17,13 +17,13 @@
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_image" translatesAutoresizingMaskIntoConstraints="NO" id="ObI-Og-Jqj">
+                            <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_image" translatesAutoresizingMaskIntoConstraints="NO" id="ObI-Og-Jqj">
                                 <rect key="frame" x="0.0" y="104" width="414" height="503"/>
                                 <constraints>
                                     <constraint firstAttribute="width" secondItem="ObI-Og-Jqj" secondAttribute="height" multiplier="414:503" id="B0Y-KY-0Pc"/>
                                 </constraints>
                             </imageView>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_logo" translatesAutoresizingMaskIntoConstraints="NO" id="ETs-TJ-e61">
+                            <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_logo" translatesAutoresizingMaskIntoConstraints="NO" id="ETs-TJ-e61">
                                 <rect key="frame" x="149.5" y="652" width="115" height="34"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="115" id="9Fb-xk-qeA"/>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseViewController.m

@@ -433,7 +433,7 @@
 
 // 关闭菊花
 -(void)removehub{
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         [self removeLoadingView];
     });
 }

+ 0 - 4
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSRCIMDataSource.m

@@ -113,10 +113,6 @@
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSDictionary *result = [dic dictionaryValueForKey:@"data"];
             NSString *name = [result stringValueForKey:@"nickname"];
-            NSString *title = [result stringValueForKey:@"roleType"];
-            if (![NSString isEmptyString:title]) {
-                name = [NSString stringWithFormat:@"%@(%@)", name, title];
-            }
             NSDictionary *userDic = [result dictionaryValueForKey:@"user"];
             RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:userId name:name portrait:[userDic stringValueForKey:@"avatar"]];
             completion(user);

+ 30 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -64,6 +64,7 @@
 @property (nonatomic, assign) NSInteger buttonDotWidth;
 @property (nonatomic, assign) CGFloat buttonViewHeight; // button view 高度
 
+@property (nonatomic, assign) BOOL isFirstLoad;
 
 @end
 
@@ -73,6 +74,7 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     self.ks_prefersNavigationBarHidden = YES;
+    self.isFirstLoad = YES;
     [self configUI];
 }
 
@@ -292,7 +294,7 @@
     }];
     [self.view addSubview:self.navView];
     [self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.width.mas_equalTo(100);
+        make.width.mas_equalTo(60);
         make.right.top.mas_equalTo(self.view);
         make.height.mas_equalTo(kNaviBarHeight);
     }];
@@ -311,7 +313,7 @@
     [topView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
         make.top.mas_equalTo(self.scrollView.mas_top);
-        make.height.mas_equalTo(kNaviBarHeight+15);
+        make.height.mas_equalTo(kNaviBarHeight - 34.5);
     }];
     
     [self.scrollView addSubview:self.headView];
@@ -356,20 +358,35 @@
         make.height.mas_equalTo(bodyViewHeight);
         make.bottom.mas_equalTo(self.scrollView.mas_bottom);
     }];
+    
+//    MJWeakSelf;
+//    self.scrollView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
+//        [weakSelf requestData];
+//    }];
 }
 
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
+- (void)requestData {
     [self requestUserInfo];
     [self requestUserMemo];
     [self requestCountMessage];
     [self requestNotice];
     [self requestRecentCourse];
     [self requestUnreadCount];
-    [self requestTrackAuth];
     [self requestHomeButton];
 }
 
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    if (self.isFirstLoad == YES) {
+        self.isFirstLoad = NO;
+        [self requestTrackAuth];
+        AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+        [appDelegate handleNotiferSource];
+    }
+    
+    [self requestData];
+}
+
 // track
 - (void)requestTrackAuth {
     
@@ -496,7 +513,12 @@
         _headView = [HomeHeadView shareInstance];
         MJWeakSelf;
         [_headView operationCallback:^(HOMEHEADACTION action) {
-                    
+            if (action == HOMEHEADACTION_AUTH) {
+                [weakSelf toAuthDetail];
+            }
+            else {
+                [weakSelf toUserCenter];
+            }
         }];
     }
     return _headView;
@@ -693,7 +715,7 @@
 #pragma mark ---- scroll view delegate
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
     if (scrollView == self.buttonScrollView) {
-        NSInteger index = (NSInteger)(scrollView.contentOffset.x / KPortraitWidth);
+        NSInteger index = (NSInteger)(scrollView.contentOffset.x / (KPortraitWidth - 28));
         
         [UIView animateWithDuration:0.3f animations:^{
             self.buttonContainer.buttonDotLeft.constant = index * self.buttonDotWidth;
@@ -712,7 +734,7 @@
 
 - (UIScrollView *)buttonScrollView {
     if (!_buttonScrollView) {
-        _buttonScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, BUTTONHEIGHT)];
+        _buttonScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, (KPortraitWidth - 28), BUTTONHEIGHT)];
         _buttonScrollView.backgroundColor = [UIColor clearColor];
         _buttonScrollView.pagingEnabled = YES;
         _buttonScrollView.showsHorizontalScrollIndicator = NO;

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/FreezeListViewController.m

@@ -208,6 +208,7 @@
 - (IncomeRecordHeadView *)headView {
     if (!_headView) {
         _headView = [IncomeRecordHeadView shareInstance];
+        _headView.hideSortType = YES;
         [_headView configWithLogo:@"freeze_logo" descTitle:@"冻结金额(元)" bgImageName:@"freeze_bg" titleColor:HexRGB(0x225791) fromColor:HexRGB(0xBDE6FF) toColor:HexRGB(0xA1D6FF)];
         MJWeakSelf;
         [_headView headerActionCallback:^(INCOMERECORD_ACTION action) {

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/IncomeRecordHeadView.h

@@ -29,6 +29,8 @@ typedef void(^IncomeRecordAction)(INCOMERECORD_ACTION action);
 
 @property (nonatomic, assign) BOOL secondArrowUp;
 
+@property (nonatomic, assign) BOOL hideSortType;
+
 + (instancetype)shareInstance;
 
 - (void)configWithLogo:(NSString *)logoName descTitle:(NSString *)title bgImageName:(NSString *)bgImageName titleColor:(UIColor *)titleColor fromColor:(UIColor *)fromColor toColor:(UIColor *)toColor;

+ 18 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/IncomeRecordHeadView.m

@@ -21,6 +21,8 @@
 
 @property (weak, nonatomic) IBOutlet UIImageView *secondArrow;
 
+@property (weak, nonatomic) IBOutlet UIButton *secondButton;
+
 @end
 
 @implementation IncomeRecordHeadView
@@ -83,7 +85,22 @@
 }
 
 + (CGFloat)getViewHeight {
-    return 210;
+    return 150;
+}
+
+
+- (void)setHideSortType:(BOOL)hideSortType {
+    _hideSortType = hideSortType;
+    if (hideSortType) {
+        self.typeLabel.hidden = YES;
+        self.secondArrow.hidden = YES;
+        self.secondButton.userInteractionEnabled = NO;
+    }
+    else {
+        self.typeLabel.hidden = NO;
+        self.secondArrow.hidden = NO;
+        self.secondButton.userInteractionEnabled = YES;
+    }
 }
 /*
 // Only override drawRect: if you perform custom drawing.

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/IncomeRecordHeadView.xib

@@ -10,7 +10,7 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="IncomeRecordHeadView">
-            <rect key="frame" x="0.0" y="0.0" width="414" height="159"/>
+            <rect key="frame" x="0.0" y="0.0" width="414" height="150"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zUh-gn-ND1">
@@ -155,6 +155,7 @@
                 <outlet property="logoImage" destination="Wt6-en-vfS" id="Fqu-FG-x5L"/>
                 <outlet property="moneyLabel" destination="et3-t3-Bdu" id="vYw-S2-e9k"/>
                 <outlet property="secondArrow" destination="Upn-9d-IWI" id="Kbf-Jc-VeQ"/>
+                <outlet property="secondButton" destination="QZU-TS-r4e" id="Wra-wW-a1N"/>
                 <outlet property="timeLabel" destination="zcf-Dd-oZl" id="u6m-lM-Kcc"/>
                 <outlet property="typeLabel" destination="Xwz-Ng-Stf" id="ok9-Jw-Oga"/>
             </connections>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/MyIncomeListCell.m

@@ -87,7 +87,7 @@
         self.courseTime.text = createTime;
     }
     else if ([sourceModel.bizType isEqualToString:@"LIVE_SHARE"]) {
-        [self.courseTypeImage setImage:[UIImage imageNamed:@"live_share"]];
+        [self.courseTypeImage setImage:[UIImage imageNamed:@"live_course_share"]];
         [dateFormatter setDateFormat:@"yyyy/MM/dd HH:mm"];
         NSString *createTime = [NSString returnNoNullStringWithString:[dateFormatter stringFromDate:createDate]];
         self.courseTime.text = createTime;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m

@@ -188,7 +188,7 @@
 
 - (void)layoutSubviews {
     [super layoutSubviews];
-    CGFloat topHeight = self.selectIndex == 0 ? 0 : 60.0f;
+    CGFloat topHeight = self.selectIndex == 0 ? 10 : 60.0f;
     self.tableView.frame = CGRectMake(0, topHeight, self.bounds.size.width, self.bounds.size.height - topHeight);
     if (!_uploadView && self.selectIndex != 0) {
         self.uploadView = [MusicUploadView shareInstance];

+ 8 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m

@@ -15,6 +15,7 @@
 #import "HomeworkDetailViewController.h"
 #import "UIButton+EnlargeEdge.h"
 #import "NotiferNavView.h"
+#import "MyMusicViewController.h"
 
 @interface NotiferMessageViewController ()<UITableViewDelegate, UITableViewDataSource>
 
@@ -126,6 +127,9 @@
             if (courseCount > 0 || sysCount > 0) {
                 self.hasUnreadCount = YES;
             }
+            else {
+                self.hasUnreadCount = NO;
+            }
             [self.headView configUnreadCountCourse:courseCount sysMessage:sysCount];
         }
         else {
@@ -254,6 +258,10 @@
                         [self.navigationController pushViewController:detailVC animated:YES];
                     }
                 }
+                else if ([pageType isEqualToString:@"musicSheet"]) {
+                    MyMusicViewController *musicCtrl = [[MyMusicViewController alloc] init];
+                    [self.navigationController pushViewController:musicCtrl animated:YES];
+                }
             }
             else {
                 NSString *webUrl = [dict stringValueForKey:@"url"];

+ 12 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m

@@ -38,6 +38,9 @@
 @property (weak, nonatomic) IBOutlet UIImageView *liveImage;
 @property (weak, nonatomic) IBOutlet UIImageView *musicImage;
 
+@property (weak, nonatomic) IBOutlet UIImageView *authImage;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *authViewWidth;
+
 @end
 
 @implementation HomeHeadView
@@ -61,7 +64,14 @@
         self.hasAuthTeacher = NO;
         self.authView.hidden = NO;
         self.descView.hidden = YES;
-       
+        if ([infoMessage.entryStatus isEqualToString:@"DOING"]) {
+            [self.authImage setImage:[UIImage imageNamed:@"status_authing"]];
+            self.authViewWidth.constant = 128;
+        }
+        else {
+            [self.authImage setImage:[UIImage imageNamed:@"status_unAuth"]];
+            self.authViewWidth.constant = 116;
+        }
     }
     if (infoMessage.starGrade > 0) {
         self.starbgView.hidden = NO;
@@ -96,12 +106,6 @@
         }
     }
     
-    if ([infoMessage.musicianAuthStatus isEqualToString:@"PASS"]) {
-        self.hasAuthMusic = YES;
-    }else {
-        self.hasAuthMusic = NO;
-    }
-    
     if (![NSString isEmptyString:infoMessage.heardUrl]) {
         [self.userAvatal sd_setImageWithURL:[NSURL URLWithString:[infoMessage.heardUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     }
@@ -134,7 +138,7 @@
 }
 
 - (CGFloat)getViewHeight {
-    return 162;
+    return 135;
 }
 
 - (IBAction)authDetail:(id)sender {

+ 42 - 45
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.xib

@@ -10,30 +10,23 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="HomeHeadView">
-            <rect key="frame" x="0.0" y="0.0" width="414" height="162"/>
+            <rect key="frame" x="0.0" y="0.0" width="414" height="130"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_ikon" translatesAutoresizingMaskIntoConstraints="NO" id="Keh-u1-LE5">
-                    <rect key="frame" x="186" y="0.0" width="228" height="162"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="162" id="FOy-ad-3p4"/>
-                        <constraint firstAttribute="width" constant="228" id="mGD-5s-cGh"/>
-                    </constraints>
-                </imageView>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="Vp5-5Y-h2u">
-                    <rect key="frame" x="14" y="4" width="52" height="52"/>
+                    <rect key="frame" x="14" y="0.0" width="46" height="46"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="52" id="FJu-vr-s7W"/>
-                        <constraint firstAttribute="width" constant="52" id="XJ8-G5-ru8"/>
+                        <constraint firstAttribute="height" constant="46" id="FJu-vr-s7W"/>
+                        <constraint firstAttribute="width" constant="46" id="XJ8-G5-ru8"/>
                     </constraints>
                     <userDefinedRuntimeAttributes>
                         <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                            <real key="value" value="26"/>
+                            <real key="value" value="23"/>
                         </userDefinedRuntimeAttribute>
                     </userDefinedRuntimeAttributes>
                 </imageView>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Bxq-wl-TlW">
-                    <rect key="frame" x="76" y="37" width="90" height="19"/>
+                    <rect key="frame" x="70" y="28.5" width="90" height="19"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lpX-9C-A9n" customClass="KSStarView">
                             <rect key="frame" x="0.0" y="0.0" width="90" height="19"/>
@@ -51,7 +44,7 @@
                     </constraints>
                 </view>
                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X9B-Hy-SDf">
-                    <rect key="frame" x="76" y="37" width="90" height="19"/>
+                    <rect key="frame" x="70" y="28.5" width="90" height="19"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="暂无评分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kyY-aS-bXe">
                             <rect key="frame" x="0.0" y="0.0" width="90" height="19"/>
@@ -69,13 +62,13 @@
                     </constraints>
                 </view>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="游客" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xs8-aA-tdP">
-                    <rect key="frame" x="76" y="10" width="37" height="22"/>
+                    <rect key="frame" x="70" y="2" width="37" height="21.5"/>
                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
                     <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QKO-WL-PjF">
-                    <rect key="frame" x="0.0" y="70" width="207" height="80"/>
+                    <rect key="frame" x="0.0" y="50" width="207" height="80"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ovR-cP-u0n">
                             <rect key="frame" x="0.0" y="0.0" width="69" height="80"/>
@@ -184,7 +177,7 @@
                     </constraints>
                 </view>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ixV-E1-X1x">
-                    <rect key="frame" x="0.0" y="70" width="207" height="80"/>
+                    <rect key="frame" x="0.0" y="50" width="207" height="80"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5Yr-A2-BRU">
                             <rect key="frame" x="22" y="10" width="116" height="36"/>
@@ -194,7 +187,11 @@
                                 </imageView>
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="139-Q3-P80">
                                     <rect key="frame" x="0.0" y="0.0" width="116" height="36"/>
+                                    <gestureRecognizers/>
                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    <connections>
+                                        <action selector="authDetail:" destination="iN0-l3-epB" eventType="touchUpInside" id="VII-fT-wqp"/>
+                                    </connections>
                                 </button>
                             </subviews>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -219,14 +216,14 @@
                     </constraints>
                 </view>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6p5-cJ-ewl">
-                    <rect key="frame" x="14" y="4" width="52" height="52"/>
+                    <rect key="frame" x="14" y="0.0" width="46" height="46"/>
                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                     <connections>
                         <action selector="userCenter:" destination="iN0-l3-epB" eventType="touchUpInside" id="2AR-n9-ABc"/>
                     </connections>
                 </button>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cUe-bz-fnj">
-                    <rect key="frame" x="119" y="9" width="126" height="24"/>
+                    <rect key="frame" x="113" y="1" width="118" height="24"/>
                     <subviews>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="0Xo-pg-STA">
                             <rect key="frame" x="0.0" y="4.5" width="34" height="15"/>
@@ -236,26 +233,22 @@
                             </constraints>
                         </imageView>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineStyle_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="5j7-Yg-UN7">
-                            <rect key="frame" x="38" y="3" width="18" height="18"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="18" id="8U2-6V-fmN"/>
-                                <constraint firstAttribute="width" constant="18" id="PTw-gD-7fE"/>
-                            </constraints>
+                            <rect key="frame" x="38" y="4" width="16" height="16"/>
                         </imageView>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineVideo_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="tLe-yi-47U">
-                            <rect key="frame" x="60" y="3" width="18" height="18"/>
+                            <rect key="frame" x="58" y="4" width="16" height="16"/>
                         </imageView>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineLive_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="oX1-hp-Dyb">
-                            <rect key="frame" x="82" y="3" width="18" height="18"/>
+                            <rect key="frame" x="78" y="4" width="16" height="16"/>
                         </imageView>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineMusic_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="ezs-lZ-Xnl">
-                            <rect key="frame" x="104" y="3" width="18" height="18"/>
+                            <rect key="frame" x="98" y="4" width="16" height="16"/>
                         </imageView>
                     </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
                         <constraint firstItem="ezs-lZ-Xnl" firstAttribute="leading" secondItem="oX1-hp-Dyb" secondAttribute="trailing" constant="4" id="1nd-EQ-xMD"/>
-                        <constraint firstAttribute="width" constant="126" id="1uP-Pu-bDM"/>
+                        <constraint firstAttribute="width" constant="118" id="DhE-CO-7is"/>
                         <constraint firstItem="tLe-yi-47U" firstAttribute="centerY" secondItem="0Xo-pg-STA" secondAttribute="centerY" id="Faa-xP-lA8"/>
                         <constraint firstItem="oX1-hp-Dyb" firstAttribute="leading" secondItem="tLe-yi-47U" secondAttribute="trailing" constant="4" id="KQD-8u-KrQ"/>
                         <constraint firstItem="ezs-lZ-Xnl" firstAttribute="centerY" secondItem="0Xo-pg-STA" secondAttribute="centerY" id="LrG-Yr-kEC"/>
@@ -269,30 +262,37 @@
                         <constraint firstAttribute="height" constant="24" id="zOJ-Bx-EzM"/>
                     </constraints>
                 </view>
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_ikon" translatesAutoresizingMaskIntoConstraints="NO" id="Keh-u1-LE5">
+                    <rect key="frame" x="280" y="28.5" width="130" height="110"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="130" id="Qzd-2N-b1W"/>
+                        <constraint firstAttribute="height" constant="110" id="dYW-ax-CRt"/>
+                    </constraints>
+                </imageView>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstItem="Bxq-wl-TlW" firstAttribute="leading" secondItem="xs8-aA-tdP" secondAttribute="leading" id="7RR-w2-2XX"/>
                 <constraint firstItem="QKO-WL-PjF" firstAttribute="top" secondItem="ixV-E1-X1x" secondAttribute="top" id="9ca-DC-xzk"/>
-                <constraint firstAttribute="bottom" secondItem="QKO-WL-PjF" secondAttribute="bottom" constant="12" id="BP0-cm-2XI"/>
                 <constraint firstItem="Bxq-wl-TlW" firstAttribute="top" secondItem="xs8-aA-tdP" secondAttribute="bottom" constant="5" id="DCH-Eo-fVc"/>
                 <constraint firstItem="xs8-aA-tdP" firstAttribute="leading" secondItem="Vp5-5Y-h2u" secondAttribute="trailing" constant="10" id="Hb2-ur-ijs"/>
-                <constraint firstAttribute="bottom" secondItem="Keh-u1-LE5" secondAttribute="bottom" id="Lww-yr-BS1"/>
                 <constraint firstItem="cUe-bz-fnj" firstAttribute="centerY" secondItem="xs8-aA-tdP" secondAttribute="centerY" id="M3Y-L7-YU7"/>
                 <constraint firstItem="X9B-Hy-SDf" firstAttribute="bottom" secondItem="Bxq-wl-TlW" secondAttribute="bottom" id="MBt-8Q-OOg"/>
+                <constraint firstItem="Vp5-5Y-h2u" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="MP5-hG-35C"/>
                 <constraint firstItem="6p5-cJ-ewl" firstAttribute="top" secondItem="Vp5-5Y-h2u" secondAttribute="top" id="Vz7-SU-dzV"/>
-                <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="cUe-bz-fnj" secondAttribute="trailing" constant="10" id="Wwn-s8-yjb"/>
+                <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="cUe-bz-fnj" secondAttribute="trailing" constant="60" id="Wwn-s8-yjb"/>
                 <constraint firstItem="6p5-cJ-ewl" firstAttribute="leading" secondItem="Vp5-5Y-h2u" secondAttribute="leading" id="dKO-xa-zDy"/>
-                <constraint firstItem="xs8-aA-tdP" firstAttribute="top" secondItem="Vp5-5Y-h2u" secondAttribute="top" constant="6" id="fYJ-um-Z1x"/>
+                <constraint firstItem="xs8-aA-tdP" firstAttribute="top" secondItem="Vp5-5Y-h2u" secondAttribute="top" constant="2" id="fYJ-um-Z1x"/>
                 <constraint firstItem="QKO-WL-PjF" firstAttribute="leading" secondItem="ixV-E1-X1x" secondAttribute="leading" id="fga-xU-rvq"/>
                 <constraint firstItem="Vp5-5Y-h2u" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="gsT-nC-Tat"/>
                 <constraint firstItem="QKO-WL-PjF" firstAttribute="trailing" secondItem="iN0-l3-epB" secondAttribute="centerX" id="hTX-Hs-wJG"/>
-                <constraint firstItem="QKO-WL-PjF" firstAttribute="top" secondItem="Vp5-5Y-h2u" secondAttribute="bottom" constant="14" id="iD2-L2-kjs"/>
+                <constraint firstItem="QKO-WL-PjF" firstAttribute="top" secondItem="Vp5-5Y-h2u" secondAttribute="bottom" constant="4" id="iD2-L2-kjs"/>
                 <constraint firstItem="X9B-Hy-SDf" firstAttribute="leading" secondItem="Bxq-wl-TlW" secondAttribute="leading" id="j4c-N7-Tei"/>
                 <constraint firstItem="QKO-WL-PjF" firstAttribute="trailing" secondItem="ixV-E1-X1x" secondAttribute="trailing" id="jHk-YK-tbB"/>
+                <constraint firstItem="Keh-u1-LE5" firstAttribute="top" secondItem="X9B-Hy-SDf" secondAttribute="top" id="kNa-Oi-glF"/>
                 <constraint firstItem="6p5-cJ-ewl" firstAttribute="trailing" secondItem="Vp5-5Y-h2u" secondAttribute="trailing" id="ls2-RN-ZcX"/>
                 <constraint firstItem="X9B-Hy-SDf" firstAttribute="trailing" secondItem="Bxq-wl-TlW" secondAttribute="trailing" id="npl-9r-30v"/>
-                <constraint firstAttribute="trailing" secondItem="Keh-u1-LE5" secondAttribute="trailing" id="nwL-YU-oQl"/>
+                <constraint firstAttribute="trailing" secondItem="Keh-u1-LE5" secondAttribute="trailing" constant="4" id="nwL-YU-oQl"/>
                 <constraint firstItem="cUe-bz-fnj" firstAttribute="leading" secondItem="xs8-aA-tdP" secondAttribute="trailing" constant="6" id="pP0-mG-1US"/>
                 <constraint firstItem="X9B-Hy-SDf" firstAttribute="top" secondItem="Bxq-wl-TlW" secondAttribute="top" id="rFi-g4-TNx"/>
                 <constraint firstItem="QKO-WL-PjF" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="te7-6x-KAT"/>
@@ -303,7 +303,9 @@
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
+                <outlet property="authImage" destination="0rl-00-MDQ" id="zNK-JV-E8q"/>
                 <outlet property="authView" destination="ixV-E1-X1x" id="oX1-jX-LfE"/>
+                <outlet property="authViewWidth" destination="uz1-fW-faD" id="QhG-qi-2q0"/>
                 <outlet property="descView" destination="QKO-WL-PjF" id="Rty-dp-jnV"/>
                 <outlet property="emptyView" destination="X9B-Hy-SDf" id="o0W-GL-evc"/>
                 <outlet property="fansCount" destination="Xs4-YK-GXn" id="fzy-e9-IbW"/>
@@ -321,20 +323,15 @@
             </connections>
             <point key="canvasLocation" x="85.507246376811594" y="-32.142857142857139"/>
         </view>
-        <tapGestureRecognizer id="OCQ-jL-ZXB">
-            <connections>
-                <action selector="authDetail:" destination="iN0-l3-epB" id="LMq-Y6-EYp"/>
-            </connections>
-        </tapGestureRecognizer>
     </objects>
     <resources>
-        <image name="home_ikon" width="228" height="162"/>
-        <image name="mineLive_nomal" width="18" height="18"/>
-        <image name="mineMusic_nomal" width="18" height="18"/>
-        <image name="mineStyle_nomal" width="18" height="18"/>
-        <image name="mineVideo_nomal" width="18" height="18"/>
+        <image name="home_ikon" width="130" height="110"/>
+        <image name="mineLive_nomal" width="16" height="16"/>
+        <image name="mineMusic_nomal" width="16" height="16"/>
+        <image name="mineStyle_nomal" width="16" height="16"/>
+        <image name="mineVideo_nomal" width="16" height="16"/>
         <image name="mine_nomal" width="34" height="15"/>
-        <image name="status_unAuth" width="80" height="24"/>
+        <image name="status_unAuth" width="116" height="36"/>
         <image name="user_default_avatal" width="52" height="52"/>
     </resources>
 </document>

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeNavView.xib

@@ -10,14 +10,14 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="HomeNavView">
-            <rect key="frame" x="0.0" y="0.0" width="110" height="96"/>
+            <rect key="frame" x="0.0" y="0.0" width="60" height="96"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vOh-9c-b3r">
-                    <rect key="frame" x="0.0" y="52" width="110" height="44"/>
+                    <rect key="frame" x="0.0" y="52" width="60" height="44"/>
                     <subviews>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qSz-FE-UVP">
-                            <rect key="frame" x="56" y="0.0" width="44" height="44"/>
+                            <rect key="frame" x="6" y="0.0" width="44" height="44"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="44" id="bCd-Ui-00e"/>
                             </constraints>
@@ -28,7 +28,7 @@
                             </connections>
                         </button>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t1J-uq-ROg">
-                            <rect key="frame" x="86" y="10" width="8" height="8"/>
+                            <rect key="frame" x="36" y="10" width="8" height="8"/>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g4A-fh-p63">
                                     <rect key="frame" x="1" y="1" width="6" height="6"/>
@@ -55,11 +55,11 @@
                                 </userDefinedRuntimeAttribute>
                             </userDefinedRuntimeAttributes>
                         </view>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q6l-Iv-Tbq">
-                            <rect key="frame" x="7" y="0.0" width="44" height="44"/>
+                        <button hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q6l-Iv-Tbq">
+                            <rect key="frame" x="1" y="0.0" width="0.0" height="44"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="44" id="5RK-8c-0uc"/>
-                                <constraint firstAttribute="width" constant="44" id="UNi-JF-ydf"/>
+                                <constraint firstAttribute="width" id="UNi-JF-ydf"/>
                             </constraints>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" image="home_scan"/>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.m

@@ -78,7 +78,7 @@
                     [self showTipsAlert];
                 }
                 else {
-                    [self showMessage:@"该账号在其他地方登录"];
+                    [self showMessage:@"登录过期,请重新登录"];
                     [KSNetworkingManager logoutAction];
                 }
             }];

+ 42 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m

@@ -23,6 +23,9 @@
 #import "MyCourseViewController.h"
 #import "UserSettingViewController.h"
 #import "FeedbackViewController.h"
+#import "KSScanViewController.h"
+#import "KSPremissionAlert.h"
+#import "RecordCheckManager.h"
 
 @interface MineViewController ()
 
@@ -332,13 +335,50 @@
     if (!_navView) {
         _navView = [MineNavView shareInstance];
         MJWeakSelf;
-        [_navView mineNavAction:^{
-            [weakSelf settingAction];
+        [_navView mineNavAction:^(MINENAVATYPE actionType) {
+            if (actionType == MINENAVATYPE_SETTING) {
+                [weakSelf settingAction];
+            }
+            else {
+                [weakSelf scanAction];
+            }
         }];
+       
     }
     return _navView;
 }
 
+- (void)scanAction {
+    // 判断是否有权限
+    PREMISSIONTYPE albumEnable = [RecordCheckManager checkCameraPremissionAvaiable:NO showInView:nil];
+    if (albumEnable == PREMISSIONTYPE_YES) { // 如果有权限
+        KSScanViewController *ctrl = [[KSScanViewController alloc] init];
+        [self.navigationController pushViewController:ctrl animated:YES];
+    }
+    else {
+        if (albumEnable == PREMISSIONTYPE_NO) {
+            [self showAlertWithMessage:@"请开启相机访问权限" type:CHECKDEVICETYPE_CAMREA];
+        }
+    }
+}
+
+- (void)showAlertWithMessage:(NSString *)message type:(CHECKDEVICETYPE)deviceType {
+    [KSPremissionAlert shareInstanceDisplayImage:deviceType message:message showInView:self.view cancel:^{
+        
+    } confirm:^{
+        [self openSettingView];
+    }];
+    
+}
+
+- (void)openSettingView {
+    if (@available(iOS 10, *)) {
+        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
+    } else {
+        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
+    }
+}
+
 - (DeviceCheckView *)checkView {
     if (!_checkView) {
         _checkView = [DeviceCheckView shareInstance];

+ 10 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageTopView.xib

@@ -117,7 +117,7 @@
                             </constraints>
                         </view>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nhJ-jg-o1N">
-                            <rect key="frame" x="122" y="18.5" width="126" height="24"/>
+                            <rect key="frame" x="122" y="18.5" width="118" height="24"/>
                             <subviews>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="O4w-5f-Puh">
                                     <rect key="frame" x="0.0" y="4.5" width="34" height="15"/>
@@ -127,20 +127,16 @@
                                     </constraints>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineStyle_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="lc6-oJ-H90">
-                                    <rect key="frame" x="38" y="3" width="18" height="18"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="18" id="7H1-ky-0m0"/>
-                                        <constraint firstAttribute="width" constant="18" id="cqg-mI-yxt"/>
-                                    </constraints>
+                                    <rect key="frame" x="38" y="4" width="16" height="16"/>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineVideo_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="YEy-rl-QiY">
-                                    <rect key="frame" x="60" y="3" width="18" height="18"/>
+                                    <rect key="frame" x="58" y="4" width="16" height="16"/>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineLive_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="msK-hu-IGj">
-                                    <rect key="frame" x="82" y="3" width="18" height="18"/>
+                                    <rect key="frame" x="78" y="4" width="16" height="16"/>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineMusic_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="Gtu-Mm-ocB">
-                                    <rect key="frame" x="104" y="3" width="18" height="18"/>
+                                    <rect key="frame" x="98" y="4" width="16" height="16"/>
                                 </imageView>
                             </subviews>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -152,7 +148,7 @@
                                 <constraint firstItem="O4w-5f-Puh" firstAttribute="leading" secondItem="nhJ-jg-o1N" secondAttribute="leading" id="ZAZ-xO-N3k"/>
                                 <constraint firstItem="lc6-oJ-H90" firstAttribute="centerY" secondItem="O4w-5f-Puh" secondAttribute="centerY" id="d8N-WM-xgq"/>
                                 <constraint firstItem="YEy-rl-QiY" firstAttribute="leading" secondItem="lc6-oJ-H90" secondAttribute="trailing" constant="4" id="fnW-Of-fnf"/>
-                                <constraint firstAttribute="width" constant="126" id="mc3-Tm-XBL"/>
+                                <constraint firstAttribute="width" constant="118" id="mc3-Tm-XBL"/>
                                 <constraint firstItem="msK-hu-IGj" firstAttribute="centerY" secondItem="O4w-5f-Puh" secondAttribute="centerY" id="mwh-Ta-8cm"/>
                                 <constraint firstItem="lc6-oJ-H90" firstAttribute="leading" secondItem="O4w-5f-Puh" secondAttribute="trailing" constant="4" id="pjM-3i-sCg"/>
                                 <constraint firstItem="O4w-5f-Puh" firstAttribute="centerY" secondItem="nhJ-jg-o1N" secondAttribute="centerY" id="rV9-Dd-1L3"/>
@@ -227,10 +223,10 @@
         </view>
     </objects>
     <resources>
-        <image name="mineLive_nomal" width="18" height="18"/>
-        <image name="mineMusic_nomal" width="18" height="18"/>
-        <image name="mineStyle_nomal" width="18" height="18"/>
-        <image name="mineVideo_nomal" width="18" height="18"/>
+        <image name="mineLive_nomal" width="16" height="16"/>
+        <image name="mineMusic_nomal" width="16" height="16"/>
+        <image name="mineStyle_nomal" width="16" height="16"/>
+        <image name="mineVideo_nomal" width="16" height="16"/>
         <image name="mine_nomal" width="34" height="15"/>
         <image name="user_default_avatal" width="52" height="52"/>
     </resources>

+ 10 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.xib

@@ -82,7 +82,7 @@
                             </connections>
                         </button>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pU5-7g-Bzb">
-                            <rect key="frame" x="120" y="11.5" width="126" height="24"/>
+                            <rect key="frame" x="120" y="11.5" width="118" height="24"/>
                             <subviews>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="ugg-1M-i9r">
                                     <rect key="frame" x="0.0" y="4.5" width="34" height="15"/>
@@ -92,24 +92,21 @@
                                     </constraints>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineStyle_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="J1I-kl-bpI">
-                                    <rect key="frame" x="38" y="3" width="18" height="18"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="18" id="K1h-fk-qZj"/>
-                                        <constraint firstAttribute="width" constant="18" id="yXD-84-Fqg"/>
-                                    </constraints>
+                                    <rect key="frame" x="38" y="4" width="16" height="16"/>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineVideo_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="vaM-LY-Rqy">
-                                    <rect key="frame" x="60" y="3" width="18" height="18"/>
+                                    <rect key="frame" x="58" y="4" width="16" height="16"/>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineLive_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="o0F-R0-j1W">
-                                    <rect key="frame" x="82" y="3" width="18" height="18"/>
+                                    <rect key="frame" x="78" y="4" width="16" height="16"/>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineMusic_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="KtO-Tm-2f3">
-                                    <rect key="frame" x="104" y="3" width="18" height="18"/>
+                                    <rect key="frame" x="98" y="4" width="16" height="16"/>
                                 </imageView>
                             </subviews>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <constraints>
+                                <constraint firstAttribute="width" constant="118" id="1BR-zi-sUB"/>
                                 <constraint firstAttribute="height" constant="24" id="2im-vE-CtJ"/>
                                 <constraint firstItem="KtO-Tm-2f3" firstAttribute="leading" secondItem="o0F-R0-j1W" secondAttribute="trailing" constant="4" id="4g0-G2-PBm"/>
                                 <constraint firstItem="o0F-R0-j1W" firstAttribute="leading" secondItem="vaM-LY-Rqy" secondAttribute="trailing" constant="4" id="53z-TS-I5w"/>
@@ -121,7 +118,6 @@
                                 <constraint firstItem="KtO-Tm-2f3" firstAttribute="centerY" secondItem="ugg-1M-i9r" secondAttribute="centerY" id="UR2-Ji-euN"/>
                                 <constraint firstItem="o0F-R0-j1W" firstAttribute="centerY" secondItem="ugg-1M-i9r" secondAttribute="centerY" id="fBg-nv-Tlu"/>
                                 <constraint firstItem="J1I-kl-bpI" firstAttribute="leading" secondItem="ugg-1M-i9r" secondAttribute="trailing" constant="4" id="fGX-Wd-si9"/>
-                                <constraint firstAttribute="width" constant="126" id="kiF-cM-bDi"/>
                                 <constraint firstItem="J1I-kl-bpI" firstAttribute="centerY" secondItem="ugg-1M-i9r" secondAttribute="centerY" id="r17-Y8-gO7"/>
                             </constraints>
                         </view>
@@ -1112,10 +1108,10 @@
         <image name="member_bg" width="333" height="82"/>
         <image name="member_center" width="75" height="20"/>
         <image name="member_logo" width="19" height="16"/>
-        <image name="mineLive_nomal" width="18" height="18"/>
-        <image name="mineMusic_nomal" width="18" height="18"/>
-        <image name="mineStyle_nomal" width="18" height="18"/>
-        <image name="mineVideo_nomal" width="18" height="18"/>
+        <image name="mineLive_nomal" width="16" height="16"/>
+        <image name="mineMusic_nomal" width="16" height="16"/>
+        <image name="mineStyle_nomal" width="16" height="16"/>
+        <image name="mineVideo_nomal" width="16" height="16"/>
         <image name="mine_accompanySetting" width="34" height="34"/>
         <image name="mine_boardcastCourse" width="34" height="34"/>
         <image name="mine_card" width="28" height="28"/>

+ 6 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineNavView.h

@@ -7,7 +7,12 @@
 
 #import <UIKit/UIKit.h>
 
-typedef void(^MineNavAction)(void);
+typedef NS_ENUM(NSInteger, MINENAVATYPE) {
+    MINENAVATYPE_SETTING,
+    MINENAVATYPE_SACN,
+};
+
+typedef void(^MineNavAction)(MINENAVATYPE actionType);
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 6 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineNavView.m

@@ -34,7 +34,12 @@
 
 - (IBAction)buttonAction:(id)sender {
     if (self.callback) {
-        self.callback();
+        self.callback(MINENAVATYPE_SETTING);
+    }
+}
+- (IBAction)scanAction:(id)sender {
+    if (self.callback) {
+        self.callback(MINENAVATYPE_SACN);
     }
 }
 

+ 18 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineNavView.xib

@@ -10,11 +10,11 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MineNavView">
-            <rect key="frame" x="0.0" y="0.0" width="60" height="87"/>
+            <rect key="frame" x="0.0" y="0.0" width="100" height="87"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="o7c-br-wf5">
-                    <rect key="frame" x="10" y="47" width="40" height="40"/>
+                    <rect key="frame" x="50" y="47" width="40" height="40"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="40" id="He1-cX-k8M"/>
                         <constraint firstAttribute="width" constant="40" id="S21-d9-pEr"/>
@@ -25,19 +25,34 @@
                         <action selector="buttonAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="h9L-Z3-X9x"/>
                     </connections>
                 </button>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Vo-To-1Fv">
+                    <rect key="frame" x="5" y="47" width="40" height="40"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="40" id="h2P-XP-WfO"/>
+                        <constraint firstAttribute="height" constant="40" id="in1-ck-06o"/>
+                    </constraints>
+                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                    <state key="normal" image="home_scan"/>
+                    <connections>
+                        <action selector="scanAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="vhm-E8-1jP"/>
+                    </connections>
+                </button>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstAttribute="bottom" secondItem="o7c-br-wf5" secondAttribute="bottom" id="4yw-g9-DTw"/>
                 <constraint firstAttribute="trailing" secondItem="o7c-br-wf5" secondAttribute="trailing" constant="10" id="Kng-m2-QZf"/>
+                <constraint firstItem="o7c-br-wf5" firstAttribute="centerY" secondItem="5Vo-To-1Fv" secondAttribute="centerY" id="eJY-8Q-kmx"/>
+                <constraint firstItem="o7c-br-wf5" firstAttribute="leading" secondItem="5Vo-To-1Fv" secondAttribute="trailing" constant="5" id="xLP-t3-UaS"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <point key="canvasLocation" x="348.55072463768118" y="-96.763392857142847"/>
+            <point key="canvasLocation" x="289.13043478260875" y="-96.763392857142847"/>
         </view>
     </objects>
     <resources>
+        <image name="home_scan" width="26" height="26"/>
         <image name="mine_setting" width="26" height="24"/>
     </resources>
 </document>