Parcourir la source

1.直播分享
2.购物车动效修改

Steven il y a 2 ans
Parent
commit
4dbd507ca8
44 fichiers modifiés avec 1346 ajouts et 85 suppressions
  1. 44 0
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 34 2
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 26 5
      KulexiuForStudent/KulexiuForStudent/AppDelegate.m
  5. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveRoom_share.imageset/Contents.json
  6. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveRoom_share.imageset/liveRoom_share@2x.png
  7. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveRoom_share.imageset/liveRoom_share@3x.png
  8. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_bg.imageset/Contents.json
  9. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_bg.imageset/liveShare_bg@2x.png
  10. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_bg.imageset/liveShare_bg@3x.png
  11. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_tips.imageset/Contents.json
  12. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_tips.imageset/liveShare_tips@2x.png
  13. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_tips.imageset/liveShare_tips@3x.png
  14. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/live_status.imageset/Contents.json
  15. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/live_status.imageset/live_status@2x.png
  16. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/live_status.imageset/live_status@3x.png
  17. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/share_logo.imageset/Contents.json
  18. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/share_logo.imageset/share_logo@2x.png
  19. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/share_logo.imageset/share_logo@3x.png
  20. 38 0
      KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch
  21. 37 4
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/GRScanManager.m
  22. 27 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIImage+KSScreenShot.h
  23. 88 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIImage+KSScreenShot.m
  24. 18 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/QRCodeGenerate/KSQRCreateManager.h
  25. 82 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/QRCodeGenerate/KSQRCreateManager.m
  26. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/Model/HomeHotMusicModel.h
  27. 13 1
      KulexiuForStudent/KulexiuForStudent/Module/Home/Model/HomeHotMusicModel.m
  28. 44 13
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/HomeHotMusicCellView.m
  29. 10 37
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/HomeHotMusicCellView.xib
  30. 18 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/MusicTagView.h
  31. 55 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/MusicTagView.m
  32. 92 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m
  33. 5 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomBottomView.h
  34. 22 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomBottomView.m
  35. 32 8
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomBottomView.xib
  36. 38 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/ShareLiveView/ShareLiveDisplayView.h
  37. 130 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/ShareLiveView/ShareLiveDisplayView.m
  38. 318 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/ShareLiveView/ShareLiveDisplayView.xib
  39. 7 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m
  40. 16 8
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Scan/Controller/KSScanViewController.m
  41. 2 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.h
  42. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.m
  43. 38 4
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.xib
  44. 0 1
      KulexiuForStudent/KulexiuForStudent/Module/Widget/View/WidgetSpeedView.m

+ 44 - 0
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -435,6 +435,10 @@
 		BC2DFF5828BE143A0056105A /* HomeTempLiveCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC2DFF5628BE143A0056105A /* HomeTempLiveCell.xib */; };
 		BC2DFF5B28C097D60056105A /* talentAnimation.json in Resources */ = {isa = PBXBuildFile; fileRef = BC2DFF5A28C097D60056105A /* talentAnimation.json */; };
 		BC2DFF5D28C097DC0056105A /* styleAnimation.json in Resources */ = {isa = PBXBuildFile; fileRef = BC2DFF5C28C097DC0056105A /* styleAnimation.json */; };
+		BC3A4EAB28DAC0CD001C4428 /* ShareLiveDisplayView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3A4EAA28DAC0CD001C4428 /* ShareLiveDisplayView.m */; };
+		BC3A4EAD28DAC0D6001C4428 /* ShareLiveDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC3A4EAC28DAC0D6001C4428 /* ShareLiveDisplayView.xib */; };
+		BC3A4EB128DAE074001C4428 /* KSQRCreateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3A4EB028DAE074001C4428 /* KSQRCreateManager.m */; };
+		BC3A4EB428DAE202001C4428 /* UIImage+KSScreenShot.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3A4EB328DAE202001C4428 /* UIImage+KSScreenShot.m */; };
 		BC40B9F82811767A00DEC0D1 /* HotInformationHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC40B9F72811767A00DEC0D1 /* HotInformationHeadView.m */; };
 		BC40B9FA2811768400DEC0D1 /* HotInformationHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC40B9F92811768400DEC0D1 /* HotInformationHeadView.xib */; };
 		BC40B9FE281177BD00DEC0D1 /* HomeInformationCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC40B9FC281177BD00DEC0D1 /* HomeInformationCell.m */; };
@@ -873,6 +877,7 @@
 		BCD457AB286469600010B493 /* PublicNoticeView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD457A92864695F0010B493 /* PublicNoticeView.m */; };
 		BCD457AC286469600010B493 /* PublicNoticeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCD457AA286469600010B493 /* PublicNoticeView.xib */; };
 		BCD457AF28646B580010B493 /* NoticeSourceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD457AE28646B580010B493 /* NoticeSourceModel.m */; };
+		BCD959C928DB071B00B70314 /* MusicTagView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD959C828DB071B00B70314 /* MusicTagView.m */; };
 		BCDE35862893B0E200A9A560 /* KSLoadingSuccessView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDE35852893B0E200A9A560 /* KSLoadingSuccessView.m */; };
 		BCDE35882897B40000A9A560 /* shareImage@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BCDE35872897B40000A9A560 /* shareImage@2x.png */; };
 		BCDE358E289A7D8700A9A560 /* KSGroupTagImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDE358D289A7D8700A9A560 /* KSGroupTagImageView.m */; };
@@ -1743,6 +1748,13 @@
 		BC2DFF5628BE143A0056105A /* HomeTempLiveCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeTempLiveCell.xib; sourceTree = "<group>"; };
 		BC2DFF5A28C097D60056105A /* talentAnimation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = talentAnimation.json; sourceTree = "<group>"; };
 		BC2DFF5C28C097DC0056105A /* styleAnimation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = styleAnimation.json; sourceTree = "<group>"; };
+		BC3A4EA928DAC0CD001C4428 /* ShareLiveDisplayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareLiveDisplayView.h; sourceTree = "<group>"; };
+		BC3A4EAA28DAC0CD001C4428 /* ShareLiveDisplayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareLiveDisplayView.m; sourceTree = "<group>"; };
+		BC3A4EAC28DAC0D6001C4428 /* ShareLiveDisplayView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ShareLiveDisplayView.xib; sourceTree = "<group>"; };
+		BC3A4EAF28DAE074001C4428 /* KSQRCreateManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSQRCreateManager.h; sourceTree = "<group>"; };
+		BC3A4EB028DAE074001C4428 /* KSQRCreateManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSQRCreateManager.m; sourceTree = "<group>"; };
+		BC3A4EB228DAE201001C4428 /* UIImage+KSScreenShot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+KSScreenShot.h"; sourceTree = "<group>"; };
+		BC3A4EB328DAE202001C4428 /* UIImage+KSScreenShot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+KSScreenShot.m"; sourceTree = "<group>"; };
 		BC40B9F62811767A00DEC0D1 /* HotInformationHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HotInformationHeadView.h; sourceTree = "<group>"; };
 		BC40B9F72811767A00DEC0D1 /* HotInformationHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HotInformationHeadView.m; sourceTree = "<group>"; };
 		BC40B9F92811768400DEC0D1 /* HotInformationHeadView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HotInformationHeadView.xib; sourceTree = "<group>"; };
@@ -2429,6 +2441,8 @@
 		BCD457AA286469600010B493 /* PublicNoticeView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PublicNoticeView.xib; sourceTree = "<group>"; };
 		BCD457AD28646B580010B493 /* NoticeSourceModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoticeSourceModel.h; sourceTree = "<group>"; };
 		BCD457AE28646B580010B493 /* NoticeSourceModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoticeSourceModel.m; sourceTree = "<group>"; };
+		BCD959C728DB071B00B70314 /* MusicTagView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MusicTagView.h; sourceTree = "<group>"; };
+		BCD959C828DB071B00B70314 /* MusicTagView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MusicTagView.m; sourceTree = "<group>"; };
 		BCDE35842893B0E200A9A560 /* KSLoadingSuccessView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSLoadingSuccessView.h; sourceTree = "<group>"; };
 		BCDE35852893B0E200A9A560 /* KSLoadingSuccessView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSLoadingSuccessView.m; sourceTree = "<group>"; };
 		BCDE35872897B40000A9A560 /* shareImage@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shareImage@2x.png"; sourceTree = "<group>"; };
@@ -3260,6 +3274,7 @@
 		2779336227E3249C0010E277 /* Tools */ = {
 			isa = PBXGroup;
 			children = (
+				BC3A4EAE28DAE074001C4428 /* QRCodeGenerate */,
 				BC8B6E7A285869B500866917 /* UMShare */,
 				BC8A45BC283DCADE00094BBB /* NSObject+KeyWindow.h */,
 				BC8A45BD283DCADE00094BBB /* NSObject+KeyWindow.m */,
@@ -3320,6 +3335,8 @@
 		2779337627E3249C0010E277 /* Extension */ = {
 			isa = PBXGroup;
 			children = (
+				BC3A4EB228DAE201001C4428 /* UIImage+KSScreenShot.h */,
+				BC3A4EB328DAE202001C4428 /* UIImage+KSScreenShot.m */,
 				BC0212FF27FC6ADD0040569F /* UIView+SubViewExtension.h */,
 				BC02130027FC6ADD0040569F /* UIView+SubViewExtension.m */,
 				277933A827E3249D0010E277 /* CALayer+Color.h */,
@@ -4352,6 +4369,25 @@
 			path = KulexiuForStudent/Module/Home/View/TeacherStyle/AnimationSource;
 			sourceTree = SOURCE_ROOT;
 		};
+		BC3A4EA828DAC071001C4428 /* ShareLiveView */ = {
+			isa = PBXGroup;
+			children = (
+				BC3A4EA928DAC0CD001C4428 /* ShareLiveDisplayView.h */,
+				BC3A4EAA28DAC0CD001C4428 /* ShareLiveDisplayView.m */,
+				BC3A4EAC28DAC0D6001C4428 /* ShareLiveDisplayView.xib */,
+			);
+			path = ShareLiveView;
+			sourceTree = "<group>";
+		};
+		BC3A4EAE28DAE074001C4428 /* QRCodeGenerate */ = {
+			isa = PBXGroup;
+			children = (
+				BC3A4EAF28DAE074001C4428 /* KSQRCreateManager.h */,
+				BC3A4EB028DAE074001C4428 /* KSQRCreateManager.m */,
+			);
+			path = QRCodeGenerate;
+			sourceTree = "<group>";
+		};
 		BC40BA0F28124D0C00DEC0D1 /* NoticeCenter */ = {
 			isa = PBXGroup;
 			children = (
@@ -4823,6 +4859,8 @@
 				BC802DA228BC5F8C0079E350 /* HomeHotMusicCellView.h */,
 				BC802DA028BC5F8C0079E350 /* HomeHotMusicCellView.m */,
 				BC802DA128BC5F8C0079E350 /* HomeHotMusicCellView.xib */,
+				BCD959C728DB071B00B70314 /* MusicTagView.h */,
+				BCD959C828DB071B00B70314 /* MusicTagView.m */,
 			);
 			path = HotMusic;
 			sourceTree = "<group>";
@@ -5239,6 +5277,7 @@
 		BCB6343627F6D29500ACFDCF /* View */ = {
 			isa = PBXGroup;
 			children = (
+				BC3A4EA828DAC071001C4428 /* ShareLiveView */,
 				BC02381628685087005560CA /* AnimationView */,
 				BCB9090E2852EF0000F5FF69 /* DragWindow */,
 				BCB635A827F6D93300ACFDCF /* KSChatVideoView.h */,
@@ -6146,6 +6185,7 @@
 				BCC583D128A9EC6400BAB4CF /* cloud_animation_2.png in Resources */,
 				BC71D25C288804CD0010F14B /* img_53.png in Resources */,
 				BC71D246288804CD0010F14B /* img_1.png in Resources */,
+				BC3A4EAD28DAC0D6001C4428 /* ShareLiveDisplayView.xib in Resources */,
 				BCC583BA28A9EC6400BAB4CF /* cloud_animation_26.png in Resources */,
 				275FA23A27E7356B00CFEA2E /* VefiBodyView.xib in Resources */,
 				BC119258280FA85300A716F7 /* HomeworkListCell.xib in Resources */,
@@ -6748,6 +6788,7 @@
 				BC48C3A92828FC7D00EE65C5 /* KSUploadManager.m in Sources */,
 				BC8A4599283DC33400094BBB /* TBXML.m in Sources */,
 				BC542E4B28409E9F00633781 /* InstrumentChooseViewController.m in Sources */,
+				BC3A4EB428DAE202001C4428 /* UIImage+KSScreenShot.m in Sources */,
 				BC11927A280FB07F00A716F7 /* AccompanyArrangeCell.m in Sources */,
 				277935B827E324A90010E277 /* FSCalendar.m in Sources */,
 				BCB6356C27F6D2A300ACFDCF /* Whiteboard.m in Sources */,
@@ -6821,6 +6862,7 @@
 				2723B5BC27F157B100E0B90B /* GroupCreateView.m in Sources */,
 				BCB6346927F6D29600ACFDCF /* KSLiveChatroomSeatResponse.m in Sources */,
 				2723B64627F15B5900E0B90B /* UITableView+SCIndexView.m in Sources */,
+				BC3A4EB128DAE074001C4428 /* KSQRCreateManager.m in Sources */,
 				BCB6353327F6D2A300ACFDCF /* CREmojiCollectionCell.m in Sources */,
 				BCB6356B27F6D2A300ACFDCF /* NodePlayMessage.m in Sources */,
 				2779352327E324A60010E277 /* UILabel+Extension.m in Sources */,
@@ -6959,6 +7001,7 @@
 				BCB6356527F6D2A300ACFDCF /* AccompanyDownloadMessage.m in Sources */,
 				275FA23627E7356B00CFEA2E /* LoginBodyView.m in Sources */,
 				BC49BAEC28D98C500031FF06 /* KSMetronomePlayer.m in Sources */,
+				BCD959C928DB071B00B70314 /* MusicTagView.m in Sources */,
 				2779355A27E324A70010E277 /* QCCountdownButton.m in Sources */,
 				275FA1E127E7351900CFEA2E /* KSTabBarViewController.m in Sources */,
 				BC11926B280FAF5900A716F7 /* AccompanyAlertView.m in Sources */,
@@ -7116,6 +7159,7 @@
 				BC4CC417288FD689004AD8EC /* LaunchAnimationView.m in Sources */,
 				277935C627E324A90010E277 /* SDQWMaskCustomModel.m in Sources */,
 				BCB6353C27F6D2A300ACFDCF /* MessageHelper.m in Sources */,
+				BC3A4EAB28DAC0CD001C4428 /* ShareLiveDisplayView.m in Sources */,
 				BC8C2C582823F57100FBA5D5 /* AddressListViewController.m in Sources */,
 				2779359E27E324A80010E277 /* TZPhotoPickerController.m in Sources */,
 				BCB6353D27F6D2A300ACFDCF /* MessageModel.m in Sources */,

BIN
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 34 - 2
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -26,8 +26,8 @@
             filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "790"
-            endingLineNumber = "790"
+            startingLineNumber = "807"
+            endingLineNumber = "807"
             landmarkName = "-updateVideoViewContainer"
             landmarkType = "7">
          </BreakpointContent>
@@ -48,5 +48,37 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D86FF6E8-CB7C-46EF-A67B-CFE97BA053B3"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "584"
+            endingLineNumber = "584"
+            landmarkName = "-handleScriptMessageSource:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "5BD2E24B-2A99-4088-8AD0-14FCB36A6107"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2035"
+            endingLineNumber = "2035"
+            landmarkName = "-bottomViewAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 26 - 5
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -37,6 +37,7 @@
 #import "MyCourseViewController.h"
 #import "NotiferMessageViewController.h"
 #import "LaunchAnimationViewController.h"
+#import "KSEnterLiveroomManager.h"
 
 @interface RCNaviDataInfo : NSObject
 
@@ -203,7 +204,7 @@
 
     [USER_MANAGER startCountUMEvent];
     [USER_MANAGER sendUMEvent:@"klx_login"];
-//    [UMConfigure setLogEnabled:YES];
+    [UMConfigure setLogEnabled:YES];
     // 配置友盟分享
     // 微信、QQ、微博完整版会校验合法的universalLink,不设置会在初始化平台失败
        //配置微信Universal Link需注意 universalLinkDic的key是rawInt类型,不是枚举类型 ,即为 UMSocialPlatformType.wechatSession.rawInt
@@ -857,17 +858,37 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                     DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
                     if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->陪练课
                         index = DISPLAY_INDEX_FIRST;
+                        MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+                        [ctrl displayWithIndex:index];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        [navCtrl pushViewController:ctrl animated:YES];
                     }
                     else if ([pageType isEqualToString:@"liveClass"]) { // 我的课程 ->直播课
                         index = DISPLAY_INDEX_LIVE;
+                        MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+                        [ctrl displayWithIndex:index];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        [navCtrl pushViewController:ctrl animated:YES];
                     }
                     else if ([pageType isEqualToString:@"videoClass"]) { // 我的课程 ->视频课
                         index = DISPLAY_INDEX_VIEO;
+                        MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+                        [ctrl displayWithIndex:index];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        [navCtrl pushViewController:ctrl animated:YES];
+                    }
+                    else if ([pageType isEqualToString:@"liveRoom"]) { // 直播
+                        NSString *parmString = [dict stringValueForKey:@"params"];
+                        NSData *parmData = [parmString mj_JSONData];
+                        NSError *error;
+                        NSDictionary *parm = [NSJSONSerialization JSONObjectWithData:parmData options:NSJSONReadingMutableContainers error:&error];
+                        if (!error) {
+                            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                            [KSEnterLiveroomManager joinLiveWithRoomId:[parm stringValueForKey:@"liveRoomId"] inController:navCtrl callback:^{
+                                                            
+                            }];
+                        }
                     }
-                    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
-                    [ctrl displayWithIndex:index];
-                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-                    [navCtrl pushViewController:ctrl animated:YES];
                 }
                 else {  // 空 或者 h5
                     NSString *webUrl = [dict stringValueForKey:@"url"];

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveRoom_share.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveRoom_share.imageset/liveRoom_share@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveRoom_share.imageset/liveRoom_share@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_bg.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_bg.imageset/liveShare_bg@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_bg.imageset/liveShare_bg@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_tips.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_tips.imageset/liveShare_tips@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/liveShare_tips.imageset/liveShare_tips@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/live_status.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/live_status.imageset/live_status@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/live_status.imageset/live_status@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/share_logo.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/share_logo.imageset/share_logo@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/share_logo.imageset/share_logo@3x.png


+ 38 - 0
KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch

@@ -111,6 +111,44 @@ shouldPrevent = NO; \
         dispatch_sync(dispatch_get_main_queue(), block);\
     }
 
+
+
+//1. 测试且 ARC 环境
+#ifndef weakObj
+#define weakObj(object) autoreleasepool {} __weak __typeof__(object) object##_##weak_ = object;
+#endif
+
+#ifndef strongObj
+#define strongObj(object) autoreleasepool {} __typeof__(object) object = object##_##weak_;
+#endif
+
+//2. 正式且 ARC 环境
+#ifndef weakObj
+#define weakObj(object) try {} @catch (...){} __weak __typeof__(object) object##_##weak_ = object;
+#endif
+
+#ifndef strongObj
+#define strongObj(object) try {} @catch (...){} __typeof__(object) object = object##_##weak_;
+#endif
+
+//3. 测试且非 ARC 环境
+#ifndef weakObj
+#define weakObj(object) autoreleasepool {} __block __typeof__(object) object##_##block_ = object;
+#endif
+
+#ifndef strongObj
+#define strongObj(object) autoreleasepool {} __typeof__(object) object = object##_##block_;
+#endif
+
+//4. 正式且非 ARC 环境
+#ifndef weakObj
+#define weakObj(object) try {} @catch (...){} __block __typeof__(object) object##_##block_ = object;
+#endif
+
+#ifndef strongObj
+#define strongObj(object) try {} @catch (...){} __typeof__(object) object = object##_##block_;
+#endif
+
 // Include any system framework and library headers here that should be included in all compilation units.
 // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
 

+ 37 - 4
KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/GRScanManager.m

@@ -11,10 +11,14 @@
 #import <AudioToolbox/AudioToolbox.h>
 
 @interface GRScanManager()<AVCaptureMetadataOutputObjectsDelegate>
+
 @property (copy, nonatomic) void (^completionBlock) (NSString *);
 
 @property (nonatomic, strong) AVCaptureSession *session;
 
+@property (nonatomic, strong) dispatch_queue_t sessionQueue;
+
+
 @end
 
 @implementation GRScanManager
@@ -24,10 +28,20 @@
     if (self) {
         _supportQRCode = YES;
         _supportBarCode = YES;
+        [self createQueue];
     }
     return self;
 }
 
+/**
+ *  创建一个队列,防止阻塞主线程
+ */
+- (void)createQueue{
+    dispatch_queue_t sessionQueue = dispatch_queue_create("com.Colexiu.KulexiuForStudent.sesson", DISPATCH_QUEUE_SERIAL);
+    self.sessionQueue = sessionQueue;
+}
+
+
 #pragma mark - 扫描二维码
 #pragma mark 开始扫描
 - (void)startScanningQRCodeWithInView:(UIView *)inView scanView:(UIView *)scanView resultCallback:(void(^)(NSString *result))callback {
@@ -108,7 +122,28 @@
     output.rectOfInterest = CGRectMake(x, y, w, h);
     
     // 7.开始扫描
-    [session startRunning];
+    [self sessionStartRunning];
+}
+- (void)sessionStartRunning {
+    
+    @weakObj(self);
+    dispatch_async(self.sessionQueue, ^{
+        @strongObj(self);
+        if (!self.session.running) {
+            [self.session startRunning];
+        }
+    });
+}
+
+-(void)sessionStopRunning{
+    
+    @weakObj(self);
+    dispatch_async(self.sessionQueue, ^{
+        @strongObj(self);
+        if (self.session.running) {
+            [self.session stopRunning];
+        }
+    });
 }
 
 #pragma mark - 实现AVCaptureMetadataOutput代理方法
@@ -185,9 +220,7 @@
 }
 
 - (void)stopScanning {
-    if ([self.session isRunning]) {
-        [self.session stopRunning];
-    }
+    [self sessionStopRunning];
 }
 
 @end

+ 27 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIImage+KSScreenShot.h

@@ -0,0 +1,27 @@
+//
+//  UIImage+KSScreenShot.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/14.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UIImage (KSScreenShot)
+
+/** 获取屏幕截图 */
++ (UIImage *) getCurrentScreenShot;
+/** 获取某个view 上的截图 */
++ (UIImage *)getCurrentViewShot:(UIView *)view;
+/** 获取某个scrollview 上的截图 */
++ (UIImage *)getCurrentScrollviewShot:(UIScrollView *)scrollview;
+/** 获取某个 范围内的 截图 */
++ (UIImage *)getCurrentInnerViewShot:(UIView *)innerView atFrame:(CGRect)rect;
+
+// 压缩图片
+- (UIImage *)scaleImage:(UIImage *)image toKb:(NSInteger)kb;
+@end
+
+NS_ASSUME_NONNULL_END

+ 88 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIImage+KSScreenShot.m

@@ -0,0 +1,88 @@
+//
+//  UIImage+KSScreenShot.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/14.
+//
+
+#import "UIImage+KSScreenShot.h"
+
+@implementation UIImage (KSScreenShot)
+
+#pragma mark 获取当前屏幕的截图
++ (UIImage *)getCurrentScreenShot {
+    CGSize size = [UIScreen mainScreen].bounds.size;
+    CGFloat scale = [UIScreen mainScreen].scale;
+    UIGraphicsBeginImageContextWithOptions(size, YES, scale);
+    [[UIApplication sharedApplication].keyWindow.layer renderInContext:UIGraphicsGetCurrentContext()];
+    UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    return image;
+}
+
++ (UIImage *)getCurrentViewShot:(UIView *)view {
+    CGSize size = view.frame.size;
+    CGFloat scale = [UIScreen mainScreen].scale;
+    UIGraphicsBeginImageContextWithOptions(size, YES, scale);
+    [view.layer renderInContext:UIGraphicsGetCurrentContext()];
+    UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    return image;
+}
++ (UIImage *)getCurrentScrollviewShot:(UIScrollView *)scrollview {
+    CGSize size = scrollview.contentSize;
+    CGFloat scale = [UIScreen mainScreen].scale;
+    UIGraphicsBeginImageContextWithOptions(size, YES, scale);
+
+    //获取当前scrollview的frame 和 contentOffset
+    CGRect saveFrame = scrollview.frame;
+    CGPoint saveOffset = scrollview.contentOffset;
+    //置为起点
+    scrollview.contentOffset = CGPointZero;
+    scrollview.frame = CGRectMake(0, 0, scrollview.contentSize.width, scrollview.contentSize.height);
+
+    [scrollview.layer renderInContext:UIGraphicsGetCurrentContext()];
+    UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+      //还原
+    scrollview.frame = saveFrame;
+    scrollview.contentOffset = saveOffset;
+
+    return image;
+}
+
+//获得某个范围内的屏幕图像
++ (UIImage *)getCurrentInnerViewShot:(UIView *) innerView atFrame:(CGRect)rect {
+    UIGraphicsBeginImageContext(innerView.frame.size);
+    CGContextRef context = UIGraphicsGetCurrentContext();
+    CGContextSaveGState(context);
+    UIRectClip(rect);
+    [innerView.layer renderInContext:context];
+    UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    return  theImage;
+}
+
+- (UIImage *)scaleImage:(UIImage *)image toKb:(NSInteger)kb {
+    
+    if (!image) {
+        return image;
+    }
+    if (kb<1) {
+        return image;
+    }
+    
+    kb*=1024;
+    
+    CGFloat compression = 0.9f;
+    CGFloat maxCompression = 0.1f;
+    NSData *imageData = UIImageJPEGRepresentation(image, compression);
+    while ([imageData length] > kb && compression > maxCompression) {
+        compression -= 0.1;
+        imageData = UIImageJPEGRepresentation(image, compression);
+    }
+    NSLog(@"当前大小:%fkb",(float)[imageData length]/1024.0f);
+    UIImage *compressedImage = [UIImage imageWithData:imageData];
+    return compressedImage;
+}
+@end

+ 18 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/QRCodeGenerate/KSQRCreateManager.h

@@ -0,0 +1,18 @@
+//
+//  KSQRCreateManager.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/14.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSQRCreateManager : NSObject
+
++ (UIImage *)createQRCodeWithUrl:(NSString *)url displayImage:(UIImage * _Nullable)displayImage scaleSize:(CGFloat)imageWidth;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 82 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/QRCodeGenerate/KSQRCreateManager.m

@@ -0,0 +1,82 @@
+//
+//  KSQRCreateManager.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/14.
+//
+
+#import "KSQRCreateManager.h"
+#import <CoreImage/CoreImage.h>
+
+@implementation KSQRCreateManager
+
++ (UIImage *)createQRCodeWithUrl:(NSString *)url displayImage:(UIImage *)displayImage scaleSize:(CGFloat)imageWidth {
+    if ([NSString isEmptyString:url]) {
+        return nil;
+    }
+    // 1 创建一个二维码滤镜实例(CIFilter)
+    CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
+    // 滤镜恢复默认设置
+    [filter setDefaults];
+    
+    // 2.给滤镜添加数据
+    NSData *data = [url dataUsingEncoding:NSUTF8StringEncoding];
+    // 使用KVC的方式给filter赋值
+    [filter setValue:data forKey:@"inputMessage"];
+    
+    // 3.生成二维码
+    CIImage *image = [filter outputImage];
+    // 4.生成制定大小的图片
+    UIImage *qrCodeImage = [self createNonInterpolatedUIImageFormCIImage:image withSize:imageWidth];
+    
+    //5.把中央图片划入二维码里面
+    //5.1开启图形上下文
+    UIGraphicsBeginImageContext(qrCodeImage.size);
+    UIGraphicsBeginImageContextWithOptions(qrCodeImage.size, NO, [UIScreen mainScreen].scale);
+    //5.2将二维码的图片画入
+    [qrCodeImage drawInRect:CGRectMake(0, 0, qrCodeImage.size.width, qrCodeImage.size.height)];
+    
+    if (displayImage != nil) {
+        CGFloat centerW = qrCodeImage.size.width * 0.3;
+        CGFloat centerH = centerW;
+        CGFloat centerX = (qrCodeImage.size.width - centerW) * 0.5;
+        CGFloat centerY = (qrCodeImage.size.height - centerH) * 0.5;
+        [displayImage drawInRect:CGRectMake(centerX, centerY, centerW, centerH)];
+    }
+    //5.3获取绘制好的图片
+    UIImage *finalImg = UIGraphicsGetImageFromCurrentImageContext();
+    //5.4关闭图像上下文
+    UIGraphicsEndImageContext();
+    return finalImg;
+}
+
+
+/**
+ *  调用该方法处理图像变清晰
+ *  根据CIImage生成指定大小的UIImage
+ *
+ *  @param image CIImage
+ *  @param size  图片宽度以及高度
+ */
++ (UIImage *)createNonInterpolatedUIImageFormCIImage:(CIImage *)image withSize:(CGFloat)size {
+    CGRect extent = CGRectIntegral(image.extent);
+    CGFloat scale = MIN(size/CGRectGetWidth(extent), size/CGRectGetHeight(extent));
+    
+    //1.创建bitmap;
+    size_t width = CGRectGetWidth(extent) * scale;
+    size_t height = CGRectGetHeight(extent) * scale;
+    CGColorSpaceRef cs = CGColorSpaceCreateDeviceGray();
+    CGContextRef bitmapRef = CGBitmapContextCreate(nil, width, height, 8, 0, cs, (CGBitmapInfo)kCGImageAlphaNone);
+    CIContext *context = [CIContext contextWithOptions:nil];
+    CGImageRef bitmapImage = [context createCGImage:image fromRect:extent];
+    CGContextSetInterpolationQuality(bitmapRef, kCGInterpolationNone);
+    CGContextScaleCTM(bitmapRef, scale, scale);
+    CGContextDrawImage(bitmapRef, extent, bitmapImage);
+    
+    //2.保存bitmap到图片
+    CGImageRef scaledImage = CGBitmapContextCreateImage(bitmapRef);
+    CGContextRelease(bitmapRef);
+    CGImageRelease(bitmapImage);
+    return [UIImage imageWithCGImage:scaledImage];
+}
+@end

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

@@ -55,6 +55,7 @@
 @property (nonatomic, assign) double userId;
 @property (nonatomic, strong) NSString *submitAuditTime;
 @property (nonatomic, assign) BOOL exquisiteFlag;
+@property (nonatomic, strong) NSString *paymentType;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 13 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/Model/HomeHotMusicModel.m

@@ -53,6 +53,7 @@ NSString *const kHomeHotMusicModelUserId = @"userId";
 NSString *const kHomeHotMusicModelSubmitAuditTime = @"submitAuditTime";
 
 NSString *const kHomeHotMusicModelExquisiteFlag = @"exquisiteFlag";
+NSString *const kMusicMessageModelPaymentType = @"paymentType";
 
 @interface HomeHotMusicModel ()
 
@@ -106,6 +107,7 @@ NSString *const kHomeHotMusicModelExquisiteFlag = @"exquisiteFlag";
 @synthesize userId = _userId;
 @synthesize submitAuditTime = _submitAuditTime;
 @synthesize exquisiteFlag = _exquisiteFlag;
+@synthesize paymentType = _paymentType;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -162,7 +164,10 @@ NSString *const kHomeHotMusicModelExquisiteFlag = @"exquisiteFlag";
             self.musicSubject = [self objectOrNilForKey:kHomeHotMusicModelMusicSubject fromDictionary:dict];
             self.userId = [[self objectOrNilForKey:kHomeHotMusicModelUserId fromDictionary:dict] doubleValue];
             self.submitAuditTime = [self objectOrNilForKey:kHomeHotMusicModelSubmitAuditTime fromDictionary:dict];
-        self.exquisiteFlag = [[self objectOrNilForKey:kHomeHotMusicModelExquisiteFlag fromDictionary:dict] boolValue];
+        self.exquisiteFlag = [[self objectOrNilForKey:kHomeHotMusicModelExquisiteFlag fromDictionary:dict]
+                              boolValue];
+        self.paymentType = [self objectOrNilForKey:kMusicMessageModelPaymentType fromDictionary:dict];
+
     }
     
     return self;
@@ -216,6 +221,8 @@ NSString *const kHomeHotMusicModelExquisiteFlag = @"exquisiteFlag";
     [mutableDict setValue:[NSNumber numberWithDouble:self.userId] forKey:kHomeHotMusicModelUserId];
     [mutableDict setValue:self.submitAuditTime forKey:kHomeHotMusicModelSubmitAuditTime];
     [mutableDict setValue:[NSNumber numberWithBool:self.exquisiteFlag] forKey:kHomeHotMusicModelExquisiteFlag];
+    [mutableDict setValue:self.paymentType forKey:kMusicMessageModelPaymentType];
+
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -286,6 +293,8 @@ NSString *const kHomeHotMusicModelExquisiteFlag = @"exquisiteFlag";
     self.userId = [aDecoder decodeDoubleForKey:kHomeHotMusicModelUserId];
     self.submitAuditTime = [aDecoder decodeObjectForKey:kHomeHotMusicModelSubmitAuditTime];
     self.exquisiteFlag = [aDecoder decodeBoolForKey:kHomeHotMusicModelExquisiteFlag];
+    self.paymentType = [aDecoder decodeObjectForKey:kMusicMessageModelPaymentType];
+
     return self;
 }
 
@@ -336,6 +345,7 @@ NSString *const kHomeHotMusicModelExquisiteFlag = @"exquisiteFlag";
     [aCoder encodeDouble:_userId forKey:kHomeHotMusicModelUserId];
     [aCoder encodeObject:_submitAuditTime forKey:kHomeHotMusicModelSubmitAuditTime];
     [aCoder encodeBool:_exquisiteFlag forKey:kHomeHotMusicModelExquisiteFlag];
+    [aCoder encodeObject:_paymentType forKey:kMusicMessageModelPaymentType];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -388,6 +398,8 @@ NSString *const kHomeHotMusicModelExquisiteFlag = @"exquisiteFlag";
         copy.userId = self.userId;
         copy.submitAuditTime = [self.submitAuditTime copyWithZone:zone];
         copy.exquisiteFlag = self.exquisiteFlag;
+        copy.paymentType = [self.paymentType copyWithZone:zone];
+
     }
     
     return copy;

+ 44 - 13
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/HomeHotMusicCellView.m

@@ -6,11 +6,12 @@
 //
 
 #import "HomeHotMusicCellView.h"
+#import "MusicTagView.h"
 
 @interface HomeHotMusicCellView ()
+@property (weak, nonatomic) IBOutlet UIView *typeView;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *typeViewWidth;
 
-@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
-@property (weak, nonatomic) IBOutlet UIView *statusView;
 @property (weak, nonatomic) IBOutlet UILabel *songNameLabel;
 @property (weak, nonatomic) IBOutlet UILabel *songAuth;
 @property (weak, nonatomic) IBOutlet UILabel *uploadName;
@@ -100,20 +101,50 @@
     [self configTagViewWithTagArray:tagArray maxWidth:maxWidth];
     self.lineView.hidden = hideLineView;
     
-    if ([sourceModel.chargeType isEqualToString:@"VIP"]) {
-        self.statusView.layer.borderColor = HexRGB(0xCD863E).CGColor;
-        self.statusLabel.text = @"会员";
-        self.statusLabel.textColor = HexRGB(0xCD863E);
+    [self configTypeView:sourceModel.paymentType];
+}
+
+- (void)configTypeView:(NSString *)musicType {
+    [self.typeView removeAllSubViews];
+    NSArray * chargeArray = [musicType componentsSeparatedByString:@","];
+    CGFloat singleWidth = 30.0f;
+    CGFloat space = 5.0f;
+    CGFloat height = 17.0f;
+    for (NSInteger index = 0; index < chargeArray.count; index++) {
+        NSString *desc = chargeArray[index];
+        NSString *title = nil;
+        UIColor *borderColor = nil;
+        UIColor *titleColor = nil;
+        if ([desc isEqualToString:@"VIP"]) {
+            borderColor = HexRGB(0xD38535);
+            title = @"会员";
+            titleColor = HexRGB(0xCD863E);
+            
+        }
+        else if ([desc isEqualToString:@"CHARGE"]) {
+            borderColor = HexRGB(0x50A2D8);
+            title = @"点播";
+            titleColor = HexRGB(0x3591CE);
+        }
+        else {
+            borderColor = HexRGB(0x01B84F);
+            title = @"免费";
+            titleColor = HexRGB(0x01B84F);
+        }
+        CGRect frame = CGRectMake((singleWidth + space) * index, 0, singleWidth, height);
+        MusicTagView *typeView = [[MusicTagView alloc] initWithTitle:title titleColor:titleColor borderColor:borderColor];
+        typeView.frame = frame;
+        [self.typeView addSubview:typeView];
     }
-    else if ([sourceModel.chargeType isEqualToString:@"CHARGE"]) {
-        self.statusView.layer.borderColor = HexRGB(0x3591CE).CGColor;
-        self.statusLabel.text = @"点播";
-        self.statusLabel.textColor = HexRGB(0x3591CE);
+    self.typeViewWidth.constant = [self getWidthWithTypeCount:chargeArray.count singleWidth:singleWidth space:space];
+}
+
+- (CGFloat)getWidthWithTypeCount:(NSInteger)count singleWidth:(CGFloat)singleWidth space:(CGFloat)space {
+    if (count == 1) {
+        return singleWidth;
     }
     else {
-        self.statusView.layer.borderColor = HexRGB(0x01B84F).CGColor;
-        self.statusLabel.text = @"免费";
-        self.statusLabel.textColor = HexRGB(0x01B84F);
+        return singleWidth + (singleWidth + space) * (count - 1);
     }
 }
 

+ 10 - 37
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/HomeHotMusicCellView.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="21225" 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="21207"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -15,48 +15,21 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="N1D-TV-iWW">
-                    <rect key="frame" x="11" y="19" width="31" height="17"/>
-                    <subviews>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="免费" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Py1-eU-jUO">
-                            <rect key="frame" x="5" y="1" width="21" height="14"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="14" id="tlY-id-hEI"/>
-                            </constraints>
-                            <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="10"/>
-                            <color key="textColor" red="0.0039215686269999999" green="0.75686274509999996" blue="0.70980392160000005" alpha="1" colorSpace="calibratedRGB"/>
-                            <nil key="highlightedColor"/>
-                            <userDefinedRuntimeAttributes>
-                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                    <real key="value" value="4"/>
-                                </userDefinedRuntimeAttribute>
-                            </userDefinedRuntimeAttributes>
-                        </label>
-                    </subviews>
+                    <rect key="frame" x="11" y="19" width="30" height="17"/>
                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
-                        <constraint firstItem="Py1-eU-jUO" firstAttribute="leading" secondItem="N1D-TV-iWW" secondAttribute="leading" constant="5" id="DGu-KO-U8U"/>
-                        <constraint firstAttribute="width" constant="31" id="Fkh-p3-6cV"/>
-                        <constraint firstAttribute="trailing" secondItem="Py1-eU-jUO" secondAttribute="trailing" constant="5" id="PIY-vI-xI7"/>
-                        <constraint firstItem="Py1-eU-jUO" firstAttribute="top" secondItem="N1D-TV-iWW" secondAttribute="top" constant="1" id="TLG-Bf-Sdj"/>
-                        <constraint firstAttribute="bottom" secondItem="Py1-eU-jUO" secondAttribute="bottom" constant="2" id="rwb-d0-nEK"/>
+                        <constraint firstAttribute="height" constant="17" id="3Gw-3t-MVY"/>
+                        <constraint firstAttribute="width" constant="30" id="Fkh-p3-6cV"/>
                     </constraints>
-                    <userDefinedRuntimeAttributes>
-                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                            <real key="value" value="4"/>
-                        </userDefinedRuntimeAttribute>
-                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
-                            <real key="value" value="1"/>
-                        </userDefinedRuntimeAttribute>
-                    </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="7xw-r5-qc1">
-                    <rect key="frame" x="66" y="17.5" width="98" height="20"/>
+                    <rect key="frame" x="65" y="17.5" width="98" height="20"/>
                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                     <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                     <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="jm2-P7-5K9">
-                    <rect key="frame" x="169" y="20" width="43" height="15"/>
+                    <rect key="frame" x="168" y="20" width="43" height="15"/>
                     <fontDescription key="fontDescription" type="system" pointSize="12"/>
                     <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
@@ -89,7 +62,7 @@
                     </constraints>
                 </view>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="quality_tag" translatesAutoresizingMaskIntoConstraints="NO" id="nUD-13-vp7">
-                    <rect key="frame" x="47" y="19" width="14" height="17"/>
+                    <rect key="frame" x="46" y="19" width="14" height="17"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="14" id="1wc-7R-Rd1"/>
                         <constraint firstAttribute="height" constant="17" id="dpI-He-aFb"/>
@@ -139,9 +112,9 @@
                 <outlet property="qualityTagWidth" destination="1wc-7R-Rd1" id="LMy-l9-qZs"/>
                 <outlet property="songAuth" destination="jm2-P7-5K9" id="rS6-tU-qwV"/>
                 <outlet property="songNameLabel" destination="7xw-r5-qc1" id="fzV-Mi-66B"/>
-                <outlet property="statusLabel" destination="Py1-eU-jUO" id="NYg-Iw-DCP"/>
-                <outlet property="statusView" destination="N1D-TV-iWW" id="wy9-ES-Lla"/>
                 <outlet property="tagView" destination="qrG-kH-VRz" id="za1-QD-1A2"/>
+                <outlet property="typeView" destination="N1D-TV-iWW" id="vWO-Qp-ugc"/>
+                <outlet property="typeViewWidth" destination="Fkh-p3-6cV" id="9xQ-hg-cUm"/>
                 <outlet property="uploadName" destination="yx5-8B-fUi" id="WSv-Gx-SCl"/>
             </connections>
             <point key="canvasLocation" x="101.44927536231884" y="62.946428571428569"/>

+ 18 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/MusicTagView.h

@@ -0,0 +1,18 @@
+//
+//  MusicTagView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/9/21.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MusicTagView : UIView
+
+- (instancetype)initWithTitle:(NSString *)title titleColor:(UIColor *)titleColor borderColor:(UIColor *)borderColor;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 55 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/MusicTagView.m

@@ -0,0 +1,55 @@
+//
+//  MusicTagView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/9/21.
+//
+
+#import "MusicTagView.h"
+
+@interface MusicTagView ()
+
+@property (nonatomic, strong) UILabel *tagLabel;
+
+@end
+
+@implementation MusicTagView
+
+- (instancetype)initWithTitle:(NSString *)title titleColor:(UIColor *)titleColor borderColor:(UIColor *)borderColor {
+    if (self = [super init]) {
+        [self configUIWithTitle:title titleColor:titleColor borderColor:borderColor];
+    }
+    return self;
+}
+
+- (void)configUIWithTitle:(NSString *)title titleColor:(UIColor *)titleColor borderColor:(UIColor *)borderColor {
+    [self addSubview:self.tagLabel];
+    self.tagLabel.text = title;
+    self.tagLabel.textColor = titleColor;
+    self.layer.borderWidth = 0.5f;
+    self.layer.cornerRadius = 4.0f;
+    self.layer.borderColor = borderColor.CGColor;
+    [self.tagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self);
+        make.centerY.mas_equalTo(self.mas_centerY);
+    }];
+}
+
+- (UILabel *)tagLabel {
+    if (!_tagLabel) {
+        _tagLabel = [[UILabel alloc] init];
+        _tagLabel.font = [UIFont systemFontOfSize:10.0f];
+        _tagLabel.textAlignment = NSTextAlignmentCenter;
+    }
+    return _tagLabel;
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 92 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m

@@ -34,6 +34,14 @@
 #import "LiveRoomAlertView.h"
 #import "LiveApplyView.h"
 #import "LiveApplyingView.h"
+#import "ShareLiveDisplayView.h"
+
+
+#import "UIImage+KSScreenShot.h"
+#import "TZImageManager.h"
+#import "RecordCheckManager.h"
+#import "KSPremissionAlert.h"
+#import "KSUMShareManager.h"
 
 #define AUTOHIDE_TIME (10.0f)
 
@@ -151,6 +159,8 @@ typedef NS_ENUM(NSInteger, MICSTATUS) {
 
 @property (nonatomic, assign) BOOL isPauseLive;
 
+@property (nonatomic, strong) ShareLiveDisplayView *shareView;
+
 @end
 
 //  用于记录点赞消息连续点击的次数
@@ -420,6 +430,13 @@ static int clickPraiseBtnTimes  = 0;
                                                     action:@selector(resetBottomGesture:)];
     resetBottomTapGesture.delegate = self;
     [self.view addGestureRecognizer:resetBottomTapGesture];
+    
+    if (self.isTempRoom) {
+        self.bottomView.hideShareButton = NO;
+    }
+    else {
+        self.bottomView.hideShareButton = YES;
+    }
 }
 
 - (void)connectService {
@@ -2013,11 +2030,33 @@ static int clickPraiseBtnTimes  = 0;
             }
         }
             break;
+        case LIVEROOMACTION_SHARE:
+        {
+            [self showShareAlert];
+        }
+            break;
         default:
             break;
     }
 }
 
+- (void)showShareAlert {
+    NSString *qrUrl = [NSString stringWithFormat:@"%@%@%@",WEBHOST,@"/#/transfer?action=app&pageTag=liveRoom&liveRoomId=",self.roomId];
+    self.shareView = [ShareLiveDisplayView shareInstance];
+    [self.shareView configWithTeacherAvatar:self.createrAvatal teacherName:self.createrName qrUrl:qrUrl];
+    MJWeakSelf;
+    [self.shareView shareActionCallback:^(SHARETYPE type) {
+        UIImage *image = [UIImage getCurrentViewShot:weakSelf.shareView.containerView];
+        if (type == SHARETYPE_SAVE) {
+            [weakSelf savePicWithImage:image];
+        }
+        else {
+            [weakSelf showShareUI:image];
+        }
+    }];
+    [self.shareView showShareViewInView:self.view];
+}
+
 - (void)displaySeatApplyView {
     [self.applyView showInView:self.view];
 }
@@ -2394,4 +2433,57 @@ static int clickPraiseBtnTimes  = 0;
     }];
 }
 
+
+- (void)showShareUI:(UIImage *)image {
+    [KSUMShareManager shareInstanceWithImage:image url:@"" shareTitle:@"" descMessage:@"" shareType:KSSHARETYPE_IMAGE showInView:self callback:^(BOOL isSuccess, NSString * _Nonnull descMessage) {
+        if (isSuccess) {
+            [self .shareView hideView];
+        }
+        else {
+            
+        }
+        [self MBPShow:descMessage];
+    }];
+}
+
+- (void)savePicWithImage:(UIImage *)image {
+
+    // 判断相册权限
+    PREMISSIONTYPE albumEnable = [RecordCheckManager checkPhotoLibraryPremissionAvaiable:NO showInView:nil];
+    if (albumEnable == PREMISSIONTYPE_YES) { // 如果有权限
+        
+        [[TZImageManager manager] savePhotoWithImage:image completion:^(PHAsset *asset, NSError *error) {
+            if (!error) {
+                [self .shareView hideView];
+                [self MBPShow:@"保存成功"];
+            }
+            else {
+                [self MBPShow:@"保存图片失败"];
+            }
+        }];
+    }
+    else {
+        if (albumEnable == PREMISSIONTYPE_NO) {
+            [self showAlertWithMessage:@"请开启相册访问权限" type:CHECKDEVICETYPE_CAMREA];
+        }
+    }
+}
+
+- (void)showAlertWithMessage:(NSString *)message type:(CHECKDEVICETYPE)deviceType {
+    [KSPremissionAlert shareInstanceDisplayImage:deviceType message:message showInView:self.view cancel:^{
+        
+    } confirm:^{
+        [self openSettingView];
+    }];
+    
+}
+
+- (void)openSettingView {
+    if (@available(iOS 10, *)) {
+        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
+    } else {
+        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
+    }
+}
+
 @end

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomBottomView.h

@@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, LIVEROOMACTION) {
     LIVEROOMACTION_SEAT,
     LIVEROOMACTION_SHOP,
     LIVEROOMACTION_LIKE,
+    LIVEROOMACTION_SHARE,
 };
 
 typedef void(^LiveBottomCallback)(LIVEROOMACTION action);
@@ -29,8 +30,12 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (weak, nonatomic) IBOutlet UIButton *seatButton;
 
+@property (weak, nonatomic) IBOutlet UIButton *shareButton;
+
 @property (nonatomic, assign) BOOL hideCartVButton;
 
+@property (nonatomic, assign) BOOL hideShareButton;
+
 + (instancetype)shareInstance;
 
 - (void)bottomClickAction:(LiveBottomCallback)callback;

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomBottomView.m

@@ -11,6 +11,8 @@
 @interface LiveRoomBottomView ()
 
 @property (weak, nonatomic) IBOutlet UIView *chatView;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *shareButtonWidth;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *shareButtonRight;
 
 @property (nonatomic, copy) LiveBottomCallback callback;
 
@@ -52,6 +54,11 @@
     }
 }
 
+- (IBAction)shareAction:(id)sender {
+    if (self.callback) {
+        self.callback(LIVEROOMACTION_SHARE);
+    }
+}
 
 - (void)setHideChatView:(BOOL)hideChatView {
     _hideChatView = hideChatView;
@@ -63,6 +70,21 @@
     }
 }
 
+- (void)setHideShareButton:(BOOL)hideShareButton {
+    _hideShareButton = hideShareButton;
+    if (hideShareButton) {
+        self.shareButton.hidden = YES;
+        self.shareButton.userInteractionEnabled = NO;
+        self.shareButtonWidth.constant = 0.0f;
+        self.shareButtonRight.constant = 0.0f;
+    }
+    else {
+        self.shareButton.hidden = NO;
+        self.shareButton.userInteractionEnabled = YES;
+        self.shareButtonWidth.constant = 44.0f;
+        self.shareButtonRight.constant = 12.0f;
+    }
+}
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 32 - 8
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomBottomView.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="21225" 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="21207"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -14,16 +14,20 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i9g-dc-6W7">
-                    <rect key="frame" x="11" y="3" width="243" height="38"/>
+                    <rect key="frame" x="11" y="3" width="185" height="38"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="快来互动吧!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dHC-4N-XEE">
-                            <rect key="frame" x="14" y="10.5" width="86" height="17"/>
+                            <rect key="frame" x="14" y="10.5" width="127" height="17"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                             <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <nil key="highlightedColor"/>
                         </label>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liveroom_chat" translatesAutoresizingMaskIntoConstraints="NO" id="7BB-Z5-2eQ">
-                            <rect key="frame" x="208" y="7" width="24" height="24"/>
+                            <rect key="frame" x="153" y="7" width="24" height="24"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="24" id="rwv-XS-3KR"/>
+                                <constraint firstAttribute="width" constant="24" id="xdH-7A-r5G"/>
+                            </constraints>
                         </imageView>
                     </subviews>
                     <color key="backgroundColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="0.25" colorSpace="calibratedRGB"/>
@@ -32,7 +36,8 @@
                         <constraint firstItem="dHC-4N-XEE" firstAttribute="centerY" secondItem="i9g-dc-6W7" secondAttribute="centerY" id="1vt-60-LNx"/>
                         <constraint firstAttribute="height" constant="38" id="6yp-eX-qT4"/>
                         <constraint firstItem="7BB-Z5-2eQ" firstAttribute="centerY" secondItem="i9g-dc-6W7" secondAttribute="centerY" id="Fpc-NY-eAZ"/>
-                        <constraint firstAttribute="trailing" secondItem="7BB-Z5-2eQ" secondAttribute="trailing" constant="11" id="QC6-Nn-aHL"/>
+                        <constraint firstItem="7BB-Z5-2eQ" firstAttribute="leading" secondItem="dHC-4N-XEE" secondAttribute="trailing" constant="12" id="SK1-Bq-Hma"/>
+                        <constraint firstAttribute="trailing" secondItem="7BB-Z5-2eQ" secondAttribute="trailing" constant="8" id="tc2-lj-bkg"/>
                         <constraint firstItem="dHC-4N-XEE" firstAttribute="leading" secondItem="i9g-dc-6W7" secondAttribute="leading" constant="14" id="zc4-JV-64b"/>
                     </constraints>
                     <userDefinedRuntimeAttributes>
@@ -44,7 +49,7 @@
                         <outletCollection property="gestureRecognizers" destination="iWl-2M-Ap0" appends="YES" id="9Z1-EQ-B8l"/>
                     </connections>
                 </view>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Fe-EG-Q8V">
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Fe-EG-Q8V">
                     <rect key="frame" x="264" y="0.0" width="44" height="44"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="44" id="RgE-fF-7a5"/>
@@ -90,18 +95,32 @@
                         <action selector="shopAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Mak-uN-ghX"/>
                     </connections>
                 </button>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="u1E-qc-yZL">
+                    <rect key="frame" x="208" y="0.0" width="44" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="OLi-DA-1bZ"/>
+                        <constraint firstAttribute="width" constant="44" id="R4V-Ot-c2p"/>
+                    </constraints>
+                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                    <state key="normal" image="liveRoom_share"/>
+                    <connections>
+                        <action selector="shareAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="5F5-0z-Hb9"/>
+                    </connections>
+                </button>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstItem="taG-wS-VNq" firstAttribute="centerY" secondItem="UZe-7Y-bzS" secondAttribute="centerY" id="Btu-xi-uw3"/>
                 <constraint firstItem="taG-wS-VNq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="EgT-BK-opB"/>
                 <constraint firstAttribute="trailing" secondItem="taG-wS-VNq" secondAttribute="trailing" constant="8" id="F9T-Vm-Neb"/>
-                <constraint firstItem="2Fe-EG-Q8V" firstAttribute="leading" secondItem="i9g-dc-6W7" secondAttribute="trailing" constant="10" id="Gty-Gq-c8P"/>
+                <constraint firstItem="2Fe-EG-Q8V" firstAttribute="centerY" secondItem="u1E-qc-yZL" secondAttribute="centerY" id="Kc5-gu-XaI"/>
                 <constraint firstItem="i9g-dc-6W7" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="RNO-Rz-qKO"/>
                 <constraint firstItem="taG-wS-VNq" firstAttribute="leading" secondItem="UZe-7Y-bzS" secondAttribute="trailing" constant="5" id="WBV-KZ-1xs"/>
+                <constraint firstItem="2Fe-EG-Q8V" firstAttribute="leading" secondItem="u1E-qc-yZL" secondAttribute="trailing" constant="12" id="bJD-py-APo"/>
                 <constraint firstItem="2Fe-EG-Q8V" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="fU0-r9-4Ma"/>
                 <constraint firstItem="UZe-7Y-bzS" firstAttribute="leading" secondItem="2Fe-EG-Q8V" secondAttribute="trailing" constant="5" id="kvF-3o-cys"/>
                 <constraint firstItem="i9g-dc-6W7" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="11" id="qDG-24-LNr"/>
+                <constraint firstItem="u1E-qc-yZL" firstAttribute="leading" secondItem="i9g-dc-6W7" secondAttribute="trailing" constant="12" id="vZn-f4-z9z"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
@@ -110,6 +129,10 @@
                 <outlet property="chatView" destination="i9g-dc-6W7" id="gxo-vx-pY2"/>
                 <outlet property="likeButton" destination="taG-wS-VNq" id="p3N-jD-2Qp"/>
                 <outlet property="seatButton" destination="2Fe-EG-Q8V" id="N7P-1L-9RI"/>
+                <outlet property="shareButton" destination="u1E-qc-yZL" id="u3K-im-6lu"/>
+                <outlet property="shareButtonRight" destination="bJD-py-APo" id="abU-zn-qAU"/>
+                <outlet property="shareButtonWidth" destination="R4V-Ot-c2p" id="vhf-gE-o6Q"/>
+                <outlet property="tipsLabel" destination="dHC-4N-XEE" id="zrf-iQ-D2H"/>
             </connections>
             <point key="canvasLocation" x="131.8840579710145" y="-182.8125"/>
         </view>
@@ -126,6 +149,7 @@
     </objects>
     <resources>
         <image name="like_button" width="38" height="38"/>
+        <image name="liveRoom_share" width="38" height="38"/>
         <image name="liveroom_chat" width="24" height="24"/>
         <image name="seat_nomal" width="38" height="38"/>
     </resources>

+ 38 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/ShareLiveView/ShareLiveDisplayView.h

@@ -0,0 +1,38 @@
+//
+//  ShareLiveDisplayView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/9/21.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef NS_ENUM(NSInteger, SHARETYPE) {
+    SHARETYPE_SAVE, // 保存图片
+    SHARETYPE_SHAREOUT, // 分享
+};
+
+typedef void(^ShareCallback)(SHARETYPE type);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ShareLiveDisplayView : UIView
+
+@property (weak, nonatomic) IBOutlet UIView *containerView;
+
++ (instancetype)shareInstance;
+
+- (void)configWithTeacherAvatar:(NSString *)teacherAvatarUrl teacherName:(NSString *)teacherName qrUrl:(NSString *)qrUrl;
+
+
+- (void)showShareView;
+
+- (void)showShareViewInView:(UIView *)displayView;
+
+- (void)shareActionCallback:(ShareCallback)callback;
+
+- (void)hideView;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 130 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/ShareLiveView/ShareLiveDisplayView.m

@@ -0,0 +1,130 @@
+//
+//  ShareLiveDisplayView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/9/21.
+//
+
+#import "ShareLiveDisplayView.h"
+#import "KSQRCreateManager.h"
+
+@interface ShareLiveDisplayView ()<UIGestureRecognizerDelegate>
+
+@property (weak, nonatomic) IBOutlet UIImageView *teacherAvatar;
+
+@property (weak, nonatomic) IBOutlet UIView *statusView;
+
+@property (weak, nonatomic) IBOutlet UIImageView *studentAvatar;
+
+@property (weak, nonatomic) IBOutlet UILabel *tipsLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *referrerLabel;
+
+@property (weak, nonatomic) IBOutlet UIImageView *qrCodeView;
+
+@property (weak, nonatomic) IBOutlet UIView *referrerView;
+
+@property (nonatomic, copy) ShareCallback callback;
+
+@end
+
+@implementation ShareLiveDisplayView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+//    [self addGesture];
+    CAGradientLayer *layer = [self createGradientLayerFromColor:HexRGB(0xFF598E) startPoint:CGPointMake(0.5, 0) endColor:HexRGB(0xFD2D55) endPoint:CGPointMake(0.5, 1) bounds:CGRectMake(0, 0, 72, 24)];
+    layer.cornerRadius = 12.0f;
+    layer.masksToBounds = YES;
+    [self.statusView.layer addSublayer:layer];
+    
+    CAGradientLayer *referrerLayer = [self createGradientLayerFromColor:HexRGB(0xBAFFE7) startPoint:CGPointMake(1, 0.5) endColor:HexRGB(0xC0DCFF) endPoint:CGPointMake(0, 0.5) bounds:CGRectMake(0, 0, KPortraitWidth - 30, 58)];
+    referrerLayer.cornerRadius = 9.0f;
+    referrerLayer.masksToBounds = YES;
+    [self.referrerView.layer addSublayer:referrerLayer];
+    
+}
+
+- (void)addGesture {
+    UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] init];
+    [gesture addTarget:self action:@selector(hideView)];
+    [self addGestureRecognizer:gesture];
+}
+
++ (instancetype)shareInstance {
+    ShareLiveDisplayView *view = [[[NSBundle mainBundle] loadNibNamed:@"ShareLiveDisplayView" owner:nil options:nil] firstObject];
+    view.frame = CGRectMake(0, 0, KPortraitWidth, KPortraitHeight);
+    return view;
+}
+
+
+- (void)configWithTeacherAvatar:(NSString *)teacherAvatarUrl teacherName:(NSString *)teacherName qrUrl:(NSString *)qrUrl {
+    [self.teacherAvatar sd_setImageWithURL:[NSURL URLWithString:[teacherAvatarUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    UIImage *codeImage = [KSQRCreateManager createQRCodeWithUrl:qrUrl displayImage:nil scaleSize:89];
+    [self.qrCodeView setImage:codeImage];
+    self.tipsLabel.text = [NSString stringWithFormat:@"主讲人:%@", [NSString returnNoNullStringWithString:teacherName]];
+    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:UserDefault(AvatarUrlKey)] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    self.referrerLabel.text = [NSString stringWithFormat:@"%@ 为您推荐",[NSString returnNoNullStringWithString:UserDefault(NicknameKey)]];
+}
+
+- (void)shareActionCallback:(ShareCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (void)showShareView {
+    [[NSObject getKeyWindow] addSubview:self];
+}
+
+- (void)showShareViewInView:(UIView *)displayView {
+    if (!displayView) {
+        return;
+    }
+    [displayView addSubview:self];
+}
+
+- (void)hideView {
+    [self removeFromSuperview];
+}
+
+
+- (IBAction)saveImage:(id)sender {
+    if (self.callback) {
+        self.callback(SHARETYPE_SAVE);
+    }
+}
+
+- (IBAction)shareOutApp:(id)sender {
+    if (self.callback) {
+        self.callback(SHARETYPE_SHAREOUT);
+    }
+}
+
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
+    if ([touch.view isDescendantOfView:self.containerView]) {
+        return NO;
+    }
+    return YES;
+}
+
+- (CAGradientLayer *)createGradientLayerFromColor:(UIColor *)fromColor startPoint:(CGPoint)startPoint endColor:(UIColor *)endColor endPoint:(CGPoint)endPoint bounds:(CGRect)bounds {
+    CAGradientLayer *gradientLayer = [CAGradientLayer layer];
+    gradientLayer.colors = @[(__bridge id)fromColor.CGColor, (__bridge id)endColor.CGColor];
+    gradientLayer.startPoint = startPoint;
+    gradientLayer.endPoint = endPoint;
+    gradientLayer.frame = bounds;
+    gradientLayer.locations = @[@(0),@(1.0f)];
+    return gradientLayer;
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 318 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/ShareLiveView/ShareLiveDisplayView.xib

@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_0" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ShareLiveDisplayView">
+            <rect key="frame" x="0.0" y="0.0" width="390" height="857"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dPk-M9-h7x">
+                    <rect key="frame" x="20" y="121" width="350" height="456"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liveShare_bg" translatesAutoresizingMaskIntoConstraints="NO" id="ZXI-o3-8iz">
+                            <rect key="frame" x="0.0" y="0.0" width="350" height="367.66666666666669"/>
+                            <constraints>
+                                <constraint firstAttribute="width" secondItem="ZXI-o3-8iz" secondAttribute="height" multiplier="334:351" id="3Wa-sh-3eR"/>
+                            </constraints>
+                        </imageView>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="liveShare_tips" translatesAutoresizingMaskIntoConstraints="NO" id="7SP-qt-lbO">
+                            <rect key="frame" x="0.0" y="367.66666666666669" width="350" height="88.333333333333314"/>
+                            <constraints>
+                                <constraint firstAttribute="width" secondItem="7SP-qt-lbO" secondAttribute="height" multiplier="334:84" id="anx-OJ-sYZ"/>
+                            </constraints>
+                        </imageView>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="gFm-57-B1x">
+                            <rect key="frame" x="37" y="48" width="76" height="76"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="76" id="Lg5-8z-q88"/>
+                                <constraint firstAttribute="height" constant="76" id="f3D-G5-6MI"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="38"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                    <real key="value" value="2"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                    <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </imageView>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TiG-81-zIB">
+                            <rect key="frame" x="39" y="112" width="72" height="24"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9ry-ZR-Zzs">
+                                    <rect key="frame" x="0.0" y="0.0" width="72" height="24"/>
+                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                </view>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="live_status" translatesAutoresizingMaskIntoConstraints="NO" id="fHs-gE-RwW">
+                                    <rect key="frame" x="10" y="7" width="10" height="10"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="10" id="TOR-ca-LaI"/>
+                                        <constraint firstAttribute="height" constant="10" id="bSW-oW-dL7"/>
+                                    </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="gwb-vF-L9p">
+                                    <rect key="frame" x="27" y="4.6666666666666572" width="37" height="15"/>
+                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
+                                    <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="9ry-ZR-Zzs" firstAttribute="top" secondItem="TiG-81-zIB" secondAttribute="top" id="6aC-Xa-zEO"/>
+                                <constraint firstItem="gwb-vF-L9p" firstAttribute="centerY" secondItem="fHs-gE-RwW" secondAttribute="centerY" id="EOg-t4-g5r"/>
+                                <constraint firstItem="9ry-ZR-Zzs" firstAttribute="leading" secondItem="TiG-81-zIB" secondAttribute="leading" id="Gm1-Tw-wNn"/>
+                                <constraint firstAttribute="trailing" secondItem="9ry-ZR-Zzs" secondAttribute="trailing" id="I9d-li-iaV"/>
+                                <constraint firstAttribute="height" constant="24" id="QOl-y5-igC"/>
+                                <constraint firstItem="gwb-vF-L9p" firstAttribute="leading" secondItem="fHs-gE-RwW" secondAttribute="trailing" constant="7" id="Tnb-xo-dIj"/>
+                                <constraint firstAttribute="width" constant="72" id="hH1-vO-CEk"/>
+                                <constraint firstItem="fHs-gE-RwW" firstAttribute="centerY" secondItem="TiG-81-zIB" secondAttribute="centerY" id="hXh-4k-med"/>
+                                <constraint firstItem="fHs-gE-RwW" firstAttribute="leading" secondItem="TiG-81-zIB" secondAttribute="leading" constant="10" id="muK-uv-nI0"/>
+                                <constraint firstAttribute="bottom" secondItem="9ry-ZR-Zzs" secondAttribute="bottom" id="rXy-hy-Mhy"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MS4-RD-vny">
+                            <rect key="frame" x="15" y="268.66666666666669" width="89" height="89"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3F2-yr-cpH">
+                                    <rect key="frame" x="0.0" y="0.0" width="89" height="89"/>
+                                </imageView>
+                            </subviews>
+                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="89" id="0cx-pV-Vh9"/>
+                                <constraint firstAttribute="height" constant="89" id="0iB-ug-O7K"/>
+                                <constraint firstItem="3F2-yr-cpH" firstAttribute="leading" secondItem="MS4-RD-vny" secondAttribute="leading" id="28Q-s3-F7Y"/>
+                                <constraint firstAttribute="trailing" secondItem="3F2-yr-cpH" secondAttribute="trailing" id="3AL-KW-xHV"/>
+                                <constraint firstItem="3F2-yr-cpH" firstAttribute="top" secondItem="MS4-RD-vny" secondAttribute="top" id="PG6-DU-uUg"/>
+                                <constraint firstAttribute="bottom" secondItem="3F2-yr-cpH" secondAttribute="bottom" id="kOo-GP-BRM"/>
+                            </constraints>
+                        </view>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rs8-ys-csH">
+                            <rect key="frame" x="129" y="272.66666666666669" width="205" height="34"/>
+                            <attributedString key="attributedText">
+                                <fragment content="温馨提示:保存图片到相册或长按识别二维码进入查看喔~">
+                                    <attributes>
+                                        <color key="NSColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <font key="NSFont" size="12" name=".PingFangSC-Regular"/>
+                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="5" tighteningFactorForTruncation="0.0"/>
+                                    </attributes>
+                                </fragment>
+                            </attributedString>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="share_logo" translatesAutoresizingMaskIntoConstraints="NO" id="0hL-ve-Mgh">
+                            <rect key="frame" x="129" y="312.66666666666669" width="71" height="20"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="20" id="IOv-pv-UF4"/>
+                                <constraint firstAttribute="width" constant="71" id="n3Z-M2-OPm"/>
+                            </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="FFG-83-ZxA">
+                            <rect key="frame" x="129" y="336.66666666666669" width="172" height="17"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="17" id="Q7Q-24-Ug9"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ykj-nF-SKf">
+                            <rect key="frame" x="15" y="193.66666666666669" width="320" height="58"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XJB-sa-Gfs">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="58"/>
+                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                </view>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="bxV-PM-Ij0">
+                                    <rect key="frame" x="12" y="11" width="36" height="36"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="36" id="9Nv-7W-Gj7"/>
+                                        <constraint firstAttribute="width" constant="36" id="Qwv-by-0FE"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                            <real key="value" value="18"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                            <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                            <real key="value" value="1"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="快进入达人的直播间一起围观~" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HwK-8P-Jtb">
+                                    <rect key="frame" x="58" y="9" width="250" height="20"/>
+                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    <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="4Mn-fi-jz6">
+                                    <rect key="frame" x="58" y="33" width="49.333333333333343" height="15"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="HwK-8P-Jtb" firstAttribute="top" secondItem="bxV-PM-Ij0" secondAttribute="top" constant="-2" id="4TF-Hm-LXx"/>
+                                <constraint firstItem="bxV-PM-Ij0" firstAttribute="centerY" secondItem="Ykj-nF-SKf" secondAttribute="centerY" id="8Ap-8a-raq"/>
+                                <constraint firstItem="HwK-8P-Jtb" firstAttribute="leading" secondItem="bxV-PM-Ij0" secondAttribute="trailing" constant="10" id="Fy3-70-7pK"/>
+                                <constraint firstItem="bxV-PM-Ij0" firstAttribute="leading" secondItem="Ykj-nF-SKf" secondAttribute="leading" constant="12" id="Hpe-BC-69p"/>
+                                <constraint firstAttribute="height" constant="58" id="IwJ-vc-xCM"/>
+                                <constraint firstItem="XJB-sa-Gfs" firstAttribute="leading" secondItem="Ykj-nF-SKf" secondAttribute="leading" id="Ng5-Wp-lBi"/>
+                                <constraint firstAttribute="bottom" secondItem="XJB-sa-Gfs" secondAttribute="bottom" id="Tnp-4w-kDv"/>
+                                <constraint firstAttribute="trailing" secondItem="XJB-sa-Gfs" secondAttribute="trailing" id="Zfm-Ia-LWu"/>
+                                <constraint firstAttribute="trailing" secondItem="HwK-8P-Jtb" secondAttribute="trailing" constant="12" id="fjX-38-xzV"/>
+                                <constraint firstItem="XJB-sa-Gfs" firstAttribute="top" secondItem="Ykj-nF-SKf" secondAttribute="top" id="hdm-p1-Ntt"/>
+                                <constraint firstItem="4Mn-fi-jz6" firstAttribute="leading" secondItem="HwK-8P-Jtb" secondAttribute="leading" id="uJd-Bi-Nnd"/>
+                                <constraint firstItem="4Mn-fi-jz6" firstAttribute="bottom" secondItem="bxV-PM-Ij0" secondAttribute="bottom" constant="1" id="znw-4K-NJI"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="9"/>
+                                </userDefinedRuntimeAttribute>
+                            </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="njD-0Z-9Q2">
+                            <rect key="frame" x="22" y="152" width="65.333333333333329" height="22"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="22" id="goz-4P-xae"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstAttribute="trailing" secondItem="Rs8-ys-csH" secondAttribute="trailing" constant="16" id="0fd-d8-ZEA"/>
+                        <constraint firstItem="ZXI-o3-8iz" firstAttribute="leading" secondItem="dPk-M9-h7x" secondAttribute="leading" id="4rc-is-NMr"/>
+                        <constraint firstItem="FFG-83-ZxA" firstAttribute="leading" secondItem="0hL-ve-Mgh" secondAttribute="leading" id="6EY-e0-ylM"/>
+                        <constraint firstItem="TiG-81-zIB" firstAttribute="centerX" secondItem="gFm-57-B1x" secondAttribute="centerX" id="Cmg-lE-xqi"/>
+                        <constraint firstItem="7SP-qt-lbO" firstAttribute="top" secondItem="ZXI-o3-8iz" secondAttribute="bottom" id="GRv-GQ-pJ1"/>
+                        <constraint firstItem="FFG-83-ZxA" firstAttribute="bottom" secondItem="MS4-RD-vny" secondAttribute="bottom" constant="-4" id="Had-7H-21G"/>
+                        <constraint firstItem="MS4-RD-vny" firstAttribute="top" secondItem="Ykj-nF-SKf" secondAttribute="bottom" constant="17" id="Hfu-Ei-CLT"/>
+                        <constraint firstItem="gFm-57-B1x" firstAttribute="top" secondItem="dPk-M9-h7x" secondAttribute="top" constant="48" id="Kgv-IX-WRb"/>
+                        <constraint firstItem="gFm-57-B1x" firstAttribute="leading" secondItem="dPk-M9-h7x" secondAttribute="leading" constant="37" id="Mcz-eo-mL7"/>
+                        <constraint firstItem="ZXI-o3-8iz" firstAttribute="top" secondItem="dPk-M9-h7x" secondAttribute="top" id="Q6C-cv-Lkg"/>
+                        <constraint firstItem="FFG-83-ZxA" firstAttribute="top" secondItem="0hL-ve-Mgh" secondAttribute="bottom" constant="4" id="R6h-0R-OZM"/>
+                        <constraint firstItem="njD-0Z-9Q2" firstAttribute="top" secondItem="TiG-81-zIB" secondAttribute="bottom" constant="16" id="RWy-PB-o3o"/>
+                        <constraint firstItem="Rs8-ys-csH" firstAttribute="top" secondItem="MS4-RD-vny" secondAttribute="top" constant="4" id="WMh-zq-ANj"/>
+                        <constraint firstItem="0hL-ve-Mgh" firstAttribute="leading" secondItem="Rs8-ys-csH" secondAttribute="leading" id="ZOb-qX-LlO"/>
+                        <constraint firstItem="7SP-qt-lbO" firstAttribute="leading" secondItem="dPk-M9-h7x" secondAttribute="leading" id="aVw-rN-OsL"/>
+                        <constraint firstItem="TiG-81-zIB" firstAttribute="centerY" secondItem="gFm-57-B1x" secondAttribute="bottom" id="bbF-eT-jgc"/>
+                        <constraint firstAttribute="trailing" secondItem="7SP-qt-lbO" secondAttribute="trailing" id="eKb-Xe-cB3"/>
+                        <constraint firstItem="MS4-RD-vny" firstAttribute="leading" secondItem="dPk-M9-h7x" secondAttribute="leading" constant="15" id="hsp-CI-Tes"/>
+                        <constraint firstAttribute="trailing" secondItem="ZXI-o3-8iz" secondAttribute="trailing" id="kRl-7f-iLg"/>
+                        <constraint firstItem="Ykj-nF-SKf" firstAttribute="leading" secondItem="dPk-M9-h7x" secondAttribute="leading" constant="15" id="kXS-RA-Cmd"/>
+                        <constraint firstItem="0hL-ve-Mgh" firstAttribute="top" secondItem="Rs8-ys-csH" secondAttribute="bottom" constant="6" id="kdk-eY-rQZ"/>
+                        <constraint firstItem="njD-0Z-9Q2" firstAttribute="leading" secondItem="dPk-M9-h7x" secondAttribute="leading" constant="22" id="nEA-GP-LqB"/>
+                        <constraint firstAttribute="trailing" secondItem="Ykj-nF-SKf" secondAttribute="trailing" constant="15" id="qWV-8A-iXS"/>
+                        <constraint firstAttribute="bottom" secondItem="7SP-qt-lbO" secondAttribute="bottom" id="rL1-Mx-Xfu"/>
+                        <constraint firstItem="Rs8-ys-csH" firstAttribute="leading" secondItem="MS4-RD-vny" secondAttribute="trailing" constant="25" id="t51-xJ-bai"/>
+                        <constraint firstItem="MS4-RD-vny" firstAttribute="bottom" secondItem="ZXI-o3-8iz" secondAttribute="bottom" constant="-10" id="ziW-VA-h1Q"/>
+                    </constraints>
+                </view>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FUo-ls-r6i">
+                    <rect key="frame" x="35" y="647" width="156.66666666666666" height="44"/>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="27X-w9-2vX"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                    <state key="normal" title="保存图片">
+                        <color key="titleColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </state>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="22"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                            <real key="value" value="1"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                            <color key="value" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                    <connections>
+                        <action selector="saveImage:" destination="iN0-l3-epB" eventType="touchUpInside" id="zl4-xM-9tC"/>
+                    </connections>
+                </button>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FyU-SX-9Wa">
+                    <rect key="frame" x="198.66666666666663" y="647" width="156.33333333333337" height="44"/>
+                    <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="dwY-vd-ezO"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                    <state key="normal" title="立即分享"/>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="22"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                    <connections>
+                        <action selector="shareOutApp:" destination="iN0-l3-epB" eventType="touchUpInside" id="RDb-rh-SPh"/>
+                    </connections>
+                </button>
+            </subviews>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="FyU-SX-9Wa" firstAttribute="top" secondItem="dPk-M9-h7x" secondAttribute="bottom" constant="70" id="00x-EN-gq7"/>
+                <constraint firstItem="FUo-ls-r6i" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="35" id="1a8-Ms-rbo"/>
+                <constraint firstItem="dPk-M9-h7x" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="3UN-uk-UwC"/>
+                <constraint firstItem="dPk-M9-h7x" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="121" id="HDZ-dv-9sY"/>
+                <constraint firstItem="FyU-SX-9Wa" firstAttribute="width" secondItem="FUo-ls-r6i" secondAttribute="width" id="TxA-R5-sF7"/>
+                <constraint firstAttribute="trailing" secondItem="FyU-SX-9Wa" secondAttribute="trailing" constant="35" id="XaO-sf-98o"/>
+                <constraint firstItem="FyU-SX-9Wa" firstAttribute="bottom" secondItem="FUo-ls-r6i" secondAttribute="bottom" id="eDu-4b-8n0"/>
+                <constraint firstItem="FyU-SX-9Wa" firstAttribute="leading" secondItem="FUo-ls-r6i" secondAttribute="trailing" constant="7" id="f4a-Av-Y0n"/>
+                <constraint firstItem="dPk-M9-h7x" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="vxL-gL-4IA"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="containerView" destination="dPk-M9-h7x" id="s0c-A0-wKx"/>
+                <outlet property="qrCodeView" destination="3F2-yr-cpH" id="Kh1-Od-djh"/>
+                <outlet property="referrerLabel" destination="4Mn-fi-jz6" id="NoD-gB-bed"/>
+                <outlet property="referrerView" destination="XJB-sa-Gfs" id="HPD-CL-zVF"/>
+                <outlet property="statusView" destination="9ry-ZR-Zzs" id="vhF-w5-e9G"/>
+                <outlet property="studentAvatar" destination="bxV-PM-Ij0" id="DNH-ol-ihT"/>
+                <outlet property="teacherAvatar" destination="gFm-57-B1x" id="xh5-ol-Lsv"/>
+                <outlet property="tipsLabel" destination="njD-0Z-9Q2" id="kY9-Go-kO5"/>
+            </connections>
+            <point key="canvasLocation" x="110.76923076923076" y="208.64928909952604"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="liveShare_bg" width="334" height="351"/>
+        <image name="liveShare_tips" width="334" height="84"/>
+        <image name="live_status" width="10" height="10"/>
+        <image name="share_logo" width="71" height="20"/>
+        <image name="user_default_avatal" width="52" height="52"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 7 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m

@@ -247,6 +247,13 @@
             [self.navigationController pushViewController:webCtrl animated:YES];
         }
             break;
+        case MINEVIEWTYPE_CONTACT:
+        {
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/contactus"];
+            [self.navigationController pushViewController:webCtrl animated:YES];
+        }
+            break;
         default:
             break;
     }

+ 16 - 8
KulexiuForStudent/KulexiuForStudent/Module/Mine/Scan/Controller/KSScanViewController.m

@@ -36,11 +36,22 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     self.ks_prefersNavigationBarHidden = YES;
+    self.view.backgroundColor = HexRGB(0x000000);
+    [self configUI];
 }
 
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
-    [self configUI];
+    [self startScan];
+}
+
+- (void)startScan {
+    MJWeakSelf;
+    [self.scanManager startScanningQRCodeWithInView:self.view scanView:self.scanView resultCallback:^(NSString *result) {
+        [weakSelf.scanManager stopScanning];
+        [weakSelf dealWithCheckSource:result];
+        NSLog(@"%@",result);
+    }];
 }
 
 - (void)configUI {
@@ -84,14 +95,9 @@
     msg.font = [UIFont systemFontOfSize:16];
     msg.text = @"请对准需要识别的二维码。";
     [self.view addSubview:msg];
-    MJWeakSelf;
-    [self.scanManager startScanningQRCodeWithInView:self.view scanView:self.scanView resultCallback:^(NSString *result) {
-        [weakSelf.scanManager stopScanning];
-        [weakSelf dealWithCheckSource:result];
-        NSLog(@"%@",result);
-    }];
 }
 
+
 - (void)dealWithCheckSource:(NSString *)result {
     if (result) {
         if ([result containsString:hostURL]) {
@@ -179,7 +185,9 @@
     self.mediaManager.needCropImage = NO;
     MJWeakSelf;
     [self.mediaManager noAlertCallback:^(NSString * _Nullable videoUrl, NSMutableArray * _Nullable imageArray, NSMutableArray * _Nullable imageAsset) {
-        [weakSelf scanImage:[imageArray lastObject]];
+        dispatch_main_async_safe(^{
+            [weakSelf scanImage:[imageArray lastObject]];
+        });
     }];
     [self.mediaManager pushImagePickerController];
 }

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.h

@@ -24,7 +24,8 @@ typedef NS_ENUM(NSInteger, MINEVIEWTYPE) {
     MINEVIEWTYPE_FOLLOW, // 我的关注
     MINEVIEWTYPE_USER,
     MINEVIEWTYPE_FEEDBACK, // 反馈
-    MINEVIEWTYPE_TICKET
+    MINEVIEWTYPE_TICKET,
+    MINEVIEWTYPE_CONTACT = 1017, // 联系我们
 };
 typedef void(^MineViewCallback)(MINEVIEWTYPE type);
 

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.m

@@ -129,7 +129,7 @@
 }
 
 - (CGFloat)getViewHeight {
-    return 80 + 15 + (self.memberViewHeight.constant) / 2 + 10 + 80 + 12 + (136 + 12) * 4;
+    return 80 + 15 + (self.memberViewHeight.constant) / 2 + 10 + 80 + 12 + (136 + 12) * 3 + (192 + 12);
 }
 
 - (IBAction)modifyUser:(id)sender {

+ 38 - 4
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.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="21225" 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="21207"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -754,7 +754,7 @@
                     </userDefinedRuntimeAttributes>
                 </view>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qXK-bw-j5E">
-                    <rect key="frame" x="14" y="682" width="386" height="136"/>
+                    <rect key="frame" x="14" y="682" width="386" height="192"/>
                     <subviews>
                         <view tag="1010" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iFf-ti-ghK">
                             <rect key="frame" x="0.0" y="15" width="386" height="50"/>
@@ -808,6 +808,32 @@
                                 <outletCollection property="gestureRecognizers" destination="JoI-s0-EzE" appends="YES" id="ioW-nX-15n"/>
                             </connections>
                         </view>
+                        <view tag="1017" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DzF-lL-e7x">
+                            <rect key="frame" x="0.0" y="127" width="386" height="50"/>
+                            <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="联系我们" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cZ0-wT-OCD">
+                                    <rect key="frame" x="15" y="15.5" width="65.5" height="19.5"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                    <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_next" translatesAutoresizingMaskIntoConstraints="NO" id="0cU-aX-ft9">
+                                    <rect key="frame" x="365" y="17.5" width="8" height="15"/>
+                                </imageView>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <gestureRecognizers/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="50" id="DBo-WN-34x"/>
+                                <constraint firstItem="cZ0-wT-OCD" firstAttribute="centerY" secondItem="DzF-lL-e7x" secondAttribute="centerY" id="FC7-lJ-Phi"/>
+                                <constraint firstAttribute="trailing" secondItem="0cU-aX-ft9" secondAttribute="trailing" constant="13" id="Wzq-8s-YDa"/>
+                                <constraint firstItem="cZ0-wT-OCD" firstAttribute="leading" secondItem="DzF-lL-e7x" secondAttribute="leading" constant="15" id="o5U-zq-MUR"/>
+                                <constraint firstItem="0cU-aX-ft9" firstAttribute="centerY" secondItem="DzF-lL-e7x" secondAttribute="centerY" id="zjj-Yp-4j8"/>
+                            </constraints>
+                            <connections>
+                                <outletCollection property="gestureRecognizers" destination="JfQ-Ny-0H1" appends="YES" id="Znv-O3-wbH"/>
+                            </connections>
+                        </view>
                     </subviews>
                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
@@ -815,8 +841,11 @@
                         <constraint firstItem="iFf-ti-ghK" firstAttribute="top" secondItem="qXK-bw-j5E" secondAttribute="top" constant="15" id="Di9-N3-nAP"/>
                         <constraint firstItem="iFf-ti-ghK" firstAttribute="leading" secondItem="qXK-bw-j5E" secondAttribute="leading" id="EGu-bH-uwt"/>
                         <constraint firstItem="qjh-zg-Nt5" firstAttribute="leading" secondItem="qXK-bw-j5E" secondAttribute="leading" id="I4J-re-P3N"/>
-                        <constraint firstAttribute="height" constant="136" id="dRC-An-6Mi"/>
+                        <constraint firstAttribute="trailing" secondItem="DzF-lL-e7x" secondAttribute="trailing" id="MfX-mS-gFy"/>
+                        <constraint firstItem="DzF-lL-e7x" firstAttribute="leading" secondItem="qXK-bw-j5E" secondAttribute="leading" id="Mia-Xj-XHx"/>
+                        <constraint firstAttribute="height" constant="192" id="dRC-An-6Mi"/>
                         <constraint firstAttribute="trailing" secondItem="qjh-zg-Nt5" secondAttribute="trailing" id="hF6-gi-8iW"/>
+                        <constraint firstItem="DzF-lL-e7x" firstAttribute="top" secondItem="qjh-zg-Nt5" secondAttribute="bottom" constant="6" id="tlj-W2-gUr"/>
                         <constraint firstItem="qjh-zg-Nt5" firstAttribute="top" secondItem="iFf-ti-ghK" secondAttribute="bottom" constant="6" id="x3c-7Y-VGz"/>
                     </constraints>
                     <userDefinedRuntimeAttributes>
@@ -953,6 +982,11 @@
                 <action selector="followTeacher:" destination="iN0-l3-epB" id="gJn-Da-SEw"/>
             </connections>
         </tapGestureRecognizer>
+        <tapGestureRecognizer id="JfQ-Ny-0H1">
+            <connections>
+                <action selector="clickAction:" destination="iN0-l3-epB" id="qSk-kf-Kbw"/>
+            </connections>
+        </tapGestureRecognizer>
     </objects>
     <resources>
         <image name="member_bg" width="334" height="82"/>

+ 0 - 1
KulexiuForStudent/KulexiuForStudent/Module/Widget/View/WidgetSpeedView.m

@@ -82,7 +82,6 @@
     _lastPointAngle = curentPointAngle;
     if (angle > 0) {
         if (self.delegate && [self.delegate respondsToSelector:@selector(changeSpeedWithIsAdd:speed:)]) {
-
             [self.delegate changeSpeedWithIsAdd:YES speed:MIN(1, MAX(angle *2, 1))];
         }
     }else {