Browse Source

课表显示

Steven 7 months ago
parent
commit
bc8131b1c4

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/Model/TableCourseModel.h

@@ -28,6 +28,7 @@
 @property (nonatomic, strong) NSString *teacherReplied;
 @property (nonatomic, strong) NSString *imGroupId;
 @property (nonatomic, strong) NSString *imUserId;
+@property (nonatomic, strong) NSString *courseName;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 10 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/Model/TableCourseModel.m

@@ -25,7 +25,7 @@ NSString *const kTableCourseModelStudentReplied= @"studentReplied";
 NSString *const kTableCourseModelTeacherReplied = @"teacherReplied";
 NSString *const kTableCourseModelImGroupId = @"imGroupId";
 NSString *const kTableCourseModelImUserId= @"imUserId";
-
+NSString *const kTableCourseModelCourseName = @"courseName";
 
 @interface TableCourseModel ()
 
@@ -51,6 +51,8 @@ NSString *const kTableCourseModelImUserId= @"imUserId";
 @synthesize teacherReplied = _teacherReplied;
 @synthesize studentReplied = _studentReplied;
 @synthesize imGroupId = _imGroupId;
+@synthesize courseName = _courseName;
+
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -81,6 +83,7 @@ NSString *const kTableCourseModelImUserId= @"imUserId";
         self.studentReplied = [self objectOrNilForKey:kTableCourseModelStudentReplied fromDictionary:dict];
         self.imGroupId = [self objectOrNilForKey:kTableCourseModelImGroupId fromDictionary:dict];
         self.imUserId = [self objectOrNilForKey:kTableCourseModelImUserId fromDictionary:dict];
+        self.courseName = [self objectOrNilForKey:kTableCourseModelCourseName fromDictionary:dict];
 
     }
     
@@ -108,6 +111,8 @@ NSString *const kTableCourseModelImUserId= @"imUserId";
     [mutableDict setValue:self.studentReplied forKey:kTableCourseModelStudentReplied];
     [mutableDict setValue:self.imGroupId forKey:kTableCourseModelImGroupId];
     [mutableDict setValue:self.imUserId forKey:kTableCourseModelImUserId];
+    [mutableDict setValue:self.courseName forKey:kTableCourseModelCourseName];
+
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -151,6 +156,8 @@ NSString *const kTableCourseModelImUserId= @"imUserId";
     self.teacherReplied = [aDecoder decodeObjectForKey:kTableCourseModelTeacherReplied];
     self.imGroupId = [aDecoder decodeObjectForKey:kTableCourseModelImGroupId];
     self.imUserId = [aDecoder decodeObjectForKey:kTableCourseModelImUserId];
+    self.courseName = [aDecoder decodeObjectForKey:kTableCourseModelCourseName];
+
     return self;
 }
 
@@ -174,6 +181,7 @@ NSString *const kTableCourseModelImUserId= @"imUserId";
     [aCoder encodeObject:_teacherReplied forKey:kTableCourseModelTeacherReplied];
     [aCoder encodeObject:_imGroupId forKey:kTableCourseModelImGroupId];
     [aCoder encodeObject:_imUserId forKey:kTableCourseModelImUserId];
+    [aCoder encodeObject:_courseName forKey:kTableCourseModelCourseName];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -199,6 +207,7 @@ NSString *const kTableCourseModelImUserId= @"imUserId";
         copy.studentReplied = [self.studentReplied copyWithZone:zone];
         copy.imGroupId = [self.imGroupId copyWithZone:zone];
         copy.imUserId = [self.imUserId copyWithZone:zone];
+        copy.courseName = [self.courseName copyWithZone:zone];
     }
     
     return copy;

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/View/CourseForLiveCell.m

@@ -41,7 +41,7 @@
     // time
     [self evaluateTimeLabelWithBeginTime:model.startTime endTime:model.endTime];
     
-    self.courseName.text = [NSString returnNoNullStringWithString:model.name];
+    self.courseName.text = [NSString returnNoNullStringWithString:model.courseName];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
     self.descLabel.text = [NSString stringWithFormat:@"%@人", model.payCount];
     if ([model.status isEqualToString:@"NOT_START"]) { // 未开始

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/View/MusicRoomCourseCell.m

@@ -45,7 +45,7 @@
         self.targetId = model.imGroupId;
         // time
         [self evaluateTimeLabelWithBeginTime:model.startTime endTime:model.endTime];
-        self.courseName.text = [NSString returnNoNullStringWithString:model.name];
+        self.courseName.text = [NSString returnNoNullStringWithString:model.courseName];
         self.subjectName.text = [NSString returnNoNullStringWithString:model.subjectName];
         
         if ([model.status isEqualToString:@"NOT_START"]) {

+ 5 - 12
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeNav/HomeNavSearchView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -20,7 +20,7 @@
                         <constraint firstAttribute="height" constant="35" id="LKm-hv-VhJ"/>
                     </constraints>
                 </imageView>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ppo-1q-gi4">
+                <view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ppo-1q-gi4">
                     <rect key="frame" x="91" y="48" width="229" height="30"/>
                     <subviews>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_search" translatesAutoresizingMaskIntoConstraints="NO" id="13W-5h-GPV">
@@ -31,7 +31,7 @@
                             </constraints>
                         </imageView>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="搜索你喜欢的内容" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ulN-Yy-Ry7">
-                            <rect key="frame" x="49" y="7.5" width="99" height="15"/>
+                            <rect key="frame" x="49" y="7.5" width="95.5" height="15"/>
                             <fontDescription key="fontDescription" type="system" pointSize="12"/>
                             <color key="textColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
@@ -52,9 +52,6 @@
                             <real key="value" value="15"/>
                         </userDefinedRuntimeAttribute>
                     </userDefinedRuntimeAttributes>
-                    <connections>
-                        <outletCollection property="gestureRecognizers" destination="1L4-Pr-sIj" appends="YES" id="mdp-7R-RWo"/>
-                    </connections>
                 </view>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zhb-6r-b1M">
                     <rect key="frame" x="368" y="43" width="40" height="40"/>
@@ -142,11 +139,7 @@
             </connections>
             <point key="canvasLocation" x="128.98550724637681" y="-177.45535714285714"/>
         </view>
-        <tapGestureRecognizer id="1L4-Pr-sIj">
-            <connections>
-                <action selector="searchAction:" destination="iN0-l3-epB" id="crB-kh-lAE"/>
-            </connections>
-        </tapGestureRecognizer>
+        <tapGestureRecognizer id="1L4-Pr-sIj"/>
     </objects>
     <resources>
         <image name="home_icon" width="59" height="35"/>