Browse Source

学生端约课跳转

Steven 4 months ago
parent
commit
7108777ceb

+ 5 - 4
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/HomeArrangeAccompanyCourseView.m

@@ -15,6 +15,7 @@
 #import <KSChoosePicker.h>
 #import "UserInfoManager.h"
 #import "ArrangeTeacherModel.h"
+#import "KSBaseWKWebViewController.h"
 
 @interface HomeArrangeAccompanyCourseView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -209,10 +210,10 @@
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-//    MusicMessageModel *model = self.dataArray[indexPath.row];
-//    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-//    ctrl.url = [NSString stringWithFormat:@"%@%@%@", WEBHOST, @"/#/music-detail?id=",model.internalBaseClassIdentifier];
-//    [self.naviController pushViewController:ctrl animated:YES];
+    ArrangeTeacherModel *model = self.dataArray[indexPath.row];
+    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
+    ctrl.url = [NSString stringWithFormat:@"%@%@%@&tabs=%@", WEBHOST,@"/#/teacherHome?teacherId=",model.teacherId,@"practice"];
+    [self.naviController pushViewController:ctrl animated:YES];
 }
 
 #pragma mark ----- lazying

+ 6 - 6
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/HomeArrangeLiveCourseView.m

@@ -14,6 +14,7 @@
 #import "ArrangeLiveCourseModel.h"
 #import <KSChoosePicker.h>
 #import "UserInfoManager.h"
+#import "KSBaseWKWebViewController.h"
 
 @interface HomeArrangeLiveCourseView ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
 
@@ -181,7 +182,6 @@
 
 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
     return self.dataArray.count;
-//    return 10;
 }
 
 - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
@@ -193,11 +193,11 @@
 }
 
 - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
-//    LiveCourseModel *model = self.dataArray[indexPath.row];
-//    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-//    NSString *url = [NSString stringWithFormat:@"%@%@%.0f", WEBHOST, @"/#/liveDetail?groupId=",model.courseGroupId];
-//    ctrl.url = url;
-//    [self.naviController pushViewController:ctrl animated:YES];
+    ArrangeLiveCourseModel *model = self.dataArray[indexPath.row];
+    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
+    NSString *url = [NSString stringWithFormat:@"%@%@%@", WEBHOST, @"/#/liveDetail?groupId=",model.courseGroupId];
+    ctrl.url = url;
+    [self.naviController pushViewController:ctrl animated:YES];
 }
 
 - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {

+ 4 - 3
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/HomeArrangeVIPCourseView.m

@@ -15,6 +15,7 @@
 #import <KSChoosePicker.h>
 #import "UserInfoManager.h"
 #import "ArrangeTeacherModel.h"
+#import "KSBaseWKWebViewController.h"
 
 @interface HomeArrangeVIPCourseView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -210,9 +211,9 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     ArrangeTeacherModel *model = self.dataArray[indexPath.row];
-//    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-//    ctrl.url = [NSString stringWithFormat:@"%@%@%@", WEBHOST, @"/#/music-detail?id=",model.internalBaseClassIdentifier];
-//    [self.naviController pushViewController:ctrl animated:YES];
+    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
+    ctrl.url = [NSString stringWithFormat:@"%@%@%@&tabs=%@", WEBHOST,@"/#/teacherHome?teacherId=",model.teacherId,@"vip"];;
+    [self.naviController pushViewController:ctrl animated:YES];
 }
 
 #pragma mark ----- lazying

+ 6 - 5
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/HomeArrangeVideoCourseView.m

@@ -14,6 +14,7 @@
 #import <KSChoosePicker.h>
 #import "UserInfoManager.h"
 #import "ArrangeVideoCourseModel.h"
+#import "KSBaseWKWebViewController.h"
 
 @interface HomeArrangeVideoCourseView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -105,7 +106,7 @@
     });
 }
 
-- (void)requestData { // VIP课程
+- (void)requestData { // 视频课
     [KSNetworkingManager videoLessonSelectGroupRequest:KS_POST lessonSubject:self.subjectId search:self.searchKey page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
@@ -191,10 +192,10 @@
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-//    ArrangeTeacherModel *model = self.dataArray[indexPath.row];
-//    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-//    ctrl.url = [NSString stringWithFormat:@"%@%@%@", WEBHOST, @"/#/music-detail?id=",model.internalBaseClassIdentifier];
-//    [self.naviController pushViewController:ctrl animated:YES];
+    ArrangeVideoCourseModel *model = self.dataArray[indexPath.row];
+    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
+    ctrl.url = [NSString stringWithFormat:@"%@%@%@", WEBHOST, @"/#/videoDetail?groupId=",model.internalBaseClassIdentifier];
+    [self.naviController pushViewController:ctrl animated:YES];
 }
 
 #pragma mark ----- lazying