Selaa lähdekoodia

小组课显示问题处理

Steven 6 kuukautta sitten
vanhempi
commit
065978ed4a

+ 1 - 1
KulexiuForStudent/KulexiuForStudent.xcodeproj/xcshareddata/xcschemes/KulexiuForStudent.xcscheme

@@ -51,7 +51,7 @@
       </Testables>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "DEV"
+      buildConfiguration = "TEST"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"

+ 11 - 6
KulexiuForStudent/KulexiuForStudent/Common/MediaMerge/AudioMerge/MergeAudioAnimation/KSSpectrumView.m

@@ -11,6 +11,10 @@
 
 @property (nonatomic, strong) CAGradientLayer *combinedGradientLayer;
 
+@property (nonatomic, strong) CAShapeLayer *combinedMaskLayer;
+
+@property (nonatomic, assign) CGFloat xIncrement;
+
 @end
 
 @implementation KSSpectrumView
@@ -35,7 +39,8 @@
 - (void)setupView {
     self.barWidth = 3.0;
     self.space = 1.0;
-
+    self.xIncrement = self.barWidth + self.space;
+    
     self.combinedGradientLayer = [CAGradientLayer layer];
     self.combinedGradientLayer.colors = @[
         (__bridge id)HexRGBAlpha(0xffffff, 1.0f).CGColor,
@@ -43,6 +48,8 @@
     ];
     self.combinedGradientLayer.locations = @[@0.6, @1.0];
     [self.layer addSublayer:self.combinedGradientLayer];
+    
+    self.combinedMaskLayer = [CAShapeLayer layer];
 }
 
 - (void)resetLayer {
@@ -71,12 +78,11 @@
             CGFloat middleY = viewHeight / 2.0;
             CGFloat barHeight = (viewHeight) / 2.0;
             CGFloat cornerRadius = viewWidth / 2.0f;
-            CGFloat xIncrement = self.barWidth + self.space;
             UIBezierPath *combinedPath = [UIBezierPath bezierPath];
             
             // Left channel
             for (NSUInteger i = 0; i < spectraCount; i++) {
-                CGFloat x = i * xIncrement + self.space;
+                CGFloat x = i * self.xIncrement + self.space;
                 CGFloat amplitudeValue = combinedSpectrum[i].floatValue;
                 CGFloat height = amplitudeValue * barHeight;
                 CGFloat y = middleY - height/2.0; // Centered vertically
@@ -87,10 +93,9 @@
             }
             
             dispatch_async(dispatch_get_main_queue(), ^{
-                CAShapeLayer *combinedMaskLayer = [CAShapeLayer layer];
-                combinedMaskLayer.path = combinedPath.CGPath;
+                self.combinedMaskLayer.path = combinedPath.CGPath;
                 self.combinedGradientLayer.frame = CGRectMake(0, 0, viewWidth, viewHeight);
-                self.combinedGradientLayer.mask = combinedMaskLayer;
+                self.combinedGradientLayer.mask = self.combinedMaskLayer;
                 self.isModify = NO;
             });
         });

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Common/MediaMerge/AudioMerge/MergePlayer/KSMergeEnginePlayer.m

@@ -87,11 +87,11 @@
     } @finally {
         
     }
-    
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:AVAudioSessionInterruptionNotification object:audioSession];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleRouteChange:) name:AVAudioSessionRouteChangeNotification object:audioSession];
 }
 
+
 - (void)retryInitEngine {
     // 如果audio engine不存在
     self.audioEngine = [[AVAudioEngine alloc] init];

+ 2 - 5
KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/View/ProgramCourseGroupBodyView.m

@@ -48,9 +48,6 @@
 
 @property (nonatomic, strong) NSMutableArray *attendenceStatusArray;
 
-@property (nonatomic, assign) NSInteger joinRoomBeforeTime; // 上课开始时间
-
-@property (nonatomic, assign) NSInteger quitRomeEndTime;    // 下课截止时间
 
 @end
 
@@ -234,14 +231,14 @@
     NSDate *currentDate = [NSDate date];
     NSTimeInterval beginTimeInterval = [beginDate timeIntervalSinceDate:currentDate];
     NSTimeInterval endTimeInterval = [currentDate timeIntervalSinceDate:endDate];
-    if (beginTimeInterval <= self.joinRoomBeforeTime * 60 && endTimeInterval < 0) {
+    if (beginTimeInterval <= self.enterStartTime * 60 && endTimeInterval < 0) {
         [self joinClassRoom:model];
     }
     else if (endTimeInterval > 0) {
         [LOADING_MANAGER MBShowAUTOHidingInWindow:@"该课程已结束"];
     }
     else {
-        NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.joinRoomBeforeTime];
+        NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.enterStartTime];
         [LOADING_MANAGER MBShowAUTOHidingInWindow:tipsString];
     }
 }

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/GroupCourseGroup/MyGroupCourseGroupListCell.m

@@ -71,7 +71,7 @@
     [attrs appendAttributedString:totalNumAttr];
     self.finishDesc.attributedText = attrs;
     [self.avatar sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:TEACHER_AVATAR]];
-    self.nameLabel.text = [NSString returnNoNullStringWithString:model.name];
+    self.nameLabel.text = [NSString returnNoNullStringWithString:model.realName];
 }
 
 

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

@@ -70,7 +70,7 @@
     [attrs appendAttributedString:totalNumAttr];
     self.finishDesc.attributedText = attrs;
     [self.avatar sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:TEACHER_AVATAR]];
-    self.nameLabel.text = [NSString returnNoNullStringWithString:model.name];
+    self.nameLabel.text = [NSString returnNoNullStringWithString:model.realName];
 }