浏览代码

直播课介绍换行处理

Steven 7 月之前
父节点
当前提交
59cc2be560

+ 14 - 2
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -540,7 +540,12 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     }
     }
     else {
     else {
         // IM消息 区分机构还是普通
         // IM消息 区分机构还是普通
-        [self.tabBarController tabBarSelectedWithIndex:3];
+        if (([UserDefaultObjectForKey(TENANT_ID) integerValue] <= 0)) {
+            [self.tabBarController tabBarSelectedWithIndex:3];
+        }
+        else {
+            [self.tabBarController tabBarSelectedWithIndex:1];
+        }
     }
     }
 }
 }
 
 
@@ -783,7 +788,14 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     else {  // 平台
     else {  // 平台
         if ([action isEqualToString:@"app"]) {
         if ([action isEqualToString:@"app"]) {
             NSString *pageType = [dict ks_stringValueForKey:@"pageTag"];
             NSString *pageType = [dict ks_stringValueForKey:@"pageTag"];
-            if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->趣纠课
+            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];
+            }
+            else if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->趣纠课
                 DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
                 DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
                 MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
                 MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
                 [ctrl displayWithIndex:index];
                 [ctrl displayWithIndex:index];

+ 0 - 3
KulexiuForStudent/KulexiuForStudent/InstitutionModule/TabbarController/InstitutionTabBarController.m

@@ -107,9 +107,6 @@
 }
 }
 
 
 - (void)tabBarSelectedWithIndex:(NSInteger)index {
 - (void)tabBarSelectedWithIndex:(NSInteger)index {
-    if (index >= 2) { // 跳转到聊天
-        index -= 1;
-    }
     [self setSelectedIndex:index];
     [self setSelectedIndex:index];
     UIViewController *controller = [self.viewControllers objectAtIndex:index];
     UIViewController *controller = [self.viewControllers objectAtIndex:index];
     [self changeBgColorWithTabBarController:self selectViewController:controller];
     [self changeBgColorWithTabBarController:self selectViewController:controller];

+ 5 - 2
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/LiveCourseArrangeCell.m

@@ -50,8 +50,11 @@
     [self.courseImage sd_setImageWithURL:[NSURL URLWithString:[model.backgroundPic getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     [self.courseImage sd_setImageWithURL:[NSURL URLWithString:[model.backgroundPic getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseName.text = [NSString returnNoNullStringWithString:model.courseGroupName];
     self.courseName.text = [NSString returnNoNullStringWithString:model.courseGroupName];
     
     
-    
-    self.courseDesc.text = [NSString returnNoNullStringWithString:model.courseIntroduce];
+    NSString *introduce = model.courseIntroduce;
+    if (![NSString isEmptyString:introduce]) {
+        introduce = [introduce replaceAll:@"\n" WithString:@" "];
+    }
+    self.courseDesc.text = [NSString returnNoNullStringWithString:introduce];
     
     
     if (model.coursePrice > 0) {
     if (model.coursePrice > 0) {
         NSString *mountMsg = [NSString formatDoubleNum:model.coursePrice];
         NSString *mountMsg = [NSString formatDoubleNum:model.coursePrice];

+ 6 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/LiveCourseGroup/MyLiveCourseGroupListCell.m

@@ -50,7 +50,12 @@
     [self.courseCover sd_setImageWithURL:[NSURL URLWithString:[model.cover getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     [self.courseCover sd_setImageWithURL:[NSURL URLWithString:[model.cover getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseSubject.text = [NSString returnNoNullStringWithString:model.subjectName];
     self.courseSubject.text = [NSString returnNoNullStringWithString:model.subjectName];
     self.courseTitle.text = [NSString returnNoNullStringWithString:model.name];
     self.courseTitle.text = [NSString returnNoNullStringWithString:model.name];
-    self.courseDesc.text = [NSString returnNoNullStringWithString:model.courseIntroduce];
+    
+    NSString *introduce = model.courseIntroduce;
+    if (![NSString isEmptyString:introduce]) {
+        introduce = [introduce replaceAll:@"\n" WithString:@" "];
+    }
+    self.courseDesc.text = [NSString returnNoNullStringWithString:introduce];
     
     
     NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:@"已上课时 " attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular],NSForegroundColorAttributeName:HexRGB(0x999999)}];
     NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:@"已上课时 " attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular],NSForegroundColorAttributeName:HexRGB(0x999999)}];
     NSAttributedString *finishNumAttr = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%zd", model.completeCourseNum] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightSemibold],NSForegroundColorAttributeName:THEMECOLOR}];
     NSAttributedString *finishNumAttr = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%zd", model.completeCourseNum] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightSemibold],NSForegroundColorAttributeName:THEMECOLOR}];