Ver Fonte

准考证为空展示

Steven há 5 anos atrás
pai
commit
a85422ab47
32 ficheiros alterados com 583 adições e 253 exclusões
  1. 18 12
      MusicGradeExam/MusicGradeExam.xcodeproj/project.pbxproj
  2. 1 0
      MusicGradeExam/MusicGradeExam/AppDelegate.m
  3. 22 0
      MusicGradeExam/MusicGradeExam/Assets.xcassets/Home/empty_exam.imageset/Contents.json
  4. BIN
      MusicGradeExam/MusicGradeExam/Assets.xcassets/Home/empty_exam.imageset/empty_exam@2x.png
  5. BIN
      MusicGradeExam/MusicGradeExam/Assets.xcassets/Home/empty_exam.imageset/empty_exam@3x.png
  6. 22 0
      MusicGradeExam/MusicGradeExam/Assets.xcassets/launch_logo.imageset/Contents.json
  7. BIN
      MusicGradeExam/MusicGradeExam/Assets.xcassets/launch_logo.imageset/launch_logo@2x.png
  8. BIN
      MusicGradeExam/MusicGradeExam/Assets.xcassets/launch_logo.imageset/launch_logo@3x.png
  9. 27 7
      MusicGradeExam/MusicGradeExam/Base.lproj/LaunchScreen.storyboard
  10. 5 5
      MusicGradeExam/MusicGradeExam/Base/KSBaseWKWebViewController.m
  11. 9 9
      MusicGradeExam/MusicGradeExam/Define/PrefixHeader.pch
  12. 13 2
      MusicGradeExam/MusicGradeExam/Info.plist
  13. 7 3
      MusicGradeExam/MusicGradeExam/UI/Exam/Controller/ExamTicketViewController.m
  14. 11 6
      MusicGradeExam/MusicGradeExam/UI/Exam/Controller/WaitExamViewController.m
  15. 6 1
      MusicGradeExam/MusicGradeExam/UI/Exam/View/TicketBodyView.h
  16. 38 1
      MusicGradeExam/MusicGradeExam/UI/Exam/View/TicketBodyView.m
  17. 37 1
      MusicGradeExam/MusicGradeExam/UI/Exam/View/TicketBodyView.xib
  18. 2 0
      MusicGradeExam/MusicGradeExam/UI/Exam/View/WaitExamBodyView.h
  19. 1 4
      MusicGradeExam/MusicGradeExam/UI/Exam/View/WaitExamBodyView.m
  20. 24 2
      MusicGradeExam/MusicGradeExam/UI/Exam/View/WaitExamBodyView.xib
  21. 19 0
      MusicGradeExam/MusicGradeExam/UI/Home/Controller/ExamDisplayViewController.h
  22. 109 0
      MusicGradeExam/MusicGradeExam/UI/Home/Controller/ExamDisplayViewController.m
  23. 6 5
      MusicGradeExam/MusicGradeExam/UI/Home/Controller/HomeViewController.m
  24. 60 10
      MusicGradeExam/MusicGradeExam/UI/RecordExam/Controller/RecordExamViewController.m
  25. 3 5
      MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/RecordExamModel.h
  26. 10 39
      MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/RecordExamModel.m
  27. 0 130
      MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/SongJson.m
  28. 4 5
      MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/SongModel.h
  29. 123 0
      MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/SongModel.m
  30. 2 2
      MusicGradeExam/MusicGradeExam/UI/RecordExam/View/RecordListCell.h
  31. 1 1
      MusicGradeExam/MusicGradeExam/UI/RecordExam/View/RecordListCell.m
  32. 3 3
      MusicGradeExam/MusicGradeExam/UI/RecordExam/View/RecordListCell.xib

+ 18 - 12
MusicGradeExam/MusicGradeExam.xcodeproj/project.pbxproj

@@ -27,8 +27,6 @@
 		2729F7F924C8425E00E1F3C4 /* RecordTipsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2729F7F824C8425E00E1F3C4 /* RecordTipsView.m */; };
 		2729F7FB24C8427200E1F3C4 /* RecordTipsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2729F7FA24C8427100E1F3C4 /* RecordTipsView.xib */; };
 		2729F7FE24C851FA00E1F3C4 /* BaseExamModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2729F7FC24C851F900E1F3C4 /* BaseExamModel.m */; };
-		2729F80624C9771B00E1F3C4 /* RecordExamModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2729F80224C9771300E1F3C4 /* RecordExamModel.m */; };
-		2729F80724C9771B00E1F3C4 /* SongJson.m in Sources */ = {isa = PBXBuildFile; fileRef = 2729F80524C9771400E1F3C4 /* SongJson.m */; };
 		27476F4824BBFB5900181362 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27476F4724BBFB5900181362 /* AppDelegate.m */; };
 		27476F4E24BBFB5900181362 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27476F4D24BBFB5900181362 /* ViewController.m */; };
 		27476F5124BBFB5900181362 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27476F4F24BBFB5900181362 /* Main.storyboard */; };
@@ -297,6 +295,7 @@
 		2748F8F624C138A0003F8E11 /* ExamLibraryListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2748F8F424C1389F003F8E11 /* ExamLibraryListCell.xib */; };
 		27544CF824BC337D00EF58AF /* ExamTicketViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27544CF724BC337D00EF58AF /* ExamTicketViewController.m */; };
 		27544CFB24BC338900EF58AF /* UserCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27544CFA24BC338900EF58AF /* UserCenterViewController.m */; };
+		278D113424CA8E4D00599421 /* ExamDisplayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 278D113324CA8E4D00599421 /* ExamDisplayViewController.m */; };
 		2794D1B024BC604800BAF6F3 /* VefiBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2794D1AF24BC604800BAF6F3 /* VefiBodyView.m */; };
 		2794D1B224BC605600BAF6F3 /* VefiBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2794D1B124BC605600BAF6F3 /* VefiBodyView.xib */; };
 		2794D1B524BC662600BAF6F3 /* VeriCheckView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2794D1B424BC662600BAF6F3 /* VeriCheckView.m */; };
@@ -340,6 +339,8 @@
 		27A008F924BDB6310002452B /* UserBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 27A008F824BDB6310002452B /* UserBodyView.xib */; };
 		27A008FC24BECDC40002452B /* HomeBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27A008FB24BECDC40002452B /* HomeBodyView.m */; };
 		27A008FE24BECDFC0002452B /* HomeBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 27A008FD24BECDFC0002452B /* HomeBodyView.xib */; };
+		27D4149824CA741D000DBC0C /* RecordExamModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D4149724CA741D000DBC0C /* RecordExamModel.m */; };
+		27D4149B24CA757A000DBC0C /* SongModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D4149A24CA757A000DBC0C /* SongModel.m */; };
 		27EF3EEE24BEE35E002068A2 /* MessageListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EF3EED24BEE35E002068A2 /* MessageListModel.m */; };
 		27EF3EF224BEE885002068A2 /* NotifyMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EF3EF024BEE885002068A2 /* NotifyMessageCell.m */; };
 		27EF3EF324BEE885002068A2 /* NotifyMessageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 27EF3EF124BEE885002068A2 /* NotifyMessageCell.xib */; };
@@ -420,10 +421,6 @@
 		2729F7FA24C8427100E1F3C4 /* RecordTipsView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RecordTipsView.xib; sourceTree = "<group>"; };
 		2729F7FC24C851F900E1F3C4 /* BaseExamModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseExamModel.m; sourceTree = "<group>"; };
 		2729F7FD24C851FA00E1F3C4 /* BaseExamModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseExamModel.h; sourceTree = "<group>"; };
-		2729F80224C9771300E1F3C4 /* RecordExamModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecordExamModel.m; sourceTree = "<group>"; };
-		2729F80324C9771300E1F3C4 /* RecordExamModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordExamModel.h; sourceTree = "<group>"; };
-		2729F80424C9771400E1F3C4 /* SongJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SongJson.h; sourceTree = "<group>"; };
-		2729F80524C9771400E1F3C4 /* SongJson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SongJson.m; sourceTree = "<group>"; };
 		27476F4324BBFB5900181362 /* 酷乐秀.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "酷乐秀.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		27476F4624BBFB5900181362 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		27476F4724BBFB5900181362 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -932,6 +929,8 @@
 		27544CF724BC337D00EF58AF /* ExamTicketViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExamTicketViewController.m; sourceTree = "<group>"; };
 		27544CF924BC338900EF58AF /* UserCenterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserCenterViewController.h; sourceTree = "<group>"; };
 		27544CFA24BC338900EF58AF /* UserCenterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserCenterViewController.m; sourceTree = "<group>"; };
+		278D113224CA8E4D00599421 /* ExamDisplayViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExamDisplayViewController.h; sourceTree = "<group>"; };
+		278D113324CA8E4D00599421 /* ExamDisplayViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExamDisplayViewController.m; sourceTree = "<group>"; };
 		2794D1AE24BC604800BAF6F3 /* VefiBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VefiBodyView.h; sourceTree = "<group>"; };
 		2794D1AF24BC604800BAF6F3 /* VefiBodyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VefiBodyView.m; sourceTree = "<group>"; };
 		2794D1B124BC605600BAF6F3 /* VefiBodyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VefiBodyView.xib; sourceTree = "<group>"; };
@@ -1003,6 +1002,10 @@
 		27A008FA24BECDC40002452B /* HomeBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeBodyView.h; sourceTree = "<group>"; };
 		27A008FB24BECDC40002452B /* HomeBodyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeBodyView.m; sourceTree = "<group>"; };
 		27A008FD24BECDFC0002452B /* HomeBodyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeBodyView.xib; sourceTree = "<group>"; };
+		27D4149624CA741D000DBC0C /* RecordExamModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordExamModel.h; sourceTree = "<group>"; };
+		27D4149724CA741D000DBC0C /* RecordExamModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecordExamModel.m; sourceTree = "<group>"; };
+		27D4149924CA757A000DBC0C /* SongModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SongModel.h; sourceTree = "<group>"; };
+		27D4149A24CA757A000DBC0C /* SongModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SongModel.m; sourceTree = "<group>"; };
 		27EF3EEC24BEE35E002068A2 /* MessageListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageListModel.h; sourceTree = "<group>"; };
 		27EF3EED24BEE35E002068A2 /* MessageListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageListModel.m; sourceTree = "<group>"; };
 		27EF3EEF24BEE885002068A2 /* NotifyMessageCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotifyMessageCell.h; sourceTree = "<group>"; };
@@ -1130,10 +1133,10 @@
 		2729F7D624C81CA300E1F3C4 /* Model */ = {
 			isa = PBXGroup;
 			children = (
-				2729F80324C9771300E1F3C4 /* RecordExamModel.h */,
-				2729F80224C9771300E1F3C4 /* RecordExamModel.m */,
-				2729F80424C9771400E1F3C4 /* SongJson.h */,
-				2729F80524C9771400E1F3C4 /* SongJson.m */,
+				27D4149624CA741D000DBC0C /* RecordExamModel.h */,
+				27D4149724CA741D000DBC0C /* RecordExamModel.m */,
+				27D4149924CA757A000DBC0C /* SongModel.h */,
+				27D4149A24CA757A000DBC0C /* SongModel.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -1456,6 +1459,8 @@
 			children = (
 				2747700724BC0C0100181362 /* HomeViewController.h */,
 				2747700624BC0C0100181362 /* HomeViewController.m */,
+				278D113224CA8E4D00599421 /* ExamDisplayViewController.h */,
+				278D113324CA8E4D00599421 /* ExamDisplayViewController.m */,
 			);
 			path = Controller;
 			sourceTree = "<group>";
@@ -3028,7 +3033,6 @@
 				27A008EE24BDA7100002452B /* AboutBodyView.m in Sources */,
 				2729F7F424C8395300E1F3C4 /* RecordBottomView.m in Sources */,
 				27476F4E24BBFB5900181362 /* ViewController.m in Sources */,
-				2729F80724C9771B00E1F3C4 /* SongJson.m in Sources */,
 				274771DC24BC0C0500181362 /* TurnPageMessage.m in Sources */,
 				2747721124BC0C0500181362 /* NSArray+ks_SafeAccess.m in Sources */,
 				2747722924BC0C0500181362 /* KSChoosePicker.m in Sources */,
@@ -3051,7 +3055,7 @@
 				2729F7E724C8326900E1F3C4 /* RecordExamViewController.m in Sources */,
 				2747722024BC0C0500181362 /* UIImage+Property.m in Sources */,
 				274771C624BC0C0500181362 /* KSTabBarController.m in Sources */,
-				2729F80624C9771B00E1F3C4 /* RecordExamModel.m in Sources */,
+				27D4149824CA741D000DBC0C /* RecordExamModel.m in Sources */,
 				27EF3F2A24C02DE9002068A2 /* EmptyView.m in Sources */,
 				2747724524BC0C0500181362 /* JXCategoryTitleCellModel.m in Sources */,
 				2747720B24BC0C0500181362 /* UIView+Dealloc.m in Sources */,
@@ -3131,6 +3135,7 @@
 				274771DE24BC0C0500181362 /* Whiteboard.m in Sources */,
 				2747723B24BC0C0500181362 /* JXCategoryIndicatorBackgroundView.m in Sources */,
 				274771FB24BC0C0500181362 /* NSMutableArray+KSSafe.m in Sources */,
+				278D113424CA8E4D00599421 /* ExamDisplayViewController.m in Sources */,
 				274771D724BC0C0500181362 /* RoleChangedMessage.m in Sources */,
 				27A008F324BDB1E50002452B /* SysUser.m in Sources */,
 				27EF3EEE24BEE35E002068A2 /* MessageListModel.m in Sources */,
@@ -3187,6 +3192,7 @@
 				2747726324BC0C0500181362 /* LLFileManager.m in Sources */,
 				274771FE24BC0C0500181362 /* NSMutableString+KSSafe.m in Sources */,
 				2729F7CD24C6F3F300E1F3C4 /* SongListModel.m in Sources */,
+				27D4149B24CA757A000DBC0C /* SongModel.m in Sources */,
 				2747723D24BC0C0500181362 /* JXCategoryIndicatorCell.m in Sources */,
 				2747721A24BC0C0500181362 /* UIImage+Addtions.m in Sources */,
 				274771EC24BC0C0500181362 /* LoginBodyView.m in Sources */,

+ 1 - 0
MusicGradeExam/MusicGradeExam/AppDelegate.m

@@ -530,6 +530,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
         NSString *linkUrl = [[detailUrl componentsSeparatedByString:@"linkUrl="] lastObject];
         if (![NSString isEmptyString:linkUrl]) {
             linkUrl = [UrlDecode decodeStringWithString:linkUrl];
+            
             KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
             webCtrl.url = linkUrl;
             CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;

+ 22 - 0
MusicGradeExam/MusicGradeExam/Assets.xcassets/Home/empty_exam.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "empty_exam@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "empty_exam@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
MusicGradeExam/MusicGradeExam/Assets.xcassets/Home/empty_exam.imageset/empty_exam@2x.png


BIN
MusicGradeExam/MusicGradeExam/Assets.xcassets/Home/empty_exam.imageset/empty_exam@3x.png


+ 22 - 0
MusicGradeExam/MusicGradeExam/Assets.xcassets/launch_logo.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "launch_logo@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "launch_logo@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
MusicGradeExam/MusicGradeExam/Assets.xcassets/launch_logo.imageset/launch_logo@2x.png


BIN
MusicGradeExam/MusicGradeExam/Assets.xcassets/launch_logo.imageset/launch_logo@3x.png


+ 27 - 7
MusicGradeExam/MusicGradeExam/Base.lproj/LaunchScreen.storyboard

@@ -1,8 +1,9 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -10,11 +11,27 @@
         <scene sceneID="EHf-IW-A2E">
             <objects>
                 <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="q9K-dT-hDr"/>
+                        <viewControllerLayoutGuide type="bottom" id="BrU-Lb-68G"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
-                        <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
+                        <subviews>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_logo" translatesAutoresizingMaskIntoConstraints="NO" id="V2M-FN-uaF">
+                                <rect key="frame" x="172" y="264" width="70" height="104"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="70" id="OSL-BP-OTe"/>
+                                    <constraint firstAttribute="height" constant="104" id="bK9-Tk-1qf"/>
+                                </constraints>
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                        <constraints>
+                            <constraint firstItem="V2M-FN-uaF" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="4dV-oM-Cs6"/>
+                            <constraint firstItem="V2M-FN-uaF" firstAttribute="top" secondItem="q9K-dT-hDr" secondAttribute="bottom" constant="220" id="WCf-rN-WWb"/>
+                        </constraints>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -22,4 +39,7 @@
             <point key="canvasLocation" x="53" y="375"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="launch_logo" width="70" height="104"/>
+    </resources>
 </document>

+ 5 - 5
MusicGradeExam/MusicGradeExam/Base/KSBaseWKWebViewController.m

@@ -69,13 +69,13 @@
     CGFloat height = _hiddenNavBar ? STATUS_GAP : kNaviBarHeight;
     if (_hiddenNavBar) {
         UIView *topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, STATUS_GAP)];
-        topView.backgroundColor = THEMECOLOR;
+        topView.backgroundColor = [UIColor whiteColor];
         [self.view addSubview:topView];
     }
     if (_myWebView == nil) {
         _userContentController = [[WKUserContentController alloc]init];
         //注册方法
-        [_userContentController addScriptMessageHandler:self name:@"DAYA"];
+        [_userContentController addScriptMessageHandler:self name:@"EXAM"];
         
         WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
         config.selectionGranularity = WKSelectionGranularityDynamic;
@@ -114,7 +114,7 @@
 {
     [self.myWebView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id result, NSError *error) {
         NSString *oldUserAgent = result;
-        NSString *newUserAgent = [NSString stringWithFormat:@"%@ %@",oldUserAgent,@"DAYAAPPI"];
+        NSString *newUserAgent = [NSString stringWithFormat:@"%@ %@",oldUserAgent,@"EXAMAPPI"];
         self.myWebView.customUserAgent = newUserAgent;
         [self loadRequest];;
     }];
@@ -160,7 +160,7 @@
 #pragma mark - WKScriptMessageHandler
 - (void)userContentController:(WKUserContentController *)userContentController
       didReceiveScriptMessage:(WKScriptMessage *)message {
-    if ([message.name isEqualToString:@"DAYA"]) {
+    if ([message.name isEqualToString:@"EXAM"]) {
         NSDictionary *parm = [self convertJsonStringToNSDictionary:message.body];
         // 回到主线程
         dispatch_async(dispatch_get_main_queue(), ^{
@@ -341,7 +341,7 @@
     // Pass the selected object to the new view controller.
 }
 */
-- (void)paysWithMessage:(NSDictionary *)dic {
+- (void)payWithMessage:(NSDictionary *)dic {
     if (dic) {
         self.postJsDict = dic;
     }

+ 9 - 9
MusicGradeExam/MusicGradeExam/Define/PrefixHeader.pch

@@ -85,17 +85,17 @@
 
 //#ifdef DEBUG
 
-#define hostURL (@"http://kjtest.dayaedu.com")
-#define SEALCLASSHOST (@"http://kjtest.dayaedu.com/api-im")
-#define WEBHOST (@"http://mstudev.dayaedu.com")
-#define JSPUSH_ENVIRONMENT (NO)
-#define RCIM_KEY (@"8luwapkv84g3l")
-
-//#define hostURL (@"http://192.168.3.28:8000")
-//#define SEALCLASSHOST (@"http://192.168.3.28:8000/api-im")
-//#define WEBHOST (@"http://mstudev.dayaedu.com")
+//#define hostURL (@"http://kjtest.dayaedu.com")
+//#define SEALCLASSHOST (@"http://kjtest.dayaedu.com/api-im")
+//#define WEBHOST (@"http://mkjtest.dayaedu.com")
 //#define JSPUSH_ENVIRONMENT (NO)
 //#define RCIM_KEY (@"8luwapkv84g3l")
+
+#define hostURL (@"http://192.168.3.28:8000")
+#define SEALCLASSHOST (@"http://192.168.3.28:8000/api-im")
+#define WEBHOST (@"http://mkjtest.dayaedu.com")
+#define JSPUSH_ENVIRONMENT (NO)
+#define RCIM_KEY (@"8luwapkv84g3l")
 //#else    // 线上
 
 //#define hostURL (@"https://online.dayaedu.com")

+ 13 - 2
MusicGradeExam/MusicGradeExam/Info.plist

@@ -2,8 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>UIViewControllerBasedStatusBarAppearance</key>
-	<false/>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>$(DEVELOPMENT_LANGUAGE)</string>
 	<key>CFBundleExecutable</key>
@@ -18,6 +16,17 @@
 	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
 	<key>CFBundleShortVersionString</key>
 	<string>$(MARKETING_VERSION)</string>
+	<key>CFBundleURLTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>StudentsExam</string>
+			</array>
+		</dict>
+	</array>
 	<key>CFBundleVersion</key>
 	<string>$(CURRENT_PROJECT_VERSION)</string>
 	<key>LSRequiresIPhoneOS</key>
@@ -64,5 +73,7 @@
 	</array>
 	<key>UIUserInterfaceStyle</key>
 	<string>Light Content</string>
+	<key>UIViewControllerBasedStatusBarAppearance</key>
+	<false/>
 </dict>
 </plist>

+ 7 - 3
MusicGradeExam/MusicGradeExam/UI/Exam/Controller/ExamTicketViewController.m

@@ -59,9 +59,10 @@
 - (void)refreshUI {
     if (self.sourceModel) {
         [self.bodyView configMessage:self.sourceModel];
+        self.bodyView.isEmpty = NO;
     }
     else {
-        
+        self.bodyView.isEmpty = YES;
     }
 }
 
@@ -71,9 +72,12 @@
     viewHeight = viewHeight > kScreenHeight - kTabBarHeight ? viewHeight : kScreenHeight - kTabBarHeight;
     _bodyView.frame = CGRectMake(0, 0, kScreenWidth, viewHeight);
     MJWeakSelf;
-    [_bodyView joinRoomCallback:^(TicketListModel * _Nonnull source) {
-        [weakSelf joinRoomAction:[NSString stringWithFormat:@"%.0f",source.examRegistrationId]];
+    [_bodyView joinRoomCallback:^(TicketListModel * _Nonnull source, BOOL goBack) {
+        if (!goBack) {
+            [weakSelf joinRoomAction:[NSString stringWithFormat:@"%.0f",source.examRegistrationId]];
+        }
     }];
+
     [self.scrollView addSubview:_bodyView];
     [self.scrollView setContentSize:CGSizeMake(kScreenWidth, viewHeight)];
 }

+ 11 - 6
MusicGradeExam/MusicGradeExam/UI/Exam/Controller/WaitExamViewController.m

@@ -121,15 +121,15 @@
             break;
         case JOINROOMACTION_JOIN:  // 加入房间
         {
-//            if (self.sourceModel.recordFlag == 1) { // 去录播
+            if (self.sourceModel.recordFlag == 1) { // 去录播
                 RecordExamViewController *ctrl = [[RecordExamViewController alloc] init];
                 ctrl.examRegistrationId = self.examRegistrationId;
                 [self.navigationController pushViewController:ctrl animated:YES];
-//            }
-//            else {
-//                NSString *roomId = [NSString stringWithFormat:@"%.0f", source.examRegistrationId];
-//                [self joinRoomAction:roomId];
-//            }
+            }
+            else {
+                NSString *roomId = [NSString stringWithFormat:@"%.0f", source.examRegistrationId];
+                [self joinRoomAction:roomId];
+            }
         }
             break;
         default:
@@ -140,6 +140,11 @@
 
 #pragma mark ----- 签到
 - (void)signAction {
+    if (self.sourceModel.openFlag == 0) {
+        [self MBPShow:@"当前考场未开启,无法签到,请等待考场开启。"];
+        return;
+    }
+    
     [self showhud];
     [KSRequestManager signInRequest:KS_POST examRegistrationId:self.examRegistrationId success:^(NSDictionary * _Nonnull dic) {
         [self removehub];

+ 6 - 1
MusicGradeExam/MusicGradeExam/UI/Exam/View/TicketBodyView.h

@@ -8,18 +8,23 @@
 
 #import <UIKit/UIKit.h>
 #import "TicketListModel.h"
-typedef void(^JoinCallback)(TicketListModel * _Nonnull source);
+typedef void(^JoinCallback)(TicketListModel * _Nonnull source, BOOL goBack);
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface TicketBodyView : UIView
 
+@property (nonatomic, assign) BOOL isEmpty;
+
+@property (nonatomic, assign) BOOL showBackButton;
+
 + (instancetype)shareInstance;
 
 - (void)configMessage:(TicketListModel *)message;
 
 - (void)joinRoomCallback:(JoinCallback)callback;
 
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 38 - 1
MusicGradeExam/MusicGradeExam/UI/Exam/View/TicketBodyView.m

@@ -35,6 +35,11 @@
 
 @property (nonatomic, strong) TicketListModel *sourceModel;
 
+@property (weak, nonatomic) IBOutlet UIView *emptyView;
+
+@property (weak, nonatomic) IBOutlet UIImageView *backImage;
+@property (weak, nonatomic) IBOutlet UIButton *backButton;
+
 @end
 
 @implementation TicketBodyView
@@ -43,6 +48,9 @@
     [super awakeFromNib];
     [self.topView.layer addSublayer:self.gradientLayer];
     self.topView.layer.masksToBounds = YES;
+    self.backImage.hidden = YES;
+    self.backButton.hidden = YES;
+    self.emptyView.hidden = YES;
 }
 
 + (instancetype)shareInstance {
@@ -50,6 +58,28 @@
     return view;
 }
 
+- (void)setIsEmpty:(BOOL)isEmpty {
+    _isEmpty = isEmpty;
+    if (isEmpty) {
+        self.emptyView.hidden = NO;
+    }
+    else {
+        self.emptyView.hidden = YES;
+    }
+}
+
+- (void)setShowBackButton:(BOOL)showBackButton {
+    _showBackButton = showBackButton;
+    if (showBackButton) {
+        self.backImage.hidden = NO;
+        self.backButton.hidden = NO;
+    }
+    else {
+        self.backImage.hidden = YES;
+        self.backButton.hidden = YES;
+    }
+}
+
 - (void)layoutSubviews {
     [super layoutSubviews];
     //在这里获取frame
@@ -105,10 +135,17 @@
 
 - (IBAction)joinRoom:(id)sender {
     if (self.callback) {
-        self.callback(self.sourceModel);
+        self.callback(self.sourceModel,NO);
     }
 }
 
+- (IBAction)backAction:(id)sender {
+    if (self.callback) {
+        self.callback(self.sourceModel,YES);
+    }
+}
+
+
 - (CAGradientLayer *)gradientLayer {
     if (!_gradientLayer) {
         _gradientLayer = [CAGradientLayer layer];

+ 37 - 1
MusicGradeExam/MusicGradeExam/UI/Exam/View/TicketBodyView.xib

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
@@ -43,6 +43,9 @@
                         <constraint firstAttribute="height" constant="40" id="1hK-eK-a63"/>
                         <constraint firstAttribute="width" constant="40" id="o2n-Cn-mbm"/>
                     </constraints>
+                    <connections>
+                        <action selector="backAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="moK-MW-PAT"/>
+                    </connections>
                 </button>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yYc-dX-DlQ">
                     <rect key="frame" x="16" y="116" width="382" height="412"/>
@@ -192,6 +195,31 @@
                         <action selector="joinRoom:" destination="iN0-l3-epB" eventType="touchUpInside" id="RDY-fN-nBu"/>
                     </connections>
                 </button>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SEt-dI-9WR">
+                    <rect key="frame" x="16" y="116" width="382" height="480"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="empty_exam" translatesAutoresizingMaskIntoConstraints="NO" id="0LK-Md-vv1">
+                            <rect key="frame" x="101.5" y="146" width="179" height="188"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="179" id="GMD-bV-phV"/>
+                                <constraint firstAttribute="height" constant="188" id="ODc-fx-kwp"/>
+                            </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="MSJ-t7-aJF">
+                            <rect key="frame" x="135.5" y="374" width="111" height="22"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                    <constraints>
+                        <constraint firstItem="MSJ-t7-aJF" firstAttribute="top" secondItem="0LK-Md-vv1" secondAttribute="bottom" constant="40" id="9Ce-XM-kRv"/>
+                        <constraint firstItem="0LK-Md-vv1" firstAttribute="centerX" secondItem="SEt-dI-9WR" secondAttribute="centerX" id="QNQ-RX-4pD"/>
+                        <constraint firstItem="0LK-Md-vv1" firstAttribute="centerY" secondItem="SEt-dI-9WR" secondAttribute="centerY" id="Zca-fa-dTY"/>
+                        <constraint firstItem="MSJ-t7-aJF" firstAttribute="centerX" secondItem="SEt-dI-9WR" secondAttribute="centerX" id="vaX-87-BUV"/>
+                    </constraints>
+                </view>
             </subviews>
             <color key="backgroundColor" red="0.95294117647058818" green="0.95686274509803915" blue="0.97254901960784312" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
@@ -202,20 +230,27 @@
                 <constraint firstItem="Zcb-sN-Ifk" firstAttribute="top" secondItem="yYc-dX-DlQ" secondAttribute="bottom" constant="18" id="Ss8-OU-Dkn"/>
                 <constraint firstItem="Sfp-A6-TYV" firstAttribute="centerY" secondItem="MQl-y7-vxz" secondAttribute="centerY" id="bHk-yh-6ho"/>
                 <constraint firstItem="yYc-dX-DlQ" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="16" id="bJs-Ea-J83"/>
+                <constraint firstItem="SEt-dI-9WR" firstAttribute="trailing" secondItem="yYc-dX-DlQ" secondAttribute="trailing" id="cZP-cx-nnT"/>
                 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="Zcb-sN-Ifk" secondAttribute="trailing" constant="17" id="ca6-sH-DLl"/>
                 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="yUJ-P8-V4z" secondAttribute="trailing" id="d2b-h3-nIu"/>
+                <constraint firstItem="SEt-dI-9WR" firstAttribute="leading" secondItem="yYc-dX-DlQ" secondAttribute="leading" id="d8c-S5-C7H"/>
+                <constraint firstItem="Zcb-sN-Ifk" firstAttribute="bottom" secondItem="SEt-dI-9WR" secondAttribute="bottom" id="fK7-Gq-x6B"/>
                 <constraint firstItem="yUJ-P8-V4z" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="k06-0l-UVr"/>
                 <constraint firstItem="Sfp-A6-TYV" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="lDa-t9-YtU"/>
                 <constraint firstItem="Vgy-lZ-7Kl" firstAttribute="centerY" secondItem="MQl-y7-vxz" secondAttribute="centerY" id="lU4-lI-JNL"/>
                 <constraint firstItem="yYc-dX-DlQ" firstAttribute="top" secondItem="Vgy-lZ-7Kl" secondAttribute="bottom" constant="22" id="sof-XS-6Eo"/>
                 <constraint firstItem="Zcb-sN-Ifk" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="17" id="usd-nl-uzu"/>
                 <constraint firstItem="Vgy-lZ-7Kl" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="xKa-qP-nBj"/>
+                <constraint firstItem="SEt-dI-9WR" firstAttribute="top" secondItem="yYc-dX-DlQ" secondAttribute="top" id="xY1-zg-qnz"/>
             </constraints>
             <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
             <connections>
+                <outlet property="backButton" destination="Vgy-lZ-7Kl" id="9V8-DC-S8r"/>
+                <outlet property="backImage" destination="MQl-y7-vxz" id="mAq-am-Zqz"/>
                 <outlet property="cardNo" destination="KFg-DG-VJj" id="RaK-7n-Wbj"/>
                 <outlet property="certificateImage" destination="A1y-sO-QGA" id="1hP-L1-7bc"/>
                 <outlet property="classLocation" destination="sl8-xL-Pp2" id="lJl-Bf-X7B"/>
+                <outlet property="emptyView" destination="SEt-dI-9WR" id="36y-OS-5PH"/>
                 <outlet property="examLevel" destination="baH-bx-beF" id="9MK-50-ube"/>
                 <outlet property="examTime" destination="pgz-3o-9OJ" id="S2z-he-SzZ"/>
                 <outlet property="subjectLabel" destination="Yik-4s-H4Q" id="FGR-yT-aw3"/>
@@ -227,6 +262,7 @@
         </view>
     </objects>
     <resources>
+        <image name="empty_exam" width="179" height="188"/>
         <image name="login_back" width="12" height="21"/>
     </resources>
 </document>

+ 2 - 0
MusicGradeExam/MusicGradeExam/UI/Exam/View/WaitExamBodyView.h

@@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface WaitExamBodyView : UIView
 
+@property (weak, nonatomic) IBOutlet UIButton *signButton;
+
 @property (nonatomic, assign) BOOL isSign;
 
 @property (nonatomic, assign) BOOL canJoinRoom;

+ 1 - 4
MusicGradeExam/MusicGradeExam/UI/Exam/View/WaitExamBodyView.m

@@ -10,8 +10,6 @@
 
 @interface WaitExamBodyView ()
 
-@property (weak, nonatomic) IBOutlet UIButton *signButton;
-
 @property (weak, nonatomic) IBOutlet UILabel *signDescLabel;
 
 @property (weak, nonatomic) IBOutlet UILabel *classDate;
@@ -69,8 +67,7 @@
         [self.joinButton setTitle:@"进入教室" forState:UIControlStateNormal];
     }
     
-//    self.canJoinRoom = self.sourceModel.classroomSwitch;
-    self.canJoinRoom = YES;
+    self.canJoinRoom = self.sourceModel.classroomSwitch;
     
     self.classDate.text = [[self.sourceModel.examStartTime componentsSeparatedByString:@" "] firstObject];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:self.sourceModel.baseExamName];

+ 24 - 2
MusicGradeExam/MusicGradeExam/UI/Exam/View/WaitExamBodyView.xib

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
@@ -173,11 +173,33 @@
                         <constraint firstItem="tW6-ZA-2q9" firstAttribute="leading" secondItem="qtd-ei-Gfc" secondAttribute="leading" id="sWl-LO-y1T"/>
                         <constraint firstAttribute="height" constant="200" id="w0j-Ad-QsE"/>
                     </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
                 </view>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rEr-rK-lTU">
                     <rect key="frame" x="0.0" y="425" width="414" height="204"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="考试注意事项" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Eny-Xj-7OZ">
+                            <rect key="frame" x="15" y="15" width="92" height="18"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LPU-2y-DR5">
+                            <rect key="frame" x="23" y="54" width="374" height="21"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                            <nil key="textColor"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
                     <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
                     <constraints>
+                        <constraint firstItem="Eny-Xj-7OZ" firstAttribute="top" secondItem="rEr-rK-lTU" secondAttribute="top" constant="15" id="LwX-4u-dub"/>
+                        <constraint firstItem="Eny-Xj-7OZ" firstAttribute="leading" secondItem="rEr-rK-lTU" secondAttribute="leading" constant="15" id="Tgp-9q-heg"/>
                         <constraint firstAttribute="height" constant="204" id="wUu-d4-Eaa"/>
                     </constraints>
                     <userDefinedRuntimeAttributes>
@@ -254,7 +276,7 @@
                 <outlet property="subjectLabel" destination="cOI-UA-7JY" id="95e-BG-AVB"/>
                 <outlet property="waitLabel" destination="KQk-Oi-2gF" id="m6Y-Ea-Z5h"/>
             </connections>
-            <point key="canvasLocation" x="132" y="102"/>
+            <point key="canvasLocation" x="131.8840579710145" y="101.78571428571428"/>
         </view>
     </objects>
 </document>

+ 19 - 0
MusicGradeExam/MusicGradeExam/UI/Home/Controller/ExamDisplayViewController.h

@@ -0,0 +1,19 @@
+//
+//  ExamDisplayViewController.h
+//  MusicGradeExam
+//
+//  Created by Kyle on 2020/7/24.
+//  Copyright © 2020 DayaMusic. All rights reserved.
+//
+
+#import "KSBaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ExamDisplayViewController : KSBaseViewController
+
+@property (nonatomic, strong) NSString *examRegistrationId;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 109 - 0
MusicGradeExam/MusicGradeExam/UI/Home/Controller/ExamDisplayViewController.m

@@ -0,0 +1,109 @@
+//
+//  ExamDisplayViewController.m
+//  MusicGradeExam
+//
+//  Created by Kyle on 2020/7/24.
+//  Copyright © 2020 DayaMusic. All rights reserved.
+//
+
+#import "ExamDisplayViewController.h"
+#import "TicketBodyView.h"
+#import "WaitExamViewController.h"
+#import "TicketListModel.h"
+
+@interface ExamDisplayViewController ()
+
+@property (nonatomic, strong) TicketBodyView *bodyView;
+
+@property (nonatomic, strong) TicketListModel *sourceModel;
+
+@end
+
+@implementation ExamDisplayViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    self.ks_prefersNavigationBarHidden = YES;
+    self.view.backgroundColor = HexRGB(0xf3f4f8);
+    [self configUI];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
+    [self requestData];
+}
+
+- (void)requestData {
+    [KSRequestManager queryCertificationPageRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            NSArray *source = [dic arrayValueForKey:@"data"];
+            if (source.count) {
+                for (NSDictionary *parm in source) {
+                    TicketListModel *model = [[TicketListModel alloc] initWithDictionary:parm];
+                    if ([self.examRegistrationId isEqualToString:[NSString stringWithFormat:@"%.0f",model.examRegistrationId]]) {
+                        self.sourceModel = model;
+                        break;
+                    }
+                }
+            }
+            else {
+                self.sourceModel = nil;
+            }
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+        [self refreshUI];
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+
+- (void)refreshUI {
+    if (self.sourceModel) {
+        [self.bodyView configMessage:self.sourceModel];
+        self.bodyView.isEmpty = NO;
+    }
+    else {
+        self.bodyView.isEmpty = YES;
+    }
+}
+
+- (void)configUI {
+    _bodyView = [TicketBodyView shareInstance];
+    CGFloat viewHeight = 412 + 22 + 25 + 30 + iPhoneXSafeTopMargin + 18 + 50 + 20;
+    viewHeight = viewHeight > kScreenHeight - iPhoneXSafeBottomMargin ? viewHeight : kScreenHeight - iPhoneXSafeBottomMargin;
+    _bodyView.frame = CGRectMake(0, 0, kScreenWidth, viewHeight);
+    MJWeakSelf;
+    [_bodyView joinRoomCallback:^(TicketListModel * _Nonnull source, BOOL goBack) {
+        if (goBack) {
+            [weakSelf.navigationController popViewControllerAnimated:YES];
+        }
+        else {
+            [weakSelf joinRoomAction:[NSString stringWithFormat:@"%.0f",source.examRegistrationId]];
+        }
+    }];
+    [self.scrollView addSubview:_bodyView];
+    [self.scrollView setContentSize:CGSizeMake(kScreenWidth, viewHeight)];
+    self.bodyView.showBackButton = YES;
+}
+
+- (void)joinRoomAction:(NSString *)examRegistrationId {
+    WaitExamViewController *waitCtrl = [[WaitExamViewController alloc] init];
+    waitCtrl.examRegistrationId = examRegistrationId;
+    [self.navigationController pushViewController:waitCtrl animated:YES];
+}
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 6 - 5
MusicGradeExam/MusicGradeExam/UI/Home/Controller/HomeViewController.m

@@ -16,6 +16,7 @@
 #import "HomeExamTicketCell.h"
 #import "WaitExamViewController.h"
 #import "ExamViewController.h"
+#import "ExamDisplayViewController.h"
 
 @interface HomeViewController ()<TYCyclePagerViewDataSource,TYCyclePagerViewDelegate>
 
@@ -151,7 +152,7 @@
         case HOMETYPE_BOOKRECORD: // 报考记录
         {
             KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-            ctrl.url = @"https://www.baidu.com";
+            ctrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/appRecord"];
             ctrl.hiddenNavBar = NO;
             ctrl.headTitle = @"报考记录";
             [self.navigationController pushViewController:ctrl animated:YES];
@@ -161,7 +162,7 @@
         case HOMETYPE_EXAMRECORD: //考试记录
         {
             KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-            ctrl.url = @"http://www.baidu.com";
+            ctrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/examRecord"];
             ctrl.hiddenNavBar = NO;
             ctrl.headTitle = @"考试记录";
             [self.navigationController pushViewController:ctrl animated:YES];
@@ -204,9 +205,9 @@
 
 - (void)pagerView:(TYCyclePagerView *)pageView didSelectedItemCell:(__kindof UICollectionViewCell *)cell atIndex:(NSInteger)index {
     TicketListModel *model = self.dataArray[index];
-    WaitExamViewController *waitCtrl = [[WaitExamViewController alloc] init];
-    waitCtrl.examRegistrationId = [NSString stringWithFormat:@"%.0f",model.examRegistrationId];
-    [self.navigationController pushViewController:waitCtrl animated:YES];
+    ExamDisplayViewController *displayCtrl = [[ExamDisplayViewController alloc] init];
+    displayCtrl.examRegistrationId = [NSString stringWithFormat:@"%.0f",model.examRegistrationId];
+    [self.navigationController pushViewController:displayCtrl animated:YES];
 }
 
 #pragma mark ---- lazying

+ 60 - 10
MusicGradeExam/MusicGradeExam/UI/RecordExam/Controller/RecordExamViewController.m

@@ -14,6 +14,7 @@
 #import "RecordExamModel.h"
 #import "KSMediaManager.h"
 #import "WMPlayer.h"
+#import "SongModel.h"
 
 @interface RecordExamViewController ()<UITableViewDelegate, UITableViewDataSource,WMPlayerDelegate>
 {
@@ -85,8 +86,26 @@
 
 - (void)evaluateSource {
     [self.topView configTime:[NSString stringWithFormat:@"%.0f", self.sourceModel.subTime]];
-    [self.tipsView configWithEndTime:self.sourceModel.actualExamEndTime];
-    self.songArray = [NSMutableArray arrayWithArray:self.sourceModel.songJson];
+    [self.tipsView configWithEndTime:self.sourceModel.examEndTime];
+    NSData *songDate = [self.sourceModel.songJson dataUsingEncoding:NSUTF8StringEncoding];
+    NSArray *listArray = [NSJSONSerialization JSONObjectWithData:songDate options:NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves error:nil];
+    NSMutableArray *songList = [NSMutableArray array];
+    for (NSDictionary *parm in listArray) {
+        SongModel *model = [[SongModel alloc] initWithDictionary:parm];
+        [songList addObject:model];
+    }
+    self.songArray = [NSMutableArray arrayWithArray:songList];
+    
+    for (NSInteger i = 0; i < self.songArray.count; i++) {
+        SongModel *model = self.songArray[i];
+        NSString *fileKey = [NSString stringWithFormat:@"%@%@", self.examRegistrationId, model.songName];
+        NSDictionary *fileMessage = UserDefault(fileKey);
+        if (fileMessage) {
+            NSString *remoteUrl = [fileMessage stringValueForKey:@"remoteUrl"];
+            [self.fileUrlArray addObject:remoteUrl];
+        }
+    }
+    
     [self.tableView reloadData];
 }
 
@@ -115,12 +134,11 @@
 
 #pragma mark ----- table data source
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-//    return self.songArray.count;
-    return 3;
+    return self.songArray.count;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    SongJson *model = self.songArray[indexPath.row];
+    SongModel *model = self.songArray[indexPath.row];
     RecordListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RecordListCell"];
     MJWeakSelf;
     [cell configCellWithSource:model examRegistrationId:self.examRegistrationId operationCallback:^(RECORDTYPE type, NSString *fileKey) {
@@ -154,6 +172,8 @@
     NSString *localUrl = [parm stringValueForKey:@"localFileUrl"];
     [self removeVideoWithPath:localUrl];
     UserDefaultRemoveObjectForKey(fileKey);
+    NSString *remoteUrl = [parm stringValueForKey:@"remoteUrl"];
+    [self.fileUrlArray removeObject:remoteUrl];
     [self.tableView reloadData];
 }
 
@@ -238,14 +258,42 @@
 
 - (void)submitAction {
     // 提交 完成考试
-    NSString *videoUrl = @"";
+    
+    if (self.fileUrlArray.count == 0) {
+        [self MBPShow:@"请提交录播视频"];
+        return;
+    }
+    [self showhud];
+    NSString *videoUrl = [self.fileUrlArray componentsJoinedByString:@","];
     [KSRequestManager stuEndRecordFinishRequest:KS_POST examRegistrationId:self.examRegistrationId videoUrl:videoUrl success:^(NSDictionary * _Nonnull dic) {
-        
+        [self removehub];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            MJWeakSelf;
+            [self removeAllFile];
+            [self KSShowMsg:@"提交成功" promptCompletion:^{
+                [weakSelf.navigationController popViewControllerAnimated:YES];
+            }];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
     } faliure:^(NSError * _Nonnull error) {
-        
+        [self removehub];
     }];
 }
 
+- (void)removeAllFile {
+    for (NSInteger i = 0; i < self.songArray.count; i++) {
+        SongModel *model = self.songArray[i];
+        NSString *fileKey = [NSString stringWithFormat:@"%@%@", self.examRegistrationId, model.songName];
+        NSDictionary *fileMessage = UserDefault(fileKey);
+        if (fileMessage) {
+            NSString *localUrl = [fileMessage stringValueForKey:@"localFileUrl"];
+            [self removeVideoWithPath:localUrl];
+        }
+    }
+}
+
 #pragma mark ------ 上传视频文件
 
 - (void)uploadVideoWithUrl:(NSString *)videoUrl fileKey:(NSString *)fileKey {
@@ -263,9 +311,11 @@
         [self hudTipWillShow:NO];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSString *fileUrl = [[dic dictionaryValueForKey:@"data"] stringValueForKey:@"url"];
-
+            NSString *fileName = [[fileUrl componentsSeparatedByString:@"/"] lastObject];
             // 保存文件路径
-            NSDictionary *parm = @{@"localFileUrl":videoUrl,@"remoteUrl":fileUrl};
+            NSDictionary *parm = @{@"localFileUrl":videoUrl,
+                                   @"remoteUrl":fileUrl,
+                                   @"fileName": fileName};
             UserDefaultSet(parm, fileKey);
             [self.tableView reloadData];
             

+ 3 - 5
MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/RecordExamModel.h

@@ -1,22 +1,20 @@
 //
 //  RecordExamModel.h
 //
-//  Created by   on 2020/7/23
+//  Created by   on 2020/7/24
 //  Copyright (c) 2020 __MyCompanyName__. All rights reserved.
 //
 
 #import <Foundation/Foundation.h>
-#import "SongJson.h"
 
 
 
 @interface RecordExamModel : NSObject <NSCoding, NSCopying>
 
 @property (nonatomic, assign) double singleSongRecordMinutes;
-@property (nonatomic, strong) NSString *actualExamEndTime;
-@property (nonatomic, assign) double examRegistrationId;
 @property (nonatomic, strong) NSString *recordStartTime;
-@property (nonatomic, strong) NSArray *songJson;
+@property (nonatomic, assign) double examRegistrationId;
+@property (nonatomic, strong) NSString *songJson;
 @property (nonatomic, assign) double recordTime;
 @property (nonatomic, assign) double subTime;
 @property (nonatomic, strong) NSString *examEndTime;

+ 10 - 39
MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/RecordExamModel.m

@@ -1,7 +1,7 @@
 //
 //  RecordExamModel.m
 //
-//  Created by   on 2020/7/23
+//  Created by   on 2020/7/24
 //  Copyright (c) 2020 __MyCompanyName__. All rights reserved.
 //
 
@@ -9,9 +9,8 @@
 
 
 NSString *const kRecordExamModelSingleSongRecordMinutes = @"singleSongRecordMinutes";
-NSString *const kRecordExamModelActualExamEndTime = @"actualExamEndTime";
-NSString *const kRecordExamModelExamRegistrationId = @"examRegistrationId";
 NSString *const kRecordExamModelRecordStartTime = @"recordStartTime";
+NSString *const kRecordExamModelExamRegistrationId = @"examRegistrationId";
 NSString *const kRecordExamModelSongJson = @"songJson";
 NSString *const kRecordExamModelRecordTime = @"recordTime";
 NSString *const kRecordExamModelSubTime = @"subTime";
@@ -27,9 +26,8 @@ NSString *const kRecordExamModelExamEndTime = @"examEndTime";
 @implementation RecordExamModel
 
 @synthesize singleSongRecordMinutes = _singleSongRecordMinutes;
-@synthesize actualExamEndTime = _actualExamEndTime;
-@synthesize examRegistrationId = _examRegistrationId;
 @synthesize recordStartTime = _recordStartTime;
+@synthesize examRegistrationId = _examRegistrationId;
 @synthesize songJson = _songJson;
 @synthesize recordTime = _recordTime;
 @synthesize subTime = _subTime;
@@ -49,22 +47,9 @@ NSString *const kRecordExamModelExamEndTime = @"examEndTime";
     // passed into the model class doesn't break the parsing.
     if(self && [dict isKindOfClass:[NSDictionary class]]) {
             self.singleSongRecordMinutes = [[self objectOrNilForKey:kRecordExamModelSingleSongRecordMinutes fromDictionary:dict] doubleValue];
-            self.actualExamEndTime = [self objectOrNilForKey:kRecordExamModelActualExamEndTime fromDictionary:dict];
-            self.examRegistrationId = [[self objectOrNilForKey:kRecordExamModelExamRegistrationId fromDictionary:dict] doubleValue];
             self.recordStartTime = [self objectOrNilForKey:kRecordExamModelRecordStartTime fromDictionary:dict];
-    NSObject *receivedSongJson = [dict objectForKey:kRecordExamModelSongJson];
-    NSMutableArray *parsedSongJson = [NSMutableArray array];
-    if ([receivedSongJson isKindOfClass:[NSArray class]]) {
-        for (NSDictionary *item in (NSArray *)receivedSongJson) {
-            if ([item isKindOfClass:[NSDictionary class]]) {
-                [parsedSongJson addObject:[SongJson modelObjectWithDictionary:item]];
-            }
-       }
-    } else if ([receivedSongJson isKindOfClass:[NSDictionary class]]) {
-       [parsedSongJson addObject:[SongJson modelObjectWithDictionary:(NSDictionary *)receivedSongJson]];
-    }
-
-    self.songJson = [NSArray arrayWithArray:parsedSongJson];
+            self.examRegistrationId = [[self objectOrNilForKey:kRecordExamModelExamRegistrationId fromDictionary:dict] doubleValue];
+            self.songJson = [self objectOrNilForKey:kRecordExamModelSongJson fromDictionary:dict];
             self.recordTime = [[self objectOrNilForKey:kRecordExamModelRecordTime fromDictionary:dict] doubleValue];
             self.subTime = [[self objectOrNilForKey:kRecordExamModelSubTime fromDictionary:dict] doubleValue];
             self.examEndTime = [self objectOrNilForKey:kRecordExamModelExamEndTime fromDictionary:dict];
@@ -79,20 +64,9 @@ NSString *const kRecordExamModelExamEndTime = @"examEndTime";
 {
     NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
     [mutableDict setValue:[NSNumber numberWithDouble:self.singleSongRecordMinutes] forKey:kRecordExamModelSingleSongRecordMinutes];
-    [mutableDict setValue:self.actualExamEndTime forKey:kRecordExamModelActualExamEndTime];
-    [mutableDict setValue:[NSNumber numberWithDouble:self.examRegistrationId] forKey:kRecordExamModelExamRegistrationId];
     [mutableDict setValue:self.recordStartTime forKey:kRecordExamModelRecordStartTime];
-    NSMutableArray *tempArrayForSongJson = [NSMutableArray array];
-    for (NSObject *subArrayObject in self.songJson) {
-        if([subArrayObject respondsToSelector:@selector(dictionaryRepresentation)]) {
-            // This class is a model object
-            [tempArrayForSongJson addObject:[subArrayObject performSelector:@selector(dictionaryRepresentation)]];
-        } else {
-            // Generic object
-            [tempArrayForSongJson addObject:subArrayObject];
-        }
-    }
-    [mutableDict setValue:[NSArray arrayWithArray:tempArrayForSongJson] forKey:kRecordExamModelSongJson];
+    [mutableDict setValue:[NSNumber numberWithDouble:self.examRegistrationId] forKey:kRecordExamModelExamRegistrationId];
+    [mutableDict setValue:self.songJson forKey:kRecordExamModelSongJson];
     [mutableDict setValue:[NSNumber numberWithDouble:self.recordTime] forKey:kRecordExamModelRecordTime];
     [mutableDict setValue:[NSNumber numberWithDouble:self.subTime] forKey:kRecordExamModelSubTime];
     [mutableDict setValue:self.examEndTime forKey:kRecordExamModelExamEndTime];
@@ -120,9 +94,8 @@ NSString *const kRecordExamModelExamEndTime = @"examEndTime";
     self = [super init];
 
     self.singleSongRecordMinutes = [aDecoder decodeDoubleForKey:kRecordExamModelSingleSongRecordMinutes];
-    self.actualExamEndTime = [aDecoder decodeObjectForKey:kRecordExamModelActualExamEndTime];
-    self.examRegistrationId = [aDecoder decodeDoubleForKey:kRecordExamModelExamRegistrationId];
     self.recordStartTime = [aDecoder decodeObjectForKey:kRecordExamModelRecordStartTime];
+    self.examRegistrationId = [aDecoder decodeDoubleForKey:kRecordExamModelExamRegistrationId];
     self.songJson = [aDecoder decodeObjectForKey:kRecordExamModelSongJson];
     self.recordTime = [aDecoder decodeDoubleForKey:kRecordExamModelRecordTime];
     self.subTime = [aDecoder decodeDoubleForKey:kRecordExamModelSubTime];
@@ -134,9 +107,8 @@ NSString *const kRecordExamModelExamEndTime = @"examEndTime";
 {
 
     [aCoder encodeDouble:_singleSongRecordMinutes forKey:kRecordExamModelSingleSongRecordMinutes];
-    [aCoder encodeObject:_actualExamEndTime forKey:kRecordExamModelActualExamEndTime];
-    [aCoder encodeDouble:_examRegistrationId forKey:kRecordExamModelExamRegistrationId];
     [aCoder encodeObject:_recordStartTime forKey:kRecordExamModelRecordStartTime];
+    [aCoder encodeDouble:_examRegistrationId forKey:kRecordExamModelExamRegistrationId];
     [aCoder encodeObject:_songJson forKey:kRecordExamModelSongJson];
     [aCoder encodeDouble:_recordTime forKey:kRecordExamModelRecordTime];
     [aCoder encodeDouble:_subTime forKey:kRecordExamModelSubTime];
@@ -150,9 +122,8 @@ NSString *const kRecordExamModelExamEndTime = @"examEndTime";
     if (copy) {
 
         copy.singleSongRecordMinutes = self.singleSongRecordMinutes;
-        copy.actualExamEndTime = [self.actualExamEndTime copyWithZone:zone];
-        copy.examRegistrationId = self.examRegistrationId;
         copy.recordStartTime = [self.recordStartTime copyWithZone:zone];
+        copy.examRegistrationId = self.examRegistrationId;
         copy.songJson = [self.songJson copyWithZone:zone];
         copy.recordTime = self.recordTime;
         copy.subTime = self.subTime;

+ 0 - 130
MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/SongJson.m

@@ -1,130 +0,0 @@
-//
-//  SongJson.m
-//
-//  Created by   on 2020/7/23
-//  Copyright (c) 2020 __MyCompanyName__. All rights reserved.
-//
-
-#import "SongJson.h"
-
-
-NSString *const kSongJsonId = @"id";
-NSString *const kSongJsonUploadUrl = @"uploadUrl";
-NSString *const kSongJsonSongName = @"songName";
-NSString *const kSongJsonType = @"type";
-NSString *const kSongJsonSongAuthor = @"songAuthor";
-NSString *const kSongJsonIndex = @"index";
-
-
-@interface SongJson ()
-
-- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
-
-@end
-
-@implementation SongJson
-
-@synthesize songJsonIdentifier = _songJsonIdentifier;
-@synthesize uploadUrl = _uploadUrl;
-@synthesize songName = _songName;
-@synthesize type = _type;
-@synthesize songAuthor = _songAuthor;
-@synthesize index = _index;
-
-
-+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
-{
-    return [[self alloc] initWithDictionary:dict];
-}
-
-- (instancetype)initWithDictionary:(NSDictionary *)dict
-{
-    self = [super init];
-    
-    // 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.songJsonIdentifier = [[self objectOrNilForKey:kSongJsonId fromDictionary:dict] doubleValue];
-            self.uploadUrl = [self objectOrNilForKey:kSongJsonUploadUrl fromDictionary:dict];
-            self.songName = [self objectOrNilForKey:kSongJsonSongName fromDictionary:dict];
-            self.type = [self objectOrNilForKey:kSongJsonType fromDictionary:dict];
-            self.songAuthor = [self objectOrNilForKey:kSongJsonSongAuthor fromDictionary:dict];
-            self.index = [[self objectOrNilForKey:kSongJsonIndex fromDictionary:dict] doubleValue];
-
-    }
-    
-    return self;
-    
-}
-
-- (NSDictionary *)dictionaryRepresentation
-{
-    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
-    [mutableDict setValue:[NSNumber numberWithDouble:self.songJsonIdentifier] forKey:kSongJsonId];
-    [mutableDict setValue:self.uploadUrl forKey:kSongJsonUploadUrl];
-    [mutableDict setValue:self.songName forKey:kSongJsonSongName];
-    [mutableDict setValue:self.type forKey:kSongJsonType];
-    [mutableDict setValue:self.songAuthor forKey:kSongJsonSongAuthor];
-    [mutableDict setValue:[NSNumber numberWithDouble:self.index] forKey:kSongJsonIndex];
-
-    return [NSDictionary dictionaryWithDictionary:mutableDict];
-}
-
-- (NSString *)description 
-{
-    return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
-}
-
-#pragma mark - Helper Method
-- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
-{
-    id object = [dict objectForKey:aKey];
-    return [object isEqual:[NSNull null]] ? nil : object;
-}
-
-
-#pragma mark - NSCoding Methods
-
-- (id)initWithCoder:(NSCoder *)aDecoder
-{
-    self = [super init];
-
-    self.songJsonIdentifier = [aDecoder decodeDoubleForKey:kSongJsonId];
-    self.uploadUrl = [aDecoder decodeObjectForKey:kSongJsonUploadUrl];
-    self.songName = [aDecoder decodeObjectForKey:kSongJsonSongName];
-    self.type = [aDecoder decodeObjectForKey:kSongJsonType];
-    self.songAuthor = [aDecoder decodeObjectForKey:kSongJsonSongAuthor];
-    self.index = [aDecoder decodeDoubleForKey:kSongJsonIndex];
-    return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)aCoder
-{
-
-    [aCoder encodeDouble:_songJsonIdentifier forKey:kSongJsonId];
-    [aCoder encodeObject:_uploadUrl forKey:kSongJsonUploadUrl];
-    [aCoder encodeObject:_songName forKey:kSongJsonSongName];
-    [aCoder encodeObject:_type forKey:kSongJsonType];
-    [aCoder encodeObject:_songAuthor forKey:kSongJsonSongAuthor];
-    [aCoder encodeDouble:_index forKey:kSongJsonIndex];
-}
-
-- (id)copyWithZone:(NSZone *)zone
-{
-    SongJson *copy = [[SongJson alloc] init];
-    
-    if (copy) {
-
-        copy.songJsonIdentifier = self.songJsonIdentifier;
-        copy.uploadUrl = [self.uploadUrl copyWithZone:zone];
-        copy.songName = [self.songName copyWithZone:zone];
-        copy.type = [self.type copyWithZone:zone];
-        copy.songAuthor = [self.songAuthor copyWithZone:zone];
-        copy.index = self.index;
-    }
-    
-    return copy;
-}
-
-
-@end

+ 4 - 5
MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/SongJson.h → MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/SongModel.h

@@ -1,7 +1,7 @@
 //
-//  SongJson.h
+//  SongModel.h
 //
-//  Created by   on 2020/7/23
+//  Created by   on 2020/7/24
 //  Copyright (c) 2020 __MyCompanyName__. All rights reserved.
 //
 
@@ -9,13 +9,12 @@
 
 
 
-@interface SongJson : NSObject <NSCoding, NSCopying>
+@interface SongModel : NSObject <NSCoding, NSCopying>
 
-@property (nonatomic, assign) double songJsonIdentifier;
 @property (nonatomic, strong) NSString *uploadUrl;
 @property (nonatomic, strong) NSString *songName;
-@property (nonatomic, strong) NSString *type;
 @property (nonatomic, strong) NSString *songAuthor;
+@property (nonatomic, strong) NSString *type;
 @property (nonatomic, assign) double index;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;

+ 123 - 0
MusicGradeExam/MusicGradeExam/UI/RecordExam/Model/SongModel.m

@@ -0,0 +1,123 @@
+//
+//  SongModel.m
+//
+//  Created by   on 2020/7/24
+//  Copyright (c) 2020 __MyCompanyName__. All rights reserved.
+//
+
+#import "SongModel.h"
+
+
+NSString *const kSongModelUploadUrl = @"uploadUrl";
+NSString *const kSongModelSongName = @"songName";
+NSString *const kSongModelSongAuthor = @"songAuthor";
+NSString *const kSongModelType = @"type";
+NSString *const kSongModelIndex = @"index";
+
+
+@interface SongModel ()
+
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
+
+@end
+
+@implementation SongModel
+
+@synthesize uploadUrl = _uploadUrl;
+@synthesize songName = _songName;
+@synthesize songAuthor = _songAuthor;
+@synthesize type = _type;
+@synthesize index = _index;
+
+
++ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
+{
+    return [[self alloc] initWithDictionary:dict];
+}
+
+- (instancetype)initWithDictionary:(NSDictionary *)dict
+{
+    self = [super init];
+    
+    // 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.uploadUrl = [self objectOrNilForKey:kSongModelUploadUrl fromDictionary:dict];
+            self.songName = [self objectOrNilForKey:kSongModelSongName fromDictionary:dict];
+            self.songAuthor = [self objectOrNilForKey:kSongModelSongAuthor fromDictionary:dict];
+            self.type = [self objectOrNilForKey:kSongModelType fromDictionary:dict];
+            self.index = [[self objectOrNilForKey:kSongModelIndex fromDictionary:dict] doubleValue];
+
+    }
+    
+    return self;
+    
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setValue:self.uploadUrl forKey:kSongModelUploadUrl];
+    [mutableDict setValue:self.songName forKey:kSongModelSongName];
+    [mutableDict setValue:self.songAuthor forKey:kSongModelSongAuthor];
+    [mutableDict setValue:self.type forKey:kSongModelType];
+    [mutableDict setValue:[NSNumber numberWithDouble:self.index] forKey:kSongModelIndex];
+
+    return [NSDictionary dictionaryWithDictionary:mutableDict];
+}
+
+- (NSString *)description 
+{
+    return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
+}
+
+#pragma mark - Helper Method
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
+{
+    id object = [dict objectForKey:aKey];
+    return [object isEqual:[NSNull null]] ? nil : object;
+}
+
+
+#pragma mark - NSCoding Methods
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    self = [super init];
+
+    self.uploadUrl = [aDecoder decodeObjectForKey:kSongModelUploadUrl];
+    self.songName = [aDecoder decodeObjectForKey:kSongModelSongName];
+    self.songAuthor = [aDecoder decodeObjectForKey:kSongModelSongAuthor];
+    self.type = [aDecoder decodeObjectForKey:kSongModelType];
+    self.index = [aDecoder decodeDoubleForKey:kSongModelIndex];
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)aCoder
+{
+
+    [aCoder encodeObject:_uploadUrl forKey:kSongModelUploadUrl];
+    [aCoder encodeObject:_songName forKey:kSongModelSongName];
+    [aCoder encodeObject:_songAuthor forKey:kSongModelSongAuthor];
+    [aCoder encodeObject:_type forKey:kSongModelType];
+    [aCoder encodeDouble:_index forKey:kSongModelIndex];
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    SongModel *copy = [[SongModel alloc] init];
+    
+    if (copy) {
+
+        copy.uploadUrl = [self.uploadUrl copyWithZone:zone];
+        copy.songName = [self.songName copyWithZone:zone];
+        copy.songAuthor = [self.songAuthor copyWithZone:zone];
+        copy.type = [self.type copyWithZone:zone];
+        copy.index = self.index;
+    }
+    
+    return copy;
+}
+
+
+@end

+ 2 - 2
MusicGradeExam/MusicGradeExam/UI/RecordExam/View/RecordListCell.h

@@ -7,7 +7,7 @@
 //
 
 #import <UIKit/UIKit.h>
-#import "SongJson.h"
+#import "SongModel.h"
 
 typedef NS_ENUM(NSInteger, RECORDTYPE) {
     RECORDTYPE_RECORD = 1,
@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, strong) NSDictionary  * _Nullable fileMessage;
 
-- (void)configCellWithSource:(SongJson *)songModel examRegistrationId:(NSString *)examRegistrationId operationCallback:(RecordAction)action;
+- (void)configCellWithSource:(SongModel *)songModel examRegistrationId:(NSString *)examRegistrationId operationCallback:(RecordAction)action;
 
 @end
 

+ 1 - 1
MusicGradeExam/MusicGradeExam/UI/RecordExam/View/RecordListCell.m

@@ -32,7 +32,7 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 
-- (void)configCellWithSource:(SongJson *)songModel examRegistrationId:(NSString *)examRegistrationId operationCallback:(RecordAction)action {
+- (void)configCellWithSource:(SongModel *)songModel examRegistrationId:(NSString *)examRegistrationId operationCallback:(RecordAction)action {
     if (action) {
         self.callback = action;
     }

+ 3 - 3
MusicGradeExam/MusicGradeExam/UI/RecordExam/View/RecordListCell.xib

@@ -30,18 +30,18 @@
                         <nil key="highlightedColor"/>
                     </label>
                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wqj-xK-Tvy">
-                        <rect key="frame" x="325" y="50" width="68" height="30"/>
+                        <rect key="frame" x="325" y="47" width="68" height="36"/>
                         <color key="backgroundColor" red="0.87058823529411766" green="0.97254901960784312" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="68" id="cTy-ak-vPW"/>
-                            <constraint firstAttribute="height" constant="30" id="dvX-e8-Avr"/>
+                            <constraint firstAttribute="height" constant="36" id="dvX-e8-Avr"/>
                         </constraints>
                         <state key="normal" title="删除">
                             <color key="titleColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
                         </state>
                         <userDefinedRuntimeAttributes>
                             <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                <real key="value" value="15"/>
+                                <real key="value" value="18"/>
                             </userDefinedRuntimeAttribute>
                         </userDefinedRuntimeAttributes>
                         <connections>