Selaa lähdekoodia

1.首页
2.畅学卡入口

Steven 7 kuukautta sitten
vanhempi
commit
c42561c588
30 muutettua tiedostoa jossa 188 lisäystä ja 82 poistoa
  1. 8 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h
  2. 13 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  3. 7 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/Controller/HomeArrangeCourseController.m
  4. 0 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/CourseDescAlertView.m
  5. 11 1
      KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m
  6. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/Model/RecentCourseModel.h
  7. 7 3
      KulexiuForStudent/KulexiuForStudent/Module/Home/Model/RecentCourseModel.m
  8. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Home/Model/TalentTeacherModel.h
  9. 8 2
      KulexiuForStudent/KulexiuForStudent/Module/Home/Model/TalentTeacherModel.m
  10. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeCount/HomeCountView.h
  11. 28 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeCount/HomeCountView.m
  12. 7 3
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeCount/HomeCountView.xib
  13. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeNewMusic/HomeNewMusicView.xib
  14. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeRecommendMusic/HomeRecommendMusicView.xib
  15. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotAlbum/HomeHotAlbumView.xib
  16. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/HomeHotMusicView.xib
  17. 1 7
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentCell.m
  18. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/RecentCourse/HomeRecentCourseView.m
  19. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfo.h
  20. 49 45
      KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfo.m
  21. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m
  22. 8 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Controller/MyCourseViewController.m
  23. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/AccompanyCourseGroup/MyAccompanyCourseGroupView.m
  24. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/LiveCourseGroup/MyLiveCourseGroupView.m
  25. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MusicRoomCourseGroup/MyMusicRoomCourseGroupView.m
  26. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyCourseSortView/MyCourseSearchView.h
  27. 7 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyCourseSortView/MyCourseSearchView.m
  28. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/VIPCourseGroup/MyVipCourseGroupView.m
  29. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/VideoCourseGroup/MyVideoCourseGroupView.m
  30. 6 5
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/KSMemberView.m

+ 8 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h

@@ -1146,6 +1146,14 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param success 成功
 /// @param faliure 失败
 + (void)queryStudentByGroupIdRequest:(NSString *)post courseGroupId:(NSString *)courseGroupId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// index/summary
+
+/// 首页统计信息查询
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)homeSummaryRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 @end
 
 NS_ASSUME_NONNULL_END

+ 13 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -2182,4 +2182,17 @@
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// index/summary
+
+/// 首页统计信息查询
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)homeSummaryRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestHeader];
+    
+    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-student/index/summary"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
+}
 @end

+ 7 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/Controller/HomeArrangeCourseController.m

@@ -102,8 +102,15 @@
     [super viewWillAppear:animated];
     self.navigationController.interactivePopGestureRecognizer.enabled = YES;
      [self requestSubjectList];
+    // 页面appear 禁用
+    [IQKeyboardManager sharedManager].enable = NO;
 }
 
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    // 页面Disappear 启用
+    [IQKeyboardManager sharedManager].enable = YES;
+}
 - (void)requestSubjectList {
     [KSNetworkingManager subjectQueryPageRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/CourseDescAlertView.m


+ 11 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -526,7 +526,16 @@
 }
 
 - (void)requestStatistics {
-//    dispatch_group_enter(self.requestGroup);
+    dispatch_group_enter(self.requestGroup);
+    [KSNetworkingManager homeSummaryRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            [self.countView configWithSource:[dic ks_dictionaryValueForKey:@"data"]];
+        }
+        dispatch_group_leave(self.requestGroup);
+    } faliure:^(NSError * _Nonnull error) {
+        dispatch_group_leave(self.requestGroup);
+    }];
 }
 
 - (void)requestCourseInfo {
@@ -679,6 +688,7 @@
 - (void)requestData {
     [LOADING_MANAGER showHUD];
     [self requestNewsList];
+    [self requestStatistics];
     [self requestNotice];
     [self requestCourseInfo];
     // 老师

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/Model/RecentCourseModel.h

@@ -21,6 +21,7 @@
 @property (nonatomic, strong) NSString *courseStartTime;
 @property (nonatomic, strong) NSString *teacherId;
 @property (nonatomic, strong) NSString *courseGroupName;
+@property (nonatomic, strong) NSString *courseName;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 7 - 3
KulexiuForStudent/KulexiuForStudent/Module/Home/Model/RecentCourseModel.m

@@ -18,6 +18,7 @@ NSString *const kRecentCourseModelTeacherName = @"teacherName";
 NSString *const kRecentCourseModelCourseStartTime = @"courseStartTime";
 NSString *const kRecentCourseModelTeacherId = @"teacherId";
 NSString *const kRecentCourseModelCourseGroupName = @"courseGroupName";
+NSString *const kRecentCourseModelCourseName = @"courseName";
 
 
 @interface RecentCourseModel ()
@@ -38,7 +39,7 @@ NSString *const kRecentCourseModelCourseGroupName = @"courseGroupName";
 @synthesize courseStartTime = _courseStartTime;
 @synthesize teacherId = _teacherId;
 @synthesize courseGroupName = _courseGroupName;
-
+@synthesize courseName = _courseName;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -62,7 +63,7 @@ NSString *const kRecentCourseModelCourseGroupName = @"courseGroupName";
             self.courseStartTime = [self objectOrNilForKey:kRecentCourseModelCourseStartTime fromDictionary:dict];
             self.teacherId = [self objectOrNilForKey:kRecentCourseModelTeacherId fromDictionary:dict];
             self.courseGroupName = [self objectOrNilForKey:kRecentCourseModelCourseGroupName fromDictionary:dict];
-
+            self.courseName = [self objectOrNilForKey:kRecentCourseModelCourseName fromDictionary:dict];
     }
     
     return self;
@@ -82,7 +83,7 @@ NSString *const kRecentCourseModelCourseGroupName = @"courseGroupName";
     [mutableDict setValue:self.courseStartTime forKey:kRecentCourseModelCourseStartTime];
     [mutableDict setValue:self.teacherId forKey:kRecentCourseModelTeacherId];
     [mutableDict setValue:self.courseGroupName forKey:kRecentCourseModelCourseGroupName];
-
+    [mutableDict setValue:self.courseName forKey:kRecentCourseModelCourseName];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -119,6 +120,7 @@ NSString *const kRecentCourseModelCourseGroupName = @"courseGroupName";
     self.courseStartTime = [aDecoder decodeObjectForKey:kRecentCourseModelCourseStartTime];
     self.teacherId = [aDecoder decodeObjectForKey:kRecentCourseModelTeacherId];
     self.courseGroupName = [aDecoder decodeObjectForKey:kRecentCourseModelCourseGroupName];
+    self.courseName = [aDecoder decodeObjectForKey:kRecentCourseModelCourseName];
     return self;
 }
 
@@ -135,6 +137,7 @@ NSString *const kRecentCourseModelCourseGroupName = @"courseGroupName";
     [aCoder encodeObject:_courseStartTime forKey:kRecentCourseModelCourseStartTime];
     [aCoder encodeObject:_teacherId forKey:kRecentCourseModelTeacherId];
     [aCoder encodeObject:_courseGroupName forKey:kRecentCourseModelCourseGroupName];
+    [aCoder encodeObject:_courseName forKey:kRecentCourseModelCourseName];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -153,6 +156,7 @@ NSString *const kRecentCourseModelCourseGroupName = @"courseGroupName";
         copy.courseStartTime = [self.courseStartTime copyWithZone:zone];
         copy.teacherId = [self.teacherId copyWithZone:zone];
         copy.courseGroupName = [self.courseGroupName copyWithZone:zone];
+        copy.courseName = [self.courseName copyWithZone:zone];
     }
     
     return copy;

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/Model/TalentTeacherModel.h

@@ -49,7 +49,7 @@
 @property (nonatomic, strong) NSString *membershipStartTime;
 
 @property (nonatomic, assign) NSInteger watch;
-
+@property (nonatomic, assign) NSInteger fansNum; // 粉丝人数
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 8 - 2
KulexiuForStudent/KulexiuForStudent/Module/Home/Model/TalentTeacherModel.m

@@ -45,6 +45,7 @@ NSString *const kTalentTeacherModelLiveDate = @"liveDate";
 NSString *const kTalentTeacherModelUserId = @"userId";
 NSString *const kTalentTeacherModelMembershipStartTime = @"membershipStartTime";
 NSString *const kTalentTeacherModelWatch = @"watch";
+NSString *const kTalentTeacherModelFansNum = @"fansNum";
 
 
 @interface TalentTeacherModel ()
@@ -92,6 +93,7 @@ NSString *const kTalentTeacherModelWatch = @"watch";
 @synthesize userId = _userId;
 @synthesize membershipStartTime = _membershipStartTime;
 @synthesize watch = _watch;
+@synthesize fansNum = _fansNum;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -142,6 +144,7 @@ NSString *const kTalentTeacherModelWatch = @"watch";
             self.userId = [[self objectOrNilForKey:kTalentTeacherModelUserId fromDictionary:dict] doubleValue];
             self.membershipStartTime = [self objectOrNilForKey:kTalentTeacherModelMembershipStartTime fromDictionary:dict];
             self.watch = [[self objectOrNilForKey:kTalentTeacherModelWatch fromDictionary:dict] integerValue];
+        self.fansNum = [[self objectOrNilForKey:kTalentTeacherModelFansNum fromDictionary:dict] integerValue];
     }
     
     return self;
@@ -187,8 +190,8 @@ NSString *const kTalentTeacherModelWatch = @"watch";
     [mutableDict setValue:self.liveDate forKey:kTalentTeacherModelLiveDate];
     [mutableDict setValue:[NSNumber numberWithDouble:self.userId] forKey:kTalentTeacherModelUserId];
     [mutableDict setValue:self.membershipStartTime forKey:kTalentTeacherModelMembershipStartTime];
-    [mutableDict setValue:[NSNumber numberWithInt:self.watch] forKey:kTalentTeacherModelWatch];
-    
+    [mutableDict setValue:[NSNumber numberWithInteger:self.watch] forKey:kTalentTeacherModelWatch];
+    [mutableDict setValue:[NSNumber numberWithInteger:self.fansNum] forKey:kTalentTeacherModelFansNum];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -252,6 +255,7 @@ NSString *const kTalentTeacherModelWatch = @"watch";
     self.userId = [aDecoder decodeDoubleForKey:kTalentTeacherModelUserId];
     self.membershipStartTime = [aDecoder decodeObjectForKey:kTalentTeacherModelMembershipStartTime];
     self.watch = [aDecoder decodeIntegerForKey:kTalentTeacherModelWatch];
+    self.fansNum = [aDecoder decodeIntegerForKey:kTalentTeacherModelFansNum];
     return self;
 }
 
@@ -295,6 +299,7 @@ NSString *const kTalentTeacherModelWatch = @"watch";
     [aCoder encodeDouble:_userId forKey:kTalentTeacherModelUserId];
     [aCoder encodeObject:_membershipStartTime forKey:kTalentTeacherModelMembershipStartTime];
     [aCoder encodeInteger:_watch forKey:kTalentTeacherModelWatch];
+    [aCoder encodeInteger:_fansNum forKey:kTalentTeacherModelFansNum];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -340,6 +345,7 @@ NSString *const kTalentTeacherModelWatch = @"watch";
         copy.userId = self.userId;
         copy.membershipStartTime = [self.membershipStartTime copyWithZone:zone];
         copy.watch = self.watch;
+        copy.fansNum = self.fansNum;
     }
     
     return copy;

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeCount/HomeCountView.h

@@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 + (instancetype)sharedInstance;
 
+- (void)configWithSource:(NSDictionary *)parm;
+
 - (void)countActionCallback:(HomeCountCallback)callback;
 
 + (CGFloat)getViewHeight;

+ 28 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeCount/HomeCountView.m

@@ -10,6 +10,8 @@
 @interface HomeCountView ()
 
 @property (nonatomic, copy) HomeCountCallback callback;
+@property (weak, nonatomic) IBOutlet UILabel *courseCountLabel;
+@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
 
 @end
 
@@ -21,6 +23,32 @@
     return view;
 }
 
+- (void)configWithSource:(NSDictionary *)parm {
+    // 时间显示
+    NSInteger duration = [parm ks_integerValueForKey:@"recordTime"];
+    NSString *timeDesc =  [NSString getTimeStringChineseWithTime:duration];
+    UIFont *numberFont = [UIFont fontWithName:@"DIN Alternate Bold" size:22.0f];
+    UIFont *nomalFont = [UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular];
+    
+    // 计算两种字体的 descender 和 ascender 差异
+    CGFloat maxDescender = MIN(numberFont.capHeight, nomalFont.descender);
+    
+    NSInteger baselineOffsetNumber = (maxDescender - numberFont.descender)/ 4.0f;
+    NSInteger baselineOffsetNormal = (maxDescender - nomalFont.descender) / 4.0f;
+    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
+    style.minimumLineHeight = 26;
+    style.maximumLineHeight = 26;
+    NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:timeDesc attributes:@{NSFontAttributeName : numberFont,NSBaselineOffsetAttributeName:@(baselineOffsetNumber), NSForegroundColorAttributeName : HexRGB(0x333333), NSParagraphStyleAttributeName : style}];
+    if ([timeDesc containsString:@"时"]) {
+        [attrs addAttributes:@{NSFontAttributeName : nomalFont, NSBaselineOffsetAttributeName:@(baselineOffsetNormal), NSForegroundColorAttributeName:HexRGB(0x777777),NSParagraphStyleAttributeName : style} range:[timeDesc rangeOfString:@"时"]];
+    }
+    [attrs addAttributes:@{NSFontAttributeName : nomalFont, NSBaselineOffsetAttributeName:@(baselineOffsetNormal), NSForegroundColorAttributeName:HexRGB(0x777777),NSParagraphStyleAttributeName : style} range:[timeDesc rangeOfString:@"分"]];
+    [attrs addAttributes:@{NSFontAttributeName : nomalFont, NSBaselineOffsetAttributeName:@(baselineOffsetNormal), NSForegroundColorAttributeName:HexRGB(0x777777),NSParagraphStyleAttributeName : style} range:[timeDesc rangeOfString:@"秒"]];
+    self.timeLabel.attributedText = attrs;
+    
+    self.courseCountLabel.text = [NSString stringWithFormat:@"%zd/%zd", [parm ks_integerValueForKey:@"courseCount"], [parm ks_integerValueForKey:@"totalCourseCount"]];
+}
+
 - (void)countActionCallback:(HomeCountCallback)callback {
     if (callback) {
         self.callback = callback;

+ 7 - 3
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeCount/HomeCountView.xib

@@ -28,7 +28,7 @@
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iz2-em-w2S">
                                     <rect key="frame" x="15" y="0.0" width="0.0" height="26"/>
                                     <constraints>
-                                        <constraint firstAttribute="height" constant="26" id="PAX-xD-imW"/>
+                                        <constraint firstAttribute="height" constant="26" id="q0o-QN-zwX"/>
                                     </constraints>
                                     <fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="22"/>
                                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -93,8 +93,8 @@
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cv0-0n-UBN">
                             <rect key="frame" x="0.0" y="10.666666666666664" width="169" height="46"/>
                             <subviews>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2/6" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VYX-QP-S1C">
-                                    <rect key="frame" x="15.000000000000002" y="0.0" width="28.666666666666671" height="26"/>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VYX-QP-S1C">
+                                    <rect key="frame" x="15" y="0.0" width="0.0" height="26"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="26" id="RL0-B3-iZT"/>
                                     </constraints>
@@ -164,6 +164,10 @@
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="courseCountLabel" destination="VYX-QP-S1C" id="Ktc-Zi-MLP"/>
+                <outlet property="timeLabel" destination="iz2-em-w2S" id="7CK-Ud-zcW"/>
+            </connections>
             <point key="canvasLocation" x="148.85496183206106" y="-7.394366197183099"/>
         </view>
     </objects>

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeNewMusic/HomeNewMusicView.xib

@@ -26,11 +26,11 @@
                     </userDefinedRuntimeAttributes>
                 </view>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="最新曲目" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6CW-e0-al3">
-                    <rect key="frame" x="24" y="10" width="71.666666666666671" height="24"/>
+                    <rect key="frame" x="24" y="10" width="67.666666666666671" height="24"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="24" id="ykn-Z7-imu"/>
                     </constraints>
-                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
+                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeRecommendMusic/HomeRecommendMusicView.xib

@@ -26,11 +26,11 @@
                     </userDefinedRuntimeAttributes>
                 </view>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="推荐曲目" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Gb-9V-Vs2">
-                    <rect key="frame" x="24" y="10" width="71.666666666666671" height="24"/>
+                    <rect key="frame" x="24" y="10" width="67.666666666666671" height="24"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="24" id="j7f-c1-B4o"/>
                     </constraints>
-                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
+                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
@@ -61,7 +61,7 @@
                     </constraints>
                 </imageView>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_left" translatesAutoresizingMaskIntoConstraints="NO" id="Te8-hi-wDF">
-                    <rect key="frame" x="14" y="16" width="4" height="12"/>
+                    <rect key="frame" x="14" y="14.666666666666664" width="4" height="15"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="4" id="g6O-Mb-yas"/>
                     </constraints>
@@ -104,7 +104,7 @@
         </view>
     </objects>
     <resources>
-        <image name="home_left" width="4" height="12"/>
+        <image name="home_left" width="4" height="15"/>
         <image name="home_more_green" width="5" height="8"/>
     </resources>
 </document>

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotAlbum/HomeHotAlbumView.xib

@@ -32,11 +32,11 @@
                     <nil key="highlightedColor"/>
                 </label>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="热门专辑" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="u9G-3b-Wgt">
-                    <rect key="frame" x="29" y="10" width="71.5" height="22"/>
+                    <rect key="frame" x="29" y="10" width="67.5" height="22"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="22" id="mNH-cs-reJ"/>
                     </constraints>
-                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
+                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
@@ -68,7 +68,7 @@
                     </connections>
                 </button>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_left" translatesAutoresizingMaskIntoConstraints="NO" id="yKI-ip-Z1l">
-                    <rect key="frame" x="19" y="15" width="4" height="12"/>
+                    <rect key="frame" x="19" y="13.5" width="4" height="15"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="4" id="0n6-S5-hNN"/>
                     </constraints>
@@ -104,7 +104,7 @@
         </view>
     </objects>
     <resources>
-        <image name="home_left" width="4" height="12"/>
+        <image name="home_left" width="4" height="15"/>
         <image name="home_more_green" width="5" height="8"/>
     </resources>
 </document>

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/HomeHotMusicView.xib

@@ -26,11 +26,11 @@
                     </userDefinedRuntimeAttributes>
                 </view>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="最热曲目" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t7j-WY-6gF">
-                    <rect key="frame" x="24" y="10" width="71.5" height="24"/>
+                    <rect key="frame" x="24" y="10" width="67.5" height="24"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="24" id="5Zd-6z-MkK"/>
                     </constraints>
-                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
+                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
@@ -61,7 +61,7 @@
                     </constraints>
                 </imageView>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_left" translatesAutoresizingMaskIntoConstraints="NO" id="DQd-nL-Wor">
-                    <rect key="frame" x="14" y="16" width="4" height="12"/>
+                    <rect key="frame" x="14" y="14.5" width="4" height="15"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="4" id="ysI-kO-iNt"/>
                     </constraints>
@@ -104,7 +104,7 @@
         </view>
     </objects>
     <resources>
-        <image name="home_left" width="4" height="12"/>
+        <image name="home_left" width="4" height="15"/>
         <image name="home_more_green" width="5" height="8"/>
     </resources>
 </document>

+ 1 - 7
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentCell.m

@@ -87,13 +87,7 @@
     else {
         self.teacherName.text = [NSString stringWithFormat:@"%@",sourceModel.username];
     }
-    
-//    if ([NSString isEmptyString:sourceModel.graduateSchool]) {
-//        self.graduateSchool.text = @"认证老师";
-//    }
-//    else {
-//        self.graduateSchool.text = [NSString returnNoNullStringWithString:sourceModel.graduateSchool];
-//    }
+    self.graduateSchool.text = [NSString stringWithFormat:@"%zd人已关注",sourceModel.fansNum];
 }
 
 - (LOTAnimationView *)animationView {

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

@@ -68,6 +68,7 @@
         self.statusLabel.font = [UIFont systemFontOfSize:14.0f];
         self.statusLabel.textColor = THEMECOLOR;
     }
+    self.titleLabel.text = [NSString returnNoNullStringWithString:model.courseName];
 }
 
 

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfo.h

@@ -62,6 +62,7 @@
 
 @property (nonatomic, strong) NSString *discountStartTime;
 @property (nonatomic, strong) NSString *discountEndTime;
+@property (nonatomic, assign) BOOL discountCardFlag;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 49 - 45
KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfo.m

@@ -58,7 +58,7 @@ NSString *const kUserInfoUserImCustomerId = @"imCustomerId";
 
 NSString *const kUserInfoUserDiscountStartTime = @"discountStartTime";
 NSString *const kUserInfoUserDiscountEndTime = @"discountEndTime";
-
+NSString *const kUserInfoUserDiscountCardFlag = @"discountCardFlag";
 
 @interface UserInfo ()
 
@@ -116,7 +116,7 @@ NSString *const kUserInfoUserDiscountEndTime = @"discountEndTime";
 @synthesize imCustomerId = _imCustomerId;
 @synthesize discountStartTime = _discountStartTime;
 @synthesize discountEndTime = _discountEndTime;
-
+@synthesize discountCardFlag = _discountCardFlag;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -130,54 +130,55 @@ NSString *const kUserInfoUserDiscountEndTime = @"discountEndTime";
     // This check serves to make sure that a non-NSDictionary object
     // passed into the model class doesn't break the parsing.
     if(self && [dict isKindOfClass:[NSDictionary class]]) {
-            self.tenantName = [self objectOrNilForKey:kUserInfoTenantName fromDictionary:dict];
-            self.userId = [[self objectOrNilForKey:kUserInfoUserId fromDictionary:dict] doubleValue];
-            self.birthdate = [self objectOrNilForKey:kUserInfoBirthdate fromDictionary:dict];
-            self.membershipStartTime = [self objectOrNilForKey:kUserInfoMembershipStartTime fromDictionary:dict];
-            self.tenantAlbumStartTime = [self objectOrNilForKey:kUserInfoTenantAlbumStartTime fromDictionary:dict];
-            self.heardUrl = [self objectOrNilForKey:kUserInfoHeardUrl fromDictionary:dict];
-            self.tenantId = [[self objectOrNilForKey:kUserInfoTenantId fromDictionary:dict] doubleValue];
-            self.memberRankSettingId = [[self objectOrNilForKey:kUserInfoMemberRankSettingId fromDictionary:dict] doubleValue];
-            self.hideFlag = [[self objectOrNilForKey:kUserInfoHideFlag fromDictionary:dict] doubleValue];
-            self.tenantAlbumFlag = [self objectOrNilForKey:kUserInfoTenantAlbumFlag fromDictionary:dict];
-            self.exerciseDays = [[self objectOrNilForKey:kUserInfoExerciseDays fromDictionary:dict] doubleValue];
-            self.finshClassHours = [[self objectOrNilForKey:kUserInfoFinshClassHours fromDictionary:dict] doubleValue];
-            self.exerciseHours = [[self objectOrNilForKey:kUserInfoExerciseHours fromDictionary:dict] doubleValue];
-            self.membershipDays = [[self objectOrNilForKey:kUserInfoMembershipDays fromDictionary:dict] doubleValue];
-            self.starTeacherNum = [[self objectOrNilForKey:kUserInfoStarTeacherNum fromDictionary:dict] doubleValue];
-            self.membershipEndTime = [self objectOrNilForKey:kUserInfoMembershipEndTime fromDictionary:dict];
-            self.updateTime = [self objectOrNilForKey:kUserInfoUpdateTime fromDictionary:dict];
-            self.realName = [self objectOrNilForKey:kUserInfoRealName fromDictionary:dict];
-            self.subjectId = [self objectOrNilForKey:kUserInfoSubjectId fromDictionary:dict];
-            self.username = [self objectOrNilForKey:kUserInfoUsername fromDictionary:dict];
-            self.tenantAlbumEndTime = [self objectOrNilForKey:kUserInfoTenantAlbumEndTime fromDictionary:dict];
-            self.isVip = [[self objectOrNilForKey:kUserInfoIsVip fromDictionary:dict] doubleValue];
-            self.evaluateTime = [[self objectOrNilForKey:kUserInfoEvaluateTime fromDictionary:dict] doubleValue];
-            self.imUserId = [self objectOrNilForKey:kUserInfoImUserId fromDictionary:dict];
-            self.musicAlbumNum = [[self objectOrNilForKey:kUserInfoMusicAlbumNum fromDictionary:dict] doubleValue];
-            self.cloudStudyUseLastDay = [self objectOrNilForKey:kUserInfoCloudStudyUseLastDay fromDictionary:dict];
-            self.cloudStudySequenceDays = [[self objectOrNilForKey:kUserInfoCloudStudySequenceDays fromDictionary:dict] doubleValue];
-            self.gender = [[self objectOrNilForKey:kUserInfoGender fromDictionary:dict] doubleValue];
-            self.testingNum = [[self objectOrNilForKey:kUserInfoTestingNum fromDictionary:dict] doubleValue];
-            self.imToken = [self objectOrNilForKey:kUserInfoImToken fromDictionary:dict];
-            self.createTime = [self objectOrNilForKey:kUserInfoCreateTime fromDictionary:dict];
-            self.musicSheetNum = [[self objectOrNilForKey:kUserInfoMusicSheetNum fromDictionary:dict] doubleValue];
-            self.tenantAlbumStatus = [[self objectOrNilForKey:kUserInfoTenantAlbumStatus fromDictionary:dict] doubleValue];
-            self.unfinshClassHours = [[self objectOrNilForKey:kUserInfoUnfinshClassHours fromDictionary:dict] doubleValue];
-            self.unionId = [[self objectOrNilForKey:kUserInfoUnionId fromDictionary:dict] doubleValue];
-            self.trainTime = [[self objectOrNilForKey:kUserInfoTrainTime fromDictionary:dict] doubleValue];
-            self.userType = [self objectOrNilForKey:kUserInfoUserType fromDictionary:dict];
-            self.subjectName = [self objectOrNilForKey:kUserInfoSubjectName fromDictionary:dict];
-            self.phone = [self objectOrNilForKey:kUserInfoPhone fromDictionary:dict];
-            self.isReal = [[self objectOrNilForKey:kUserInfoIsReal fromDictionary:dict] doubleValue];
-            self.idCardNo = [self objectOrNilForKey:kUserInfoIdCardNo fromDictionary:dict];
-            self.lockFlag = [[self objectOrNilForKey:kUserInfoLockFlag fromDictionary:dict] doubleValue];
+        self.tenantName = [self objectOrNilForKey:kUserInfoTenantName fromDictionary:dict];
+        self.userId = [[self objectOrNilForKey:kUserInfoUserId fromDictionary:dict] doubleValue];
+        self.birthdate = [self objectOrNilForKey:kUserInfoBirthdate fromDictionary:dict];
+        self.membershipStartTime = [self objectOrNilForKey:kUserInfoMembershipStartTime fromDictionary:dict];
+        self.tenantAlbumStartTime = [self objectOrNilForKey:kUserInfoTenantAlbumStartTime fromDictionary:dict];
+        self.heardUrl = [self objectOrNilForKey:kUserInfoHeardUrl fromDictionary:dict];
+        self.tenantId = [[self objectOrNilForKey:kUserInfoTenantId fromDictionary:dict] doubleValue];
+        self.memberRankSettingId = [[self objectOrNilForKey:kUserInfoMemberRankSettingId fromDictionary:dict] doubleValue];
+        self.hideFlag = [[self objectOrNilForKey:kUserInfoHideFlag fromDictionary:dict] doubleValue];
+        self.tenantAlbumFlag = [self objectOrNilForKey:kUserInfoTenantAlbumFlag fromDictionary:dict];
+        self.exerciseDays = [[self objectOrNilForKey:kUserInfoExerciseDays fromDictionary:dict] doubleValue];
+        self.finshClassHours = [[self objectOrNilForKey:kUserInfoFinshClassHours fromDictionary:dict] doubleValue];
+        self.exerciseHours = [[self objectOrNilForKey:kUserInfoExerciseHours fromDictionary:dict] doubleValue];
+        self.membershipDays = [[self objectOrNilForKey:kUserInfoMembershipDays fromDictionary:dict] doubleValue];
+        self.starTeacherNum = [[self objectOrNilForKey:kUserInfoStarTeacherNum fromDictionary:dict] doubleValue];
+        self.membershipEndTime = [self objectOrNilForKey:kUserInfoMembershipEndTime fromDictionary:dict];
+        self.updateTime = [self objectOrNilForKey:kUserInfoUpdateTime fromDictionary:dict];
+        self.realName = [self objectOrNilForKey:kUserInfoRealName fromDictionary:dict];
+        self.subjectId = [self objectOrNilForKey:kUserInfoSubjectId fromDictionary:dict];
+        self.username = [self objectOrNilForKey:kUserInfoUsername fromDictionary:dict];
+        self.tenantAlbumEndTime = [self objectOrNilForKey:kUserInfoTenantAlbumEndTime fromDictionary:dict];
+        self.isVip = [[self objectOrNilForKey:kUserInfoIsVip fromDictionary:dict] doubleValue];
+        self.evaluateTime = [[self objectOrNilForKey:kUserInfoEvaluateTime fromDictionary:dict] doubleValue];
+        self.imUserId = [self objectOrNilForKey:kUserInfoImUserId fromDictionary:dict];
+        self.musicAlbumNum = [[self objectOrNilForKey:kUserInfoMusicAlbumNum fromDictionary:dict] doubleValue];
+        self.cloudStudyUseLastDay = [self objectOrNilForKey:kUserInfoCloudStudyUseLastDay fromDictionary:dict];
+        self.cloudStudySequenceDays = [[self objectOrNilForKey:kUserInfoCloudStudySequenceDays fromDictionary:dict] doubleValue];
+        self.gender = [[self objectOrNilForKey:kUserInfoGender fromDictionary:dict] doubleValue];
+        self.testingNum = [[self objectOrNilForKey:kUserInfoTestingNum fromDictionary:dict] doubleValue];
+        self.imToken = [self objectOrNilForKey:kUserInfoImToken fromDictionary:dict];
+        self.createTime = [self objectOrNilForKey:kUserInfoCreateTime fromDictionary:dict];
+        self.musicSheetNum = [[self objectOrNilForKey:kUserInfoMusicSheetNum fromDictionary:dict] doubleValue];
+        self.tenantAlbumStatus = [[self objectOrNilForKey:kUserInfoTenantAlbumStatus fromDictionary:dict] doubleValue];
+        self.unfinshClassHours = [[self objectOrNilForKey:kUserInfoUnfinshClassHours fromDictionary:dict] doubleValue];
+        self.unionId = [[self objectOrNilForKey:kUserInfoUnionId fromDictionary:dict] doubleValue];
+        self.trainTime = [[self objectOrNilForKey:kUserInfoTrainTime fromDictionary:dict] doubleValue];
+        self.userType = [self objectOrNilForKey:kUserInfoUserType fromDictionary:dict];
+        self.subjectName = [self objectOrNilForKey:kUserInfoSubjectName fromDictionary:dict];
+        self.phone = [self objectOrNilForKey:kUserInfoPhone fromDictionary:dict];
+        self.isReal = [[self objectOrNilForKey:kUserInfoIsReal fromDictionary:dict] doubleValue];
+        self.idCardNo = [self objectOrNilForKey:kUserInfoIdCardNo fromDictionary:dict];
+        self.lockFlag = [[self objectOrNilForKey:kUserInfoLockFlag fromDictionary:dict] doubleValue];
         self.tenantGroupName = [self objectOrNilForKey:kUserInfoTenantGroupName fromDictionary:dict];
         self.userVip = [UserVip modelObjectWithDictionary:[dict objectForKey:kUserInfoUserVip]];
         self.customerServiceNum = [[self objectOrNilForKey:kUserInfoUserCustomerServiceNum fromDictionary:dict] integerValue];
         self.imCustomerId = [self objectOrNilForKey:kUserInfoUserImCustomerId fromDictionary:dict];
         self.discountStartTime = [self objectOrNilForKey:kUserInfoUserDiscountStartTime fromDictionary:dict];
         self.discountEndTime = [self objectOrNilForKey:kUserInfoUserDiscountEndTime fromDictionary:dict];
+        self.discountCardFlag = [[self objectOrNilForKey:kUserInfoUserDiscountCardFlag fromDictionary:dict] boolValue];
     }
     
     return self;
@@ -235,6 +236,7 @@ NSString *const kUserInfoUserDiscountEndTime = @"discountEndTime";
     [mutableDict setValue:self.imCustomerId forKey:kUserInfoUserImCustomerId];
     [mutableDict setValue:self.discountStartTime forKey:kUserInfoUserDiscountStartTime];
     [mutableDict setValue:self.discountEndTime forKey:kUserInfoUserDiscountEndTime];
+    [mutableDict setValue:[NSNumber numberWithBool:self.discountCardFlag] forKey:kUserInfoUserDiscountCardFlag];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -309,7 +311,7 @@ NSString *const kUserInfoUserDiscountEndTime = @"discountEndTime";
     self.imCustomerId = [aDecoder decodeObjectForKey:kUserInfoUserImCustomerId];
     self.discountStartTime = [aDecoder decodeObjectForKey:kUserInfoUserDiscountStartTime];
     self.discountEndTime = [aDecoder decodeObjectForKey:kUserInfoUserDiscountEndTime];
-    
+    self.discountCardFlag = [aDecoder decodeBoolForKey:kUserInfoUserDiscountCardFlag];
     return self;
 }
 
@@ -364,6 +366,7 @@ NSString *const kUserInfoUserDiscountEndTime = @"discountEndTime";
     [aCoder encodeObject:_imCustomerId forKey:kUserInfoUserImCustomerId];
     [aCoder encodeObject:_discountStartTime forKey:kUserInfoUserDiscountStartTime];
     [aCoder encodeObject:_discountEndTime forKey:kUserInfoUserDiscountEndTime];
+    [aCoder encodeBool:_discountCardFlag forKey:kUserInfoUserDiscountCardFlag];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -420,6 +423,7 @@ NSString *const kUserInfoUserDiscountEndTime = @"discountEndTime";
         copy.imCustomerId = [self.imCustomerId copyWithZone:zone];
         copy.discountStartTime = [self.discountStartTime copyWithZone:zone];
         copy.discountEndTime = [self.discountEndTime copyWithZone:zone];
+        copy.discountCardFlag = self.discountCardFlag;
     }
     
     return copy;

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m

@@ -180,7 +180,7 @@
         case MINEVIEWTAG_CARD: // card
         {
             KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-            ctrl.url = [NSString stringWithFormat:@"%@%@",WEBHOST,@"/#/memberCenter"];
+            ctrl.url = [NSString stringWithFormat:@"%@%@",WEBHOST,@"/#/discount-card"];
             [self.navigationController pushViewController:ctrl animated:YES];
         }
             break;

+ 8 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/Controller/MyCourseViewController.m

@@ -112,10 +112,18 @@
 
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
+    // 页面appear 禁用
+    [IQKeyboardManager sharedManager].enable = NO;
     self.navigationController.interactivePopGestureRecognizer.enabled = YES;
     [self requestSubjectList];
 }
 
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    // 页面Disappear 启用
+    [IQKeyboardManager sharedManager].enable = YES;
+}
+
 - (void)requestSubjectList {
     [KSNetworkingManager querySubjectItemRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/AccompanyCourseGroup/MyAccompanyCourseGroupView.m

@@ -210,6 +210,7 @@
 - (MyCourseSearchView *)searchView {
     if (!_searchView) {
         _searchView = [MyCourseSearchView sharedInstance];
+        [_searchView configPlaceholder:@"请输入课程组或老师名称"];
         MJWeakSelf;
         [_searchView searchActionCallback:^(MY_COURSE_SORT type, NSString * _Nullable searchKey) {
             [weakSelf searchAction:type searchKey:searchKey];

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

@@ -218,6 +218,7 @@
 - (MyCourseSearchView *)searchView {
     if (!_searchView) {
         _searchView = [MyCourseSearchView sharedInstance];
+        [_searchView configPlaceholder:@"请输入课程组或老师名称"];
         MJWeakSelf;
         [_searchView searchActionCallback:^(MY_COURSE_SORT type, NSString * _Nullable searchKey) {
             [weakSelf searchAction:type searchKey:searchKey];

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MusicRoomCourseGroup/MyMusicRoomCourseGroupView.m

@@ -207,6 +207,7 @@
 - (MyCourseSearchView *)searchView {
     if (!_searchView) {
         _searchView = [MyCourseSearchView sharedInstance];
+        [_searchView configPlaceholder:@"请输入课程组或老师名称"];
         MJWeakSelf;
         [_searchView searchActionCallback:^(MY_COURSE_SORT type, NSString * _Nullable searchKey) {
             [weakSelf searchAction:type searchKey:searchKey];

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyCourseSortView/MyCourseSearchView.h

@@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 + (instancetype)sharedInstance;
 
+- (void)configPlaceholder:(NSString *)placeholderString;
+
 - (void)searchActionCallback:(MyCourseSortCallback)callback;
 
 + (CGFloat)getViewHeight;

+ 7 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyCourseSortView/MyCourseSearchView.m

@@ -23,6 +23,13 @@
     return view;
 }
 
+- (void)configPlaceholder:(NSString *)placeholderString {
+    if (![NSString isEmptyString:placeholderString]) {
+        self.searchField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholderString attributes:@{NSForegroundColorAttributeName:HexRGBAlpha(0x000000, 0.4),NSFontAttributeName:[UIFont systemFontOfSize:14.0f]}];
+    }
+    
+}
+
 - (void)searchActionCallback:(MyCourseSortCallback)callback {
     if (callback) {
         self.callback = callback;

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/VIPCourseGroup/MyVipCourseGroupView.m

@@ -210,6 +210,7 @@
 - (MyCourseSearchView *)searchView {
     if (!_searchView) {
         _searchView = [MyCourseSearchView sharedInstance];
+        [_searchView configPlaceholder:@"请输入课程组或老师名称"];
         MJWeakSelf;
         [_searchView searchActionCallback:^(MY_COURSE_SORT type, NSString * _Nullable searchKey) {
             [weakSelf searchAction:type searchKey:searchKey];

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/VideoCourseGroup/MyVideoCourseGroupView.m

@@ -207,6 +207,7 @@
 - (MyCourseSearchView *)searchView {
     if (!_searchView) {
         _searchView = [MyCourseSearchView sharedInstance];
+        [_searchView configPlaceholder:@"请输入课程组或老师名称"];
         MJWeakSelf;
         [_searchView searchActionCallback:^(MY_COURSE_SORT type, NSString * _Nullable searchKey) {
             [weakSelf searchAction:type searchKey:searchKey];

+ 6 - 5
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/KSMemberView.m

@@ -73,15 +73,16 @@
         }
     }
     [self configMemberDisplay:sourceModel.userVip];
-    if ([NSString isEmptyString:sourceModel.discountEndTime]) {
-        self.cardTitle.text = @"开通畅学卡";
-        self.cardDesc.text = [NSString returnNoNullStringWithString:self.courseDefaultDesc];
-    }
-    else {
+    
+    if (sourceModel.discountCardFlag) {
         self.cardTitle.text = @"畅学卡";
         NSString *timeStr = [[sourceModel.discountEndTime componentsSeparatedByString:@" "] firstObject];
         self.cardDesc.text = [NSString stringWithFormat:@"有效期至%@", [NSString returnNoNullStringWithString:timeStr]];
     }
+    else {
+        self.cardTitle.text = @"开通畅学卡";
+        self.cardDesc.text = [NSString returnNoNullStringWithString:self.courseDefaultDesc];
+    }
 }
 
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä