Steven 2 місяців тому
батько
коміт
cfebcc8f2d

+ 12 - 21
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -796,38 +796,23 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             NSString *pageType = [dict ks_stringValueForKey:@"pageTag"];
             if ([pageType isEqualToString:@"vipClass"]) { // 我的课程 ->vip定制课
                 DISPLAY_INDEX index = DISPLAY_INDEX_VIP;
-                MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                [ctrl displayWithIndex:index];
-                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-                [navCtrl pushViewController:ctrl animated:YES];
+                [self toMyCourseWithPage:index];
             }
             else 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];
+                [self toMyCourseWithPage:index];
             }
             else if ([pageType isEqualToString:@"groupClass"]) { // 我的课程 ->小组课
                 DISPLAY_INDEX index = DISPLAY_INDEX_GROUP;
-                MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                [ctrl displayWithIndex:index];
-                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-                [navCtrl pushViewController:ctrl animated:YES];
+                [self toMyCourseWithPage:index];
             }
             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];
+                [self toMyCourseWithPage:index];
             }
             else if ([pageType isEqualToString:@"videoClass"]) { // 我的课程 ->视频课
                 DISPLAY_INDEX index = DISPLAY_INDEX_VIDEO;
-                MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                [ctrl displayWithIndex:index];
-                CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-                [navCtrl pushViewController:ctrl animated:YES];
+                [self toMyCourseWithPage:index];
             }
             else if ([pageType isEqualToString:@"buyPractice"] || [pageType isEqualToString:@"courseRemind"]) { // 课表
                 [self.tabBarController tabBarSelectedWithIndex:2];
@@ -972,7 +957,13 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             }
         }
     }
-    
+}
+
+- (void)toMyCourseWithPage:(DISPLAY_INDEX)displayIndex {
+    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+    [ctrl displayWithIndex:displayIndex];
+    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+    [navCtrl pushViewController:ctrl animated:YES];
 }
 
 - (void)toFeedback {

+ 0 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/GroupCourseGroupHeadView.m

@@ -40,7 +40,6 @@
 - (void)configWithSource:(GroupCourseGroupInfoModel *)model {
     [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[model.backgroundPic getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseName.text = [NSString returnNoNullStringWithString:model.courseGroupName];
-//    self.orderUser.text = [NSString stringWithFormat:@"剩余%.0f个名额", model.maxStudentNum - model.studentCount];
     self.orderUser.text = [NSString stringWithFormat:@"%.0f人学习",model.studentCount];
     // time
     NSDateFormatter *formatter = [NSObject getDateformatter];

+ 0 - 5
KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/GroupCourseGroupHeadView.xib

@@ -21,11 +21,6 @@
                             <constraints>
                                 <constraint firstAttribute="width" secondItem="aHt-s4-D8T" secondAttribute="height" multiplier="16:9" id="CuK-sb-2aR"/>
                             </constraints>
-                            <userDefinedRuntimeAttributes>
-                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                    <real key="value" value="6"/>
-                                </userDefinedRuntimeAttribute>
-                            </userDefinedRuntimeAttributes>
                         </imageView>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0p4-wR-LI6">
                             <rect key="frame" x="8" y="8" width="12" height="19"/>

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/GroupCourseListCell.xib

@@ -183,7 +183,7 @@
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qeE-Ft-83e">
                                 <rect key="frame" x="12" y="111" width="268" height="54"/>
                                 <subviews>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="严琦老师带您零基础学习大号,通过4节课的学习掌握大号演奏的基本方式,培养良好的吐息习惯。" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vGB-9D-omH">
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vGB-9D-omH">
                                         <rect key="frame" x="7" y="6" width="254" height="42"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                                         <color key="textColor" red="0.46666666666666667" green="0.46666666666666667" blue="0.46666666666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

+ 12 - 15
KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m

@@ -267,33 +267,23 @@
                 }
                 else if ([pageType isEqualToString:@"vipClass"]) { // 我的课程 ->vip定制课
                     DISPLAY_INDEX index = DISPLAY_INDEX_VIP;
-                    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                    [ctrl displayWithIndex:index];
-                    [self.navigationController pushViewController:ctrl animated:YES];
+                    [self toMyCourseWithPage:index];
                 }
                 else if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->趣纠课
                     DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
-                    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                    [ctrl displayWithIndex:index];
-                    [self.navigationController pushViewController:ctrl animated:YES];
+                    [self toMyCourseWithPage:index];
                 }
                 else if ([pageType isEqualToString:@"groupClass"]) { // 我的课程 ->小组课
                     DISPLAY_INDEX index = DISPLAY_INDEX_GROUP;
-                    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                    [ctrl displayWithIndex:index];
-                    [self.navigationController pushViewController:ctrl animated:YES];
+                    [self toMyCourseWithPage:index];
                 }
                 else if ([pageType isEqualToString:@"liveClass"]) { // 我的课程 ->直播课
                     DISPLAY_INDEX index = DISPLAY_INDEX_LIVE;
-                    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                    [ctrl displayWithIndex:index];
-                    [self.navigationController pushViewController:ctrl animated:YES];
+                    [self toMyCourseWithPage:index];
                 }
                 else if ([pageType isEqualToString:@"videoClass"]) { // 我的课程 ->视频课
                     DISPLAY_INDEX index = DISPLAY_INDEX_VIDEO;
-                    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                    [ctrl displayWithIndex:index];
-                    [self.navigationController pushViewController:ctrl animated:YES];
+                    [self toMyCourseWithPage:index];
                 }
                 else if ([pageType isEqualToString:@"coursePlan"]) { // 课程规划
                     NSString *parmString = [dict ks_stringValueForKey:@"params"];
@@ -356,6 +346,13 @@
         }
     }
 }
+
+- (void)toMyCourseWithPage:(DISPLAY_INDEX)displayIndex {
+    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+    [ctrl displayWithIndex:displayIndex];
+    [self.navigationController pushViewController:ctrl animated:YES];
+}
+
 - (void)toFeedback {
     FeedbackListViewController *ctrl = [[FeedbackListViewController alloc] init];
     [self.navigationController pushViewController:ctrl animated:YES];