Browse Source

最近课程进入VIP

Steven 7 months ago
parent
commit
2f96cd8679

+ 7 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -32,6 +32,7 @@
 #import "HomeRecentCourseView.h"
 #import "AccompanyDetailViewController.h"
 #import "MusicRoomDetailViewController.h"
+#import "VipCouseDetailViewController.h"
 
 #import "HomeHotAlbumView.h"
 #import "HomeAlbumModel.h"
@@ -1528,6 +1529,12 @@
         detailVC.courseGroupId = courseModel.courseGroupId;
         [self.navigationController pushViewController:detailVC animated:YES];
     }
+    else if (type == RECENTCOURSE_TYPE_VIP) { // VIP
+        VipCouseDetailViewController *detailVC = [[VipCouseDetailViewController alloc] init];
+        detailVC.courseId = courseModel.courseId;
+        detailVC.courseGroupId = courseModel.courseGroupId;
+        [self.navigationController pushViewController:detailVC animated:YES];
+    }
     else {
         KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
         NSString *url = [NSString stringWithFormat:@"%@/#/liveDetail?joinRoom=1&groupId=%@&classId=%@", WEBHOST,courseModel.courseGroupId,courseModel.courseId];

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/RecentCourse/HomeRecentCourseView.h

@@ -12,6 +12,7 @@ typedef NS_ENUM(NSInteger, RECENTCOURSE_TYPE) {
     RECENTCOURSE_TYPE_LIVE,
     RECENTCOURSE_TYPE_ACCOMPANY,
     RECENTCOURSE_TYPE_MUSICCLASS, // 琴房
+    RECENTCOURSE_TYPE_VIP,
 };
 
 typedef void(^RecentCourseAction)(RECENTCOURSE_TYPE type, RecentCourseModel * _Nonnull courseModel);

+ 6 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/RecentCourse/HomeRecentCourseView.m

@@ -62,6 +62,9 @@
     else if ([self.courseModel.courseType isEqualToString:@"PIANO_ROOM_CLASS"]) {
         jsonString = @"musicRoom_animation.json";
     }
+    else if ([self.courseModel.courseType isEqualToString:@"VIP"]) {
+        jsonString = @"accomapny_animation.json";
+    }
     else {
         jsonString = @"accomapny_animation.json";
     }
@@ -92,6 +95,9 @@
         else if ([self.courseModel.courseType isEqualToString:@"PIANO_ROOM_CLASS"]) {
             type = RECENTCOURSE_TYPE_MUSICCLASS;
         }
+        else if ([self.courseModel.courseType isEqualToString:@"VIP"]) {
+            type = RECENTCOURSE_TYPE_VIP;
+        }
         else /*if ([self.courseModel.courseType isEqualToString:@"PRACTICE"])*/ {
             type = RECENTCOURSE_TYPE_ACCOMPANY;
         }