Steven 2 years ago
parent
commit
dc6bf3172e
51 changed files with 1477 additions and 142 deletions
  1. 3 0
      KulexiuForStudent/Gemfile
  2. 218 0
      KulexiuForStudent/Gemfile.lock
  3. 69 9
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  4. BIN
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  5. 32 64
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  6. 50 0
      KulexiuForStudent/KulexiuForStudent/AppDelegate.m
  7. 23 13
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m
  8. 13 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h
  9. 14 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  10. 21 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.h
  11. 81 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.m
  12. 148 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.xib
  13. 4 13
      KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch
  14. 1 1
      KulexiuForStudent/KulexiuForStudent/Common/Define/UserKeyHeader.h
  15. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatAddressViewController.m
  16. 3 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatViewController.m
  17. 4 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupSettingViewController.m
  18. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupSettingBodyView.xib
  19. 13 3
      KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/Model/GroupNoticeModel.m
  20. 3 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/View/GroupNoticeCell.m
  21. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/View/GroupNoticeCell.xib
  22. 0 1
      KulexiuForStudent/KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m
  23. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m
  24. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.h
  25. 5 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m
  26. 18 11
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m
  27. 5 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/View/LoginBodyView.m
  28. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/View/PasswordBodyView.m
  29. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/View/VefiBodyView.m
  30. 2 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Controller/MineViewController.m
  31. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Controller/HomeworkDetailViewController.m
  32. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/View/HomeworkListCell.m
  33. 28 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/SettingViewController.m
  34. 16 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.h
  35. 202 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m
  36. 29 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.h
  37. 89 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.m
  38. 162 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.xib
  39. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.h
  40. 12 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.m
  41. 73 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.xib
  42. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineNavView.xib
  43. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/Chat/InputBar/InputBarControl.m
  44. 7 7
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/Chat/MessageManager/MessageCell/MessageCell.m
  45. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomService.m
  46. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Message/MemberChangeMessage.h
  47. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Message/MemberChangeMessage.m
  48. 6 0
      KulexiuForStudent/fastlane/Appfile
  49. 46 0
      KulexiuForStudent/fastlane/Fastfile
  50. 32 0
      KulexiuForStudent/fastlane/README.md
  51. 19 0
      KulexiuForStudent/fastlane/report.xml

+ 3 - 0
KulexiuForStudent/Gemfile

@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem "fastlane"

+ 218 - 0
KulexiuForStudent/Gemfile.lock

@@ -0,0 +1,218 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    CFPropertyList (3.0.5)
+      rexml
+    addressable (2.8.0)
+      public_suffix (>= 2.0.2, < 5.0)
+    artifactory (3.0.15)
+    atomos (0.1.3)
+    aws-eventstream (1.2.0)
+    aws-partitions (1.603.0)
+    aws-sdk-core (3.131.2)
+      aws-eventstream (~> 1, >= 1.0.2)
+      aws-partitions (~> 1, >= 1.525.0)
+      aws-sigv4 (~> 1.1)
+      jmespath (~> 1, >= 1.6.1)
+    aws-sdk-kms (1.57.0)
+      aws-sdk-core (~> 3, >= 3.127.0)
+      aws-sigv4 (~> 1.1)
+    aws-sdk-s3 (1.114.0)
+      aws-sdk-core (~> 3, >= 3.127.0)
+      aws-sdk-kms (~> 1)
+      aws-sigv4 (~> 1.4)
+    aws-sigv4 (1.5.0)
+      aws-eventstream (~> 1, >= 1.0.2)
+    babosa (1.0.4)
+    claide (1.1.0)
+    colored (1.2)
+    colored2 (3.1.2)
+    commander (4.6.0)
+      highline (~> 2.0.0)
+    declarative (0.0.20)
+    digest-crc (0.6.4)
+      rake (>= 12.0.0, < 14.0.0)
+    domain_name (0.5.20190701)
+      unf (>= 0.0.5, < 1.0.0)
+    dotenv (2.7.6)
+    emoji_regex (3.2.3)
+    excon (0.92.3)
+    faraday (1.10.0)
+      faraday-em_http (~> 1.0)
+      faraday-em_synchrony (~> 1.0)
+      faraday-excon (~> 1.1)
+      faraday-httpclient (~> 1.0)
+      faraday-multipart (~> 1.0)
+      faraday-net_http (~> 1.0)
+      faraday-net_http_persistent (~> 1.0)
+      faraday-patron (~> 1.0)
+      faraday-rack (~> 1.0)
+      faraday-retry (~> 1.0)
+      ruby2_keywords (>= 0.0.4)
+    faraday-cookie_jar (0.0.7)
+      faraday (>= 0.8.0)
+      http-cookie (~> 1.0.0)
+    faraday-em_http (1.0.0)
+    faraday-em_synchrony (1.0.0)
+    faraday-excon (1.1.0)
+    faraday-httpclient (1.0.1)
+    faraday-multipart (1.0.4)
+      multipart-post (~> 2)
+    faraday-net_http (1.0.1)
+    faraday-net_http_persistent (1.2.0)
+    faraday-patron (1.0.0)
+    faraday-rack (1.0.0)
+    faraday-retry (1.0.3)
+    faraday_middleware (1.2.0)
+      faraday (~> 1.0)
+    fastimage (2.2.6)
+    fastlane (2.207.0)
+      CFPropertyList (>= 2.3, < 4.0.0)
+      addressable (>= 2.8, < 3.0.0)
+      artifactory (~> 3.0)
+      aws-sdk-s3 (~> 1.0)
+      babosa (>= 1.0.3, < 2.0.0)
+      bundler (>= 1.12.0, < 3.0.0)
+      colored
+      commander (~> 4.6)
+      dotenv (>= 2.1.1, < 3.0.0)
+      emoji_regex (>= 0.1, < 4.0)
+      excon (>= 0.71.0, < 1.0.0)
+      faraday (~> 1.0)
+      faraday-cookie_jar (~> 0.0.6)
+      faraday_middleware (~> 1.0)
+      fastimage (>= 2.1.0, < 3.0.0)
+      gh_inspector (>= 1.1.2, < 2.0.0)
+      google-apis-androidpublisher_v3 (~> 0.3)
+      google-apis-playcustomapp_v1 (~> 0.1)
+      google-cloud-storage (~> 1.31)
+      highline (~> 2.0)
+      json (< 3.0.0)
+      jwt (>= 2.1.0, < 3)
+      mini_magick (>= 4.9.4, < 5.0.0)
+      multipart-post (~> 2.0.0)
+      naturally (~> 2.2)
+      optparse (~> 0.1.1)
+      plist (>= 3.1.0, < 4.0.0)
+      rubyzip (>= 2.0.0, < 3.0.0)
+      security (= 0.1.3)
+      simctl (~> 1.6.3)
+      terminal-notifier (>= 2.0.0, < 3.0.0)
+      terminal-table (>= 1.4.5, < 2.0.0)
+      tty-screen (>= 0.6.3, < 1.0.0)
+      tty-spinner (>= 0.8.0, < 1.0.0)
+      word_wrap (~> 1.0.0)
+      xcodeproj (>= 1.13.0, < 2.0.0)
+      xcpretty (~> 0.3.0)
+      xcpretty-travis-formatter (>= 0.0.3)
+    gh_inspector (1.1.3)
+    google-apis-androidpublisher_v3 (0.24.0)
+      google-apis-core (>= 0.7, < 2.a)
+    google-apis-core (0.7.0)
+      addressable (~> 2.5, >= 2.5.1)
+      googleauth (>= 0.16.2, < 2.a)
+      httpclient (>= 2.8.1, < 3.a)
+      mini_mime (~> 1.0)
+      representable (~> 3.0)
+      retriable (>= 2.0, < 4.a)
+      rexml
+      webrick
+    google-apis-iamcredentials_v1 (0.13.0)
+      google-apis-core (>= 0.7, < 2.a)
+    google-apis-playcustomapp_v1 (0.10.0)
+      google-apis-core (>= 0.7, < 2.a)
+    google-apis-storage_v1 (0.17.0)
+      google-apis-core (>= 0.7, < 2.a)
+    google-cloud-core (1.6.0)
+      google-cloud-env (~> 1.0)
+      google-cloud-errors (~> 1.0)
+    google-cloud-env (1.6.0)
+      faraday (>= 0.17.3, < 3.0)
+    google-cloud-errors (1.2.0)
+    google-cloud-storage (1.37.0)
+      addressable (~> 2.8)
+      digest-crc (~> 0.4)
+      google-apis-iamcredentials_v1 (~> 0.1)
+      google-apis-storage_v1 (~> 0.1)
+      google-cloud-core (~> 1.6)
+      googleauth (>= 0.16.2, < 2.a)
+      mini_mime (~> 1.0)
+    googleauth (1.2.0)
+      faraday (>= 0.17.3, < 3.a)
+      jwt (>= 1.4, < 3.0)
+      memoist (~> 0.16)
+      multi_json (~> 1.11)
+      os (>= 0.9, < 2.0)
+      signet (>= 0.16, < 2.a)
+    highline (2.0.3)
+    http-cookie (1.0.5)
+      domain_name (~> 0.5)
+    httpclient (2.8.3)
+    jmespath (1.6.1)
+    json (2.6.2)
+    jwt (2.4.1)
+    memoist (0.16.2)
+    mini_magick (4.11.0)
+    mini_mime (1.1.2)
+    multi_json (1.15.0)
+    multipart-post (2.0.0)
+    nanaimo (0.3.0)
+    naturally (2.2.1)
+    optparse (0.1.1)
+    os (1.1.4)
+    plist (3.6.0)
+    public_suffix (4.0.7)
+    rake (13.0.6)
+    representable (3.2.0)
+      declarative (< 0.1.0)
+      trailblazer-option (>= 0.1.1, < 0.2.0)
+      uber (< 0.2.0)
+    retriable (3.1.2)
+    rexml (3.2.5)
+    rouge (2.0.7)
+    ruby2_keywords (0.0.5)
+    rubyzip (2.3.2)
+    security (0.1.3)
+    signet (0.17.0)
+      addressable (~> 2.8)
+      faraday (>= 0.17.5, < 3.a)
+      jwt (>= 1.5, < 3.0)
+      multi_json (~> 1.10)
+    simctl (1.6.8)
+      CFPropertyList
+      naturally
+    terminal-notifier (2.0.0)
+    terminal-table (1.8.0)
+      unicode-display_width (~> 1.1, >= 1.1.1)
+    trailblazer-option (0.1.2)
+    tty-cursor (0.7.1)
+    tty-screen (0.8.1)
+    tty-spinner (0.9.3)
+      tty-cursor (~> 0.7)
+    uber (0.1.0)
+    unf (0.1.4)
+      unf_ext
+    unf_ext (0.0.8.2)
+    unicode-display_width (1.8.0)
+    webrick (1.7.0)
+    word_wrap (1.0.0)
+    xcodeproj (1.22.0)
+      CFPropertyList (>= 2.3.3, < 4.0)
+      atomos (~> 0.1.3)
+      claide (>= 1.0.2, < 2.0)
+      colored2 (~> 3.1)
+      nanaimo (~> 0.3.0)
+      rexml (~> 3.2.4)
+    xcpretty (0.3.0)
+      rouge (~> 2.0.7)
+    xcpretty-travis-formatter (1.0.1)
+      xcpretty (~> 0.2, >= 0.0.7)
+
+PLATFORMS
+  arm64-darwin-21
+
+DEPENDENCIES
+  fastlane
+
+BUNDLED WITH
+   2.3.11

+ 69 - 9
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -467,6 +467,11 @@
 		BC542E5D2840A60100633781 /* UserSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC542E5B2840A60000633781 /* UserSettingViewController.m */; };
 		BC542E612840A60E00633781 /* UseBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC542E5E2840A60D00633781 /* UseBodyView.m */; };
 		BC542E622840A60E00633781 /* UseBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC542E5F2840A60D00633781 /* UseBodyView.xib */; };
+		BC60E3CC287D552800B05441 /* AccountDeleteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC60E3C5287D552800B05441 /* AccountDeleteViewController.m */; };
+		BC60E3CD287D552800B05441 /* DeleteAccountBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC60E3C9287D552800B05441 /* DeleteAccountBodyView.m */; };
+		BC60E3CE287D552800B05441 /* DeleteAccountBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC60E3CB287D552800B05441 /* DeleteAccountBodyView.xib */; };
+		BC60E3D2287D592800B05441 /* KSPublicAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC60E3CF287D592800B05441 /* KSPublicAlertView.xib */; };
+		BC60E3D3287D592800B05441 /* KSPublicAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC60E3D1287D592800B05441 /* KSPublicAlertView.m */; };
 		BC76630E2827E48800C91A1D /* NotiferMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC76630C2827E48800C91A1D /* NotiferMessageModel.m */; };
 		BC7663152827E49900C91A1D /* NotiferHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC76630F2827E49800C91A1D /* NotiferHeadView.m */; };
 		BC7663162827E49900C91A1D /* NotiferHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC7663102827E49800C91A1D /* NotiferHeadView.xib */; };
@@ -1603,6 +1608,14 @@
 		BC542E5E2840A60D00633781 /* UseBodyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UseBodyView.m; sourceTree = "<group>"; };
 		BC542E5F2840A60D00633781 /* UseBodyView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UseBodyView.xib; sourceTree = "<group>"; };
 		BC542E602840A60D00633781 /* UseBodyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UseBodyView.h; sourceTree = "<group>"; };
+		BC60E3C5287D552800B05441 /* AccountDeleteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccountDeleteViewController.m; sourceTree = "<group>"; };
+		BC60E3C6287D552800B05441 /* AccountDeleteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccountDeleteViewController.h; sourceTree = "<group>"; };
+		BC60E3C9287D552800B05441 /* DeleteAccountBodyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeleteAccountBodyView.m; sourceTree = "<group>"; };
+		BC60E3CA287D552800B05441 /* DeleteAccountBodyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeleteAccountBodyView.h; sourceTree = "<group>"; };
+		BC60E3CB287D552800B05441 /* DeleteAccountBodyView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DeleteAccountBodyView.xib; sourceTree = "<group>"; };
+		BC60E3CF287D592800B05441 /* KSPublicAlertView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSPublicAlertView.xib; sourceTree = "<group>"; };
+		BC60E3D0287D592800B05441 /* KSPublicAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSPublicAlertView.h; sourceTree = "<group>"; };
+		BC60E3D1287D592800B05441 /* KSPublicAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSPublicAlertView.m; sourceTree = "<group>"; };
 		BC76630C2827E48800C91A1D /* NotiferMessageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotiferMessageModel.m; sourceTree = "<group>"; };
 		BC76630D2827E48800C91A1D /* NotiferMessageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotiferMessageModel.h; sourceTree = "<group>"; };
 		BC76630F2827E49800C91A1D /* NotiferHeadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotiferHeadView.m; sourceTree = "<group>"; };
@@ -2211,13 +2224,13 @@
 		2723B5E727F157D400E0B90B /* View */ = {
 			isa = PBXGroup;
 			children = (
+				2723B5F027F157D400E0B90B /* GroupNoticeCell.h */,
 				2723B5E827F157D400E0B90B /* GroupNoticeCell.m */,
-				2723B5E927F157D400E0B90B /* NoticeEditBodyView.h */,
-				2723B5EA27F157D400E0B90B /* NoticeEditBodyView.xib */,
+				2723B5F227F157D400E0B90B /* GroupNoticeCell.xib */,
 				2723B5EB27F157D400E0B90B /* LFPopupMenu */,
-				2723B5F027F157D400E0B90B /* GroupNoticeCell.h */,
+				2723B5E927F157D400E0B90B /* NoticeEditBodyView.h */,
 				2723B5F127F157D400E0B90B /* NoticeEditBodyView.m */,
-				2723B5F227F157D400E0B90B /* GroupNoticeCell.xib */,
+				2723B5EA27F157D400E0B90B /* NoticeEditBodyView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -3476,6 +3489,9 @@
 		2779350B27E324A40010E277 /* Base */ = {
 			isa = PBXGroup;
 			children = (
+				BC60E3D0287D592800B05441 /* KSPublicAlertView.h */,
+				BC60E3D1287D592800B05441 /* KSPublicAlertView.m */,
+				BC60E3CF287D592800B05441 /* KSPublicAlertView.xib */,
 				BCB9FA44286EDCD7005D766B /* KSTipsAlert.h */,
 				BCB9FA43286EDCD7005D766B /* KSTipsAlert.m */,
 				BCB9FA45286EDCD7005D766B /* KSTipsAlert.xib */,
@@ -3602,6 +3618,7 @@
 		27F9032327E87C2E00C08A19 /* Setting */ = {
 			isa = PBXGroup;
 			children = (
+				BC60E3C3287D552800B05441 /* DeleteAccount */,
 				27F9032427E87C2E00C08A19 /* Controller */,
 				27F9032827E87C2E00C08A19 /* View */,
 			);
@@ -3951,6 +3968,42 @@
 			path = View;
 			sourceTree = "<group>";
 		};
+		BC60E3C3287D552800B05441 /* DeleteAccount */ = {
+			isa = PBXGroup;
+			children = (
+				BC60E3C4287D552800B05441 /* Controller */,
+				BC60E3C7287D552800B05441 /* Model */,
+				BC60E3C8287D552800B05441 /* View */,
+			);
+			path = DeleteAccount;
+			sourceTree = "<group>";
+		};
+		BC60E3C4287D552800B05441 /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				BC60E3C5287D552800B05441 /* AccountDeleteViewController.m */,
+				BC60E3C6287D552800B05441 /* AccountDeleteViewController.h */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		BC60E3C7287D552800B05441 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		BC60E3C8287D552800B05441 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BC60E3C9287D552800B05441 /* DeleteAccountBodyView.m */,
+				BC60E3CA287D552800B05441 /* DeleteAccountBodyView.h */,
+				BC60E3CB287D552800B05441 /* DeleteAccountBodyView.xib */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		BC8A4545283DC33400094BBB /* CloudEngine */ = {
 			isa = PBXGroup;
 			children = (
@@ -4618,16 +4671,16 @@
 		BCB6349E27F6D2A200ACFDCF /* MessageCell */ = {
 			isa = PBXGroup;
 			children = (
-				BCB6349F27F6D2A200ACFDCF /* TextMessageCell.h */,
-				BCB634A027F6D2A200ACFDCF /* TimeStampCell.m */,
-				BCB634A127F6D2A200ACFDCF /* TipMessageCell.h */,
 				BCB634A227F6D2A200ACFDCF /* MessageBaseCell.h */,
+				BCB634A827F6D2A200ACFDCF /* MessageBaseCell.m */,
 				BCB634A327F6D2A200ACFDCF /* MessageCell.h */,
+				BCB634A727F6D2A200ACFDCF /* MessageCell.m */,
+				BCB6349F27F6D2A200ACFDCF /* TextMessageCell.h */,
 				BCB634A427F6D2A200ACFDCF /* TextMessageCell.m */,
 				BCB634A527F6D2A200ACFDCF /* TimeStampCell.h */,
+				BCB634A027F6D2A200ACFDCF /* TimeStampCell.m */,
+				BCB634A127F6D2A200ACFDCF /* TipMessageCell.h */,
 				BCB634A627F6D2A200ACFDCF /* TipMessageCell.m */,
-				BCB634A727F6D2A200ACFDCF /* MessageCell.m */,
-				BCB634A827F6D2A200ACFDCF /* MessageBaseCell.m */,
 			);
 			path = MessageCell;
 			sourceTree = "<group>";
@@ -5162,6 +5215,7 @@
 				275E8AB827E18F8B00DD3F6E /* LaunchScreen.storyboard in Resources */,
 				275FA1EF27E7351900CFEA2E /* KSUpdateAlert.xib in Resources */,
 				277935AF27E324A90010E277 /* mss_browseLoading@3x.png in Resources */,
+				BC60E3CE287D552800B05441 /* DeleteAccountBodyView.xib in Resources */,
 				BCB6359927F6D2AB00ACFDCF /* tick.wav in Resources */,
 				2779355727E324A70010E277 /* KSPremissionAlert.xib in Resources */,
 				2723B5C327F157B100E0B90B /* ChatNavView.xib in Resources */,
@@ -5264,6 +5318,7 @@
 				BC8A45A0283DC33400094BBB /* JudgePageView.xib in Resources */,
 				BC0212F827FC4A080040569F /* SubjectImageCell.xib in Resources */,
 				BC11921B280ED6A900A716F7 /* NewClassPopCell.xib in Resources */,
+				BC60E3D2287D592800B05441 /* KSPublicAlertView.xib in Resources */,
 				BCA353F12859BB2900377661 /* MusicRoomCourseCell.xib in Resources */,
 				2723B66E27F15CFC00E0B90B /* PhoneCheckBodyView.xib in Resources */,
 				BC119217280ED6A900A716F7 /* MyLessonSearchView.xib in Resources */,
@@ -5534,6 +5589,7 @@
 				BC8A45AA283DC33400094BBB /* TrackChooseView.m in Sources */,
 				BC8A45B2283DC33400094BBB /* CloudFeedbackView.m in Sources */,
 				BCB6355A27F6D2A300ACFDCF /* KSRemoteUserManager.m in Sources */,
+				BC60E3CD287D552800B05441 /* DeleteAccountBodyView.m in Sources */,
 				BC494A7C286958EC00CCD343 /* MusicRoomCourseInfoCell.m in Sources */,
 				BCB6347127F6D29600ACFDCF /* KSChatEmojiBoardView.m in Sources */,
 				2779354527E324A60010E277 /* UIImage+UIImageScale.m in Sources */,
@@ -5784,6 +5840,7 @@
 				2779356D27E324A70010E277 /* StoreShopCaterview.m in Sources */,
 				BC119267280FA92700A716F7 /* HomeworkDetailViewController.m in Sources */,
 				BCB6346127F6D29600ACFDCF /* KSChatroomMessageCenter.m in Sources */,
+				BC60E3CC287D552800B05441 /* AccountDeleteViewController.m in Sources */,
 				BC11925B280FA85300A716F7 /* HomeworkSortView.m in Sources */,
 				277935D327E324A90010E277 /* ALCalendarPicker.m in Sources */,
 				BC542E5828409EC900633781 /* InstrumentChooseCell.m in Sources */,
@@ -5925,6 +5982,7 @@
 				275FA23927E7356B00CFEA2E /* FirstSettingBodyView.m in Sources */,
 				BC7663172827E49900C91A1D /* NotiferMessageCell.m in Sources */,
 				BC8A45A7283DC33400094BBB /* CloudControlButton.m in Sources */,
+				BC60E3D3287D592800B05441 /* KSPublicAlertView.m in Sources */,
 				BCB6346527F6D29600ACFDCF /* KSLiveChatroomLike.m in Sources */,
 				BCB6356927F6D2A300ACFDCF /* TurnPageMessage.m in Sources */,
 				277935CA27E324A90010E277 /* TAAnimatedDotView.m in Sources */,
@@ -6230,6 +6288,7 @@
 				INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
+				INFOPLIST_KEY_UISupportsDocumentBrowser = YES;
 				INFOPLIST_KEY_UIUserInterfaceStyle = Light;
 				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
 				LD_RUNPATH_SEARCH_PATHS = (
@@ -6292,6 +6351,7 @@
 				INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
+				INFOPLIST_KEY_UISupportsDocumentBrowser = YES;
 				INFOPLIST_KEY_UIUserInterfaceStyle = Light;
 				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
 				LD_RUNPATH_SEARCH_PATHS = (

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


+ 32 - 64
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -23,22 +23,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "90870E90-A189-49CA-87A4-9BCE458CD721"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "494"
-            endingLineNumber = "494"
-            landmarkName = "-memberDidJoin:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "4CDCA58C-2D9F-498A-A1AA-B98063F02A40"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -46,8 +30,8 @@
             filePath = "KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1047"
-            endingLineNumber = "1047"
+            startingLineNumber = "1046"
+            endingLineNumber = "1046"
             landmarkName = "-noneDidDisplay"
             landmarkType = "7">
          </BreakpointContent>
@@ -62,8 +46,8 @@
             filePath = "KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1131"
-            endingLineNumber = "1131"
+            startingLineNumber = "1130"
+            endingLineNumber = "1130"
             landmarkName = "-didPublishStreams:"
             landmarkType = "7">
          </BreakpointContent>
@@ -110,8 +94,8 @@
             filePath = "KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1041"
-            endingLineNumber = "1041"
+            startingLineNumber = "1040"
+            endingLineNumber = "1040"
             landmarkName = "-teacherDidDisplay"
             landmarkType = "7">
          </BreakpointContent>
@@ -158,24 +142,8 @@
             filePath = "KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "974"
-            endingLineNumber = "974"
-            landmarkName = "-renderMainContainerView"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "9439F0CE-D0CC-4145-9CD6-1C6D2907C05A"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "994"
-            endingLineNumber = "994"
+            startingLineNumber = "973"
+            endingLineNumber = "973"
             landmarkName = "-renderMainContainerView"
             landmarkType = "7">
          </BreakpointContent>
@@ -215,80 +183,80 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "9E1D63F3-7998-44B3-96B9-8494D9F55DE6"
+            uuid = "042CD8D0-51BC-4B36-8962-88F4A3CC0D8E"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+            filePath = "KulexiuForStudent/Module/Course/Controller/CourseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "700"
-            endingLineNumber = "700"
-            landmarkName = "-updateVideoViewContainer"
+            startingLineNumber = "506"
+            endingLineNumber = "506"
+            landmarkName = "-chatAction:groupName:isGroup:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "AB4D8E92-B8FF-42F5-89A7-59D9EAA8E804"
+            uuid = "B4B7208F-3113-43C2-975D-D1B5D3486972"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+            filePath = "KulexiuForStudent/Module/Course/Controller/CourseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "699"
-            endingLineNumber = "699"
-            landmarkName = "-updateVideoViewContainer"
+            startingLineNumber = "492"
+            endingLineNumber = "492"
+            landmarkName = "-liveCourseAction:source:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "042CD8D0-51BC-4B36-8962-88F4A3CC0D8E"
+            uuid = "DAE4D239-9B03-427F-96D0-BE0FA8352796"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "KulexiuForStudent/Module/Course/Controller/CourseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "506"
-            endingLineNumber = "506"
-            landmarkName = "-chatAction:groupName:isGroup:"
+            startingLineNumber = "489"
+            endingLineNumber = "489"
+            landmarkName = "-liveCourseAction:source:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "B4B7208F-3113-43C2-975D-D1B5D3486972"
+            uuid = "5293C50D-0D1D-4869-B552-57D13EC29014"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Course/Controller/CourseViewController.m"
+            filePath = "KulexiuForStudent/AppDelegate.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "492"
-            endingLineNumber = "492"
-            landmarkName = "-liveCourseAction:source:"
+            startingLineNumber = "554"
+            endingLineNumber = "554"
+            landmarkName = "-jpushNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "DAE4D239-9B03-427F-96D0-BE0FA8352796"
+            uuid = "B53B10A4-461E-45F1-9CEA-AB9E05C5B961"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Course/Controller/CourseViewController.m"
+            filePath = "KulexiuForStudent/AppDelegate.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "489"
-            endingLineNumber = "489"
-            landmarkName = "-liveCourseAction:source:"
+            startingLineNumber = "548"
+            endingLineNumber = "548"
+            landmarkName = "-jpushNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 50 - 0
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -34,6 +34,7 @@
 #import "GuideViewController.h"
 #import "HomeworkDetailViewController.h"
 #import "MyCourseViewController.h"
+#import "NotiferMessageViewController.h"
 
 @interface RCNaviDataInfo : NSObject
 
@@ -546,6 +547,9 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
         if([response.notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
             [JPUSHService handleRemoteNotification:userInfo];
         }
+        else {
+            
+        }
     } else {
         // Fallback on earlier versions
     }
@@ -581,6 +585,52 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                         [navCtrl pushViewController:detailVC animated:YES];
                     }
                 }
+                else if ([pageType isEqualToString:@"message"]) {
+                    UIViewController *vc = [UIApplication sharedApplication].keyWindow.rootViewController;
+                    if ([vc isKindOfClass:[UITabBarController class]]) {
+                        KSTabBarViewController *tabCtrl = (KSTabBarViewController *)vc;
+                        CustomNavViewController *navCtrl = (CustomNavViewController *)tabCtrl.selectedViewController;
+                        if ([navCtrl.visibleViewController isKindOfClass:NSClassFromString(@"NotiferMessageViewController")]) {
+                            NotiferMessageViewController *ctrl = (NotiferMessageViewController *)navCtrl.visibleViewController;
+                            [ctrl refreshView];
+                        }
+                        else {
+                            [self.tabBarController tabBarSelectedWithIndex:0];
+                            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                            NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
+                            [navCtrl pushViewController:ctrl animated:YES];
+                        }
+                    }
+                    else {
+                        [self.tabBarController tabBarSelectedWithIndex:0];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
+                        [navCtrl pushViewController:ctrl animated:YES];
+                    }
+                }
+                else {  // 统一跳转消息列表
+                    UIViewController *vc = [UIApplication sharedApplication].keyWindow.rootViewController;
+                    if ([vc isKindOfClass:[UITabBarController class]]) {
+                        KSTabBarViewController *tabCtrl = (KSTabBarViewController *)vc;
+                        CustomNavViewController *navCtrl = (CustomNavViewController *)tabCtrl.selectedViewController;
+                        if ([navCtrl.visibleViewController isKindOfClass:NSClassFromString(@"NotiferMessageViewController")]) {
+                            NotiferMessageViewController *ctrl = (NotiferMessageViewController *)navCtrl.visibleViewController;
+                            [ctrl refreshView];
+                        }
+                        else {
+                            [self.tabBarController tabBarSelectedWithIndex:0];
+                            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                            NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
+                            [navCtrl pushViewController:ctrl animated:YES];
+                        }
+                    }
+                    else {
+                        [self.tabBarController tabBarSelectedWithIndex:0];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
+                        [navCtrl pushViewController:ctrl animated:YES];
+                    }
+                }
             }
             else {
                 NSString *webUrl = [dict stringValueForKey:@"url"];

+ 23 - 13
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m

@@ -28,6 +28,7 @@
 #import "KSICloudManager.h"
 #import "KSMediaManager.h"
 #import "KSUMShareManager.h"
+#import "UserInfoManager.h"
 
 typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     CHOOSETYPE_XML,
@@ -252,20 +253,18 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 
 - (NSString *)url {
     if (_url) {
-//        if ([_url containsString:hostURL]) {
-            if ([_url containsString:@"Authorization="]) {
-                NSRange range = [_url rangeOfString:@"Authorization="];
-                if (range.location != NSNotFound) {
-                    _url = [_url substringToIndex:range.location-1];
-                }
-            }
-            NSString *sepectString = [_url containsString:@"?"] ? @"&" : @"?";
-            NSString *tokenStr = UserDefault(TokenKey);
-            if (![NSString isEmptyString:tokenStr]) {
-                NSString *token = [[NSString stringWithFormat:@"Authorization=%@ %@", UserDefault(Token_type), tokenStr] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-                _url = [NSString stringWithFormat:@"%@%@%@",_url, sepectString, token];
+        if ([_url containsString:@"Authorization="]) {
+            NSRange range = [_url rangeOfString:@"Authorization="];
+            if (range.location != NSNotFound) {
+                _url = [_url substringToIndex:range.location-1];
             }
-//        }
+        }
+        NSString *sepectString = [_url containsString:@"?"] ? @"&" : @"?";
+        NSString *tokenStr = UserDefault(TokenKey);
+        if (![NSString isEmptyString:tokenStr]) {
+            NSString *token = [[NSString stringWithFormat:@"Authorization=%@ %@", UserDefault(Token_type), tokenStr] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+            _url = [NSString stringWithFormat:@"%@%@%@",_url, sepectString, token];
+        }
     }
     return _url;
 }
@@ -527,6 +526,17 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             }
         }
     }
+    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"getVersion"]) {
+        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+        NSMutableDictionary *sendParm = [NSMutableDictionary dictionary];
+        [parm setValue:@"getVersion" forKey:@"api"];
+        NSMutableDictionary *content = [NSMutableDictionary dictionary];
+        [content setValue:[USER_MANAGER getCurrentVersion] forKey:@"version"];
+        [content setValue:[valueDic stringValueForKey:@"uuid"] forKey:@"uuid"];
+
+        [sendParm setValue:content forKey:@"content"];
+        [self postMessage:sendParm];
+    }
 }
 
 - (void)chooseFileWithType:(NSString *)typeStr maxNumber:(NSInteger)maxCount bucket:(NSString *)bucket {

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

@@ -188,6 +188,17 @@ NS_ASSUME_NONNULL_BEGIN
  */
 + (void)logoutRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+
+// 注销账号功能
+// /auth-server/user/logoff/{smsCode}
+
+/// 注销账号
+/// @param get get
+/// @param smsCode 验证码
+/// @param success 成功
+/// @param faliure 失败
++ (void)logoffRequest:(NSString *)get smsCode:(NSString *)smsCode success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
 #pragma mark ---- 验证码服务
 
 // /api-student/code/sendSms
@@ -782,6 +793,8 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)getWhiteBoardRoomMessage:(NSString *)post url:(NSString *)url parm:(NSDictionary *)parm success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+
+
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -577,6 +577,20 @@
     [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// 注销账号功能
+// /api-auth/user/logoff/{smsCode}
+
+/// 注销账号
+/// @param get get
+/// @param smsCode 验证码
+/// @param success 成功
+/// @param faliure 失败
++ (void)logoffRequest:(NSString *)get smsCode:(NSString *)smsCode success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    
+    NSString *url = [NSString stringWithFormat:@"%@%@%@", hostURL, @"/api-auth/user/logoff/",smsCode];
+    [self request:get andWithUrl:url and:nil success:success faliure:faliure];
+}
+
 // /api-student/subject/subjectSelect
 
 /// 声部信息查询 (树状列表)

+ 21 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.h

@@ -0,0 +1,21 @@
+//
+//  KSPublicAlertView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/28.
+//
+
+#import "BaseAlertView.h"
+
+typedef void(^AlertCallback)(void);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSPublicAlertView : BaseAlertView
+
++ (instancetype)shareInstanceWithTitle:(NSString *)title descMessage:(NSString *)descMsg leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle cancelAction:(AlertCallback)cancelCallback sureAction:(AlertCallback)sureCallback;
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 81 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.m

@@ -0,0 +1,81 @@
+//
+//  KSPublicAlertView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/28.
+//
+
+#import "KSPublicAlertView.h"
+#import "UIView+Animation.h"
+
+@interface KSPublicAlertView ()
+
+@property (weak, nonatomic) IBOutlet UILabel *topTitle;
+
+@property (weak, nonatomic) IBOutlet UILabel *descLabel;
+
+@property (weak, nonatomic) IBOutlet UIButton *cancleButton;
+
+@property (weak, nonatomic) IBOutlet UIButton *sureButton;
+
+
+@property (nonatomic, copy) AlertCallback cancelCallback;
+
+@property (nonatomic, copy) AlertCallback sureCallback;
+
+@end
+
+
+@implementation KSPublicAlertView
+
++ (instancetype)shareInstanceWithTitle:(NSString *)title descMessage:(NSString *)descMsg leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle cancelAction:(AlertCallback)cancelCallback sureAction:(AlertCallback)sureCallback {
+    KSPublicAlertView *alertView = [[[NSBundle mainBundle] loadNibNamed:@"KSPublicAlertView" owner:nil options:nil] firstObject];
+    alertView.topTitle.text = title;
+    alertView.descLabel.text = descMsg;
+    [alertView.cancleButton setTitle:leftTitle forState:UIControlStateNormal];
+    [alertView.sureButton setTitle:rightTitle forState:UIControlStateNormal];
+    if (cancelCallback) {
+        alertView.cancelCallback = cancelCallback;
+    }
+    if (sureCallback) {
+        alertView.sureCallback = sureCallback;
+    }
+    [alertView showAlert];
+    return alertView;
+}
+
+- (void)showAlert {
+    [[NSObject getKeyWindow] addSubview:self];
+    [self mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.bottom.right.mas_equalTo([NSObject getKeyWindow]);
+    }];
+    [self setPopAnimation];
+}
+
+- (void)hiddenAction {
+    [self removeFromSuperview];
+}
+
+- (IBAction)cancleAction:(id)sender {
+    if (self.cancelCallback) {
+        self.cancelCallback();
+    }
+    [self hiddenAction];
+}
+
+- (IBAction)sureAction:(id)sender {
+    if (self.sureCallback) {
+        self.sureCallback();
+    }
+    [self hiddenAction];
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 148 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.xib

@@ -0,0 +1,148 @@
+<?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">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <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="KSPublicAlertView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="831"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3b9-KX-1f0">
+                    <rect key="frame" x="47" y="322.5" width="320" height="186.5"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提示" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dY9-ag-CwK">
+                            <rect key="frame" x="27" y="18" width="273" height="30"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="30" id="TAa-cN-fF8"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="L4C-eG-exs">
+                            <rect key="frame" x="162.5" y="125.5" width="144.5" height="44"/>
+                            <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <state key="normal" title="确定">
+                                <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            </state>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="22"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="sureAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Pgy-t6-4Ry"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yAc-6f-XSy">
+                            <rect key="frame" x="13" y="125.5" width="144.5" height="44"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="44" id="5K1-u8-Aw6"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <state key="normal" title="取消">
+                                <color key="titleColor" red="0.0039215686269999999" green="0.75686274509999996" blue="0.70980392160000005" alpha="1" colorSpace="calibratedRGB"/>
+                            </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="calibratedRGB"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="cancleAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="lY7-O5-Xqp"/>
+                            </connections>
+                        </button>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="75G-K8-Mgg">
+                            <rect key="frame" x="19" y="68" width="287" height="33.5"/>
+                            <string key="text">聊天功能已断开,是否重新连接?
+</string>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hVM-RC-bSr">
+                            <rect key="frame" x="18" y="24" width="4" height="18"/>
+                            <color key="backgroundColor" red="0.0039215686269999999" green="0.75686274509999996" blue="0.70980392160000005" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="18" id="xpH-rm-A2j"/>
+                                <constraint firstAttribute="width" constant="4" id="z6W-x6-koW"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="2"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstItem="yAc-6f-XSy" firstAttribute="leading" secondItem="3b9-KX-1f0" secondAttribute="leading" constant="13" id="A7x-aI-IyD"/>
+                        <constraint firstItem="L4C-eG-exs" firstAttribute="leading" secondItem="yAc-6f-XSy" secondAttribute="trailing" constant="5" id="Bh6-PY-p4S"/>
+                        <constraint firstItem="L4C-eG-exs" firstAttribute="height" secondItem="yAc-6f-XSy" secondAttribute="height" id="BnZ-2L-eok"/>
+                        <constraint firstAttribute="trailing" secondItem="dY9-ag-CwK" secondAttribute="trailing" constant="20" id="Ip9-L6-2Nn"/>
+                        <constraint firstAttribute="trailing" secondItem="75G-K8-Mgg" secondAttribute="trailing" constant="14" id="Ipw-PS-rsG"/>
+                        <constraint firstAttribute="bottom" secondItem="yAc-6f-XSy" secondAttribute="bottom" constant="17" id="UiJ-kA-PXC"/>
+                        <constraint firstItem="dY9-ag-CwK" firstAttribute="top" secondItem="3b9-KX-1f0" secondAttribute="top" constant="18" id="YCe-mx-ufc"/>
+                        <constraint firstItem="75G-K8-Mgg" firstAttribute="leading" secondItem="3b9-KX-1f0" secondAttribute="leading" constant="19" id="Zgf-bs-adf"/>
+                        <constraint firstItem="75G-K8-Mgg" firstAttribute="top" secondItem="dY9-ag-CwK" secondAttribute="bottom" constant="20" id="aTo-Dm-iuu"/>
+                        <constraint firstItem="dY9-ag-CwK" firstAttribute="leading" secondItem="hVM-RC-bSr" secondAttribute="trailing" constant="5" id="d4n-7h-4Cm"/>
+                        <constraint firstItem="hVM-RC-bSr" firstAttribute="leading" secondItem="3b9-KX-1f0" secondAttribute="leading" constant="18" id="fUG-ke-LAn"/>
+                        <constraint firstItem="dY9-ag-CwK" firstAttribute="centerY" secondItem="hVM-RC-bSr" secondAttribute="centerY" id="iW4-rB-oPc"/>
+                        <constraint firstAttribute="trailing" secondItem="L4C-eG-exs" secondAttribute="trailing" constant="13" id="phn-RV-9gH"/>
+                        <constraint firstAttribute="width" constant="320" id="q4k-AQ-LaT"/>
+                        <constraint firstItem="L4C-eG-exs" firstAttribute="bottom" secondItem="yAc-6f-XSy" secondAttribute="bottom" id="vyg-TN-SBp"/>
+                        <constraint firstItem="L4C-eG-exs" firstAttribute="width" secondItem="yAc-6f-XSy" secondAttribute="width" id="y46-NI-6sF"/>
+                        <constraint firstItem="L4C-eG-exs" firstAttribute="top" secondItem="75G-K8-Mgg" secondAttribute="bottom" constant="24" id="zGT-pp-1AG"/>
+                        <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="140" id="zrQ-iS-sC6"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="size" keyPath="shadowOffset">
+                            <size key="value" width="0.0" height="24"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
+                            <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.22" colorSpace="calibratedRGB"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="shadowOpacity">
+                            <real key="value" value="1"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="shadowRadius">
+                            <real key="value" value="24"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="6"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounces" value="NO"/>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
+            <constraints>
+                <constraint firstItem="3b9-KX-1f0" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="84x-BF-hZR"/>
+                <constraint firstItem="3b9-KX-1f0" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="8s3-O0-UPX"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="cancleButton" destination="yAc-6f-XSy" id="gft-OU-gCQ"/>
+                <outlet property="descLabel" destination="75G-K8-Mgg" id="KFH-sk-nhd"/>
+                <outlet property="sureButton" destination="L4C-eG-exs" id="tY3-Sd-5cK"/>
+                <outlet property="topTitle" destination="dY9-ag-CwK" id="XN4-1j-Rmz"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="132.25446428571428"/>
+        </view>
+    </objects>
+</document>

+ 4 - 13
KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch

@@ -120,27 +120,18 @@ shouldPrevent = NO; \
 #define hostURL (@"https://dev.colexiu.com")
 #define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
 #define WEBHOST (@"https://dev.colexiu.com/student")
-//#define WEBHOST (@"http://192.168.3.120:5000")
 #define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
-//#define SOCKET_URL (@"ws://192.168.3.26:8090/audioAnalysis")
 #define JSPUSH_ENVIRONMENT (NO)
 #define RCIM_KEY (@"0vnjpoad0jbdz")
 #define SUBMIT_UUID (NO)
 
-//#define hostURL (@"https://test.dayaedu.com")
-//#define SEALCLASSHOST (@"https://test.dayaedu.com/api-im")
-//#define WEBHOST (@"http://mteatest.dayaedu.com")
-//#define SOCKET_URL (@"wss://mteatest.dayaedu.com/audioAnalysis")
-//#define JSPUSH_ENVIRONMENT (NO)
-//#define RCIM_KEY (@"c9kqb3rdc451j")
-//#define SUBMIT_UUID (NO)
 
 //#else
 
-//#define hostURL (@"https://online.dayaedu.com")
-//#define SEALCLASSHOST (@"https://online.dayaedu.com/api-im")
-//#define WEBHOST (@"https://mteaonline.dayaedu.com")
-//#define SOCKET_URL (@"wss://mteaonline.dayaedu.com/audioAnalysis")
+//#define hostURL (@"https://online.colexiu.com")
+//#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://online.colexiu.com/student")
+//#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
 //#define JSPUSH_ENVIRONMENT (YES)
 //#define RCIM_KEY (@"6tnym1br6pv07")
 //#define SUBMIT_UUID (YES)

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Common/Define/UserKeyHeader.h

@@ -48,7 +48,7 @@
 #define GROUP_COURSE_LOGO (@"chat_group_Logo")
 
 #define USERDEFAULT_LOGO (@"user_default_avatal")
-
+#define USER_LOGO_RECTANGLE (@"user_avatarRectangle")
 
 #define GROUP_DEFAULT_LOGO (@"group_chatList")
 #define VIP_DEFAULT_LOGO (@"vip_chatList")

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatAddressViewController.m

@@ -49,7 +49,7 @@
     self.categoryView.titleColorGradientEnabled = YES;
     self.categoryView.hidden = YES;
     _pagerView = [self preferredPagingView];
-    self.pagerView.frame = CGRectMake(0, 100, kScreenWidth, kScreenHeight - kNaviBarHeight-100);
+    self.pagerView.frame = CGRectMake(0, 100, kScreenWidth, kScreenHeight - kNaviBarHeight-100 - kTabBarHeight);
     self.pagerView.listContainerView.categoryNestPagingEnabled = YES;
     self.pagerView.mainTableView.gestureDelegate = self;
     self.pagerView.backgroundColor = [UIColor clearColor];

+ 3 - 2
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatViewController.m

@@ -36,7 +36,7 @@
     [self.view addSubview:self.navView];
     
     CGFloat topSpace = kNaviBarHeight;
-    self.myCategoryView.frame = CGRectMake(0, topSpace, kScreenWidth, 10);
+    self.myCategoryView.frame = CGRectMake(0, topSpace, KPortraitWidth, 10);
     self.myCategoryView.backgroundColor = HexRGB(0xf6f8f9);
     self.myCategoryView.titles = self.titles;
     self.myCategoryView.titleFont = [UIFont systemFontOfSize:16.0f];
@@ -135,7 +135,7 @@
 - (ChatNavView *)navView {
     if (!_navView) {
         _navView = [ChatNavView shareInstance];
-        _navView.frame = CGRectMake(0, 0, kScreenWidth, kNaviBarHeight);
+        _navView.frame = CGRectMake(0, 0, KPortraitWidth, kNaviBarHeight);
         MJWeakSelf;
         [_navView chatNavAction:^(CHATNAVACTION action) {
             [weakSelf navAction:action];
@@ -186,6 +186,7 @@
 - (JXCategoryListContainerView *)listContainerView {
     if (!_listContainerView) {
         _listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
+        _listContainerView.scrollView.scrollEnabled = NO;
     }
     return _listContainerView;
 }

+ 4 - 2
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -190,9 +190,10 @@
             [self.navigationController pushViewController:ctrl animated:YES];
         }
             break;
-        case GROUPSETTING_DISMISS: // 退出群聊
+        case GROUPSETTING_DISMISS: // 退出群聊 暂不退出 发消息
         {
-            [self dismissGroup];
+            [self backAction];
+//            [self dismissGroup];
         }
             break;
         default:
@@ -215,6 +216,7 @@
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             MJWeakSelf;
             [self KSShowMsg:@"退出成功" promptCompletion:^{
+                [[RCIMClient sharedRCIMClient] removeConversation:ConversationType_GROUP targetId:self.groupId];
                 [weakSelf.navigationController popToRootViewControllerAnimated:YES];
             }];
         }

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupSettingBodyView.xib

@@ -316,7 +316,7 @@
                     <constraints>
                         <constraint firstAttribute="height" constant="44" id="zlf-6G-YkC"/>
                     </constraints>
-                    <state key="normal" title="退出群组"/>
+                    <state key="normal" title="发消息"/>
                     <userDefinedRuntimeAttributes>
                         <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                             <real key="value" value="22"/>

+ 13 - 3
KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/Model/GroupNoticeModel.m

@@ -38,7 +38,8 @@ NSString *const kGroupNoticeModelAvatar = @"avatar";
 @synthesize groupId = _groupId;
 @synthesize createTime = _createTime;
 @synthesize sentToNewMember = _sentToNewMember;
-
+@synthesize username = _username;
+@synthesize avatar = _avatar;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -62,6 +63,8 @@ NSString *const kGroupNoticeModelAvatar = @"avatar";
             self.groupId = [self objectOrNilForKey:kGroupNoticeModelGroupId fromDictionary:dict];
             self.createTime = [self objectOrNilForKey:kGroupNoticeModelCreateTime fromDictionary:dict];
             self.sentToNewMember = [[self objectOrNilForKey:kGroupNoticeModelSentToNewMember fromDictionary:dict] boolValue];
+        self.username = [self objectOrNilForKey:kGroupNoticeModelUsername fromDictionary:dict];
+        self.avatar = [self objectOrNilForKey:kGroupNoticeModelAvatar fromDictionary:dict];
 
     }
     
@@ -82,11 +85,12 @@ NSString *const kGroupNoticeModelAvatar = @"avatar";
     [mutableDict setValue:self.groupId forKey:kGroupNoticeModelGroupId];
     [mutableDict setValue:self.createTime forKey:kGroupNoticeModelCreateTime];
     [mutableDict setValue:[NSNumber numberWithBool:self.sentToNewMember] forKey:kGroupNoticeModelSentToNewMember];
-
+    [mutableDict setValue:self.username forKey:kGroupNoticeModelUsername];
+    [mutableDict setValue:self.avatar forKey:kGroupNoticeModelAvatar];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
-- (NSString *)description 
+- (NSString *)description
 {
     return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
 }
@@ -119,6 +123,8 @@ NSString *const kGroupNoticeModelAvatar = @"avatar";
     self.groupId = [aDecoder decodeObjectForKey:kGroupNoticeModelGroupId];
     self.createTime = [aDecoder decodeObjectForKey:kGroupNoticeModelCreateTime];
     self.sentToNewMember = [aDecoder decodeBoolForKey:kGroupNoticeModelSentToNewMember];
+    self.username = [aDecoder decodeObjectForKey:kGroupNoticeModelUsername];
+    self.avatar = [aDecoder decodeObjectForKey:kGroupNoticeModelAvatar];
     return self;
 }
 
@@ -135,6 +141,8 @@ NSString *const kGroupNoticeModelAvatar = @"avatar";
     [aCoder encodeObject:_groupId forKey:kGroupNoticeModelGroupId];
     [aCoder encodeObject:_createTime forKey:kGroupNoticeModelCreateTime];
     [aCoder encodeBool:_sentToNewMember forKey:kGroupNoticeModelSentToNewMember];
+    [aCoder encodeObject:_username forKey:kGroupNoticeModelUsername];
+    [aCoder encodeObject:_avatar forKey:kGroupNoticeModelAvatar];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -153,6 +161,8 @@ NSString *const kGroupNoticeModelAvatar = @"avatar";
         copy.groupId = [self.groupId copyWithZone:zone];
         copy.createTime = [self.createTime copyWithZone:zone];
         copy.sentToNewMember = self.sentToNewMember;
+        copy.username = [self.username copyWithZone:zone];
+        copy.avatar = [self.avatar copyWithZone:zone];
     }
     
     return copy;

+ 3 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/View/GroupNoticeCell.m

@@ -48,7 +48,9 @@
     // 赋值
     if ([source isKindOfClass:[GroupNoticeModel class]]) {
         GroupNoticeModel *model = source;
-        self.userName.text = [NSString returnNoNullStringWithString:@""];
+        self.userName.text = [NSString returnNoNullStringWithString:model.username];
+        [self.userLogo sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USER_LOGO_RECTANGLE]];
+        
         self.noticeTitle.text = [NSString returnNoNullStringWithString:model.title];
         self.noticeContent.text = [NSString returnNoNullStringWithString:model.content];
         self.focusLabel.hidden = model.top ? NO : YES;

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/View/GroupNoticeCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -17,7 +17,7 @@
                 <rect key="frame" x="0.0" y="0.0" width="359" height="253"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="chat_group_Logo" translatesAutoresizingMaskIntoConstraints="NO" id="Gkn-L8-UCb">
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_avatarRectangle" translatesAutoresizingMaskIntoConstraints="NO" id="Gkn-L8-UCb">
                         <rect key="frame" x="16" y="15" width="60" height="60"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="60" id="8bz-sK-gjT"/>
@@ -135,7 +135,7 @@
         </tableViewCell>
     </objects>
     <resources>
-        <image name="chat_group_Logo" width="44" height="44"/>
         <image name="notice_action" width="24" height="25"/>
+        <image name="user_avatarRectangle" width="44" height="44"/>
     </resources>
 </document>

+ 0 - 1
KulexiuForStudent/KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m

@@ -369,7 +369,6 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
 }
 
 
-
 - (void)quitClassroomNotifer {
     // 课程结束后15分钟自动退出房间 连堂课不退出(对内)
     if (self.isQuitRoom == NO) {

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m

@@ -186,7 +186,7 @@
     if (indexPath.row == 0) {
         MusicRoomCourseInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseInfoCell"];
         [self evaluateWithStatusLabel:cell.statusLabel];
-        NSString *courseName = [NSString stringWithFormat:@"%@第%@课",[NSString returnNoNullStringWithString:self.homeworkModel.courseGroupName],self.homeworkModel.classNum];
+        NSString *courseName = [NSString returnNoNullStringWithString:self.homeworkModel.courseGroupName];
         [cell configWithStartTime:self.homeworkModel.startTime endTime:self.homeworkModel.endTime courseName:courseName chatGroupId:self.homeworkModel.imGroupId courseSubject:self.homeworkModel.subjectName];
         MJWeakSelf;
         [cell chatCalkback:^(NSString * _Nonnull targetId) {

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.h

@@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface NotiferMessageViewController : KSBaseViewController
 
+- (void)refreshView;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m

@@ -31,6 +31,11 @@
 
 @implementation NotiferMessageViewController
 
+- (void)refreshView {
+    [self queryUnReadCount];
+    [self resetSourceAndRequest];
+}
+
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.

+ 18 - 11
KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m

@@ -75,10 +75,12 @@
         RCUserInfo *userInfo = model.userInfo;
         NSString *userName = [userInfo.name stringByAppendingString:@""];
         NSString *localizedMessage = @"进入直播间";
-        NSString *str =[NSString stringWithFormat:@"%@%@%@",headString,userName,localizedMessage];
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
         NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
         [attributedString addAttribute:NSForegroundColorAttributeName value:(THEMECOLOR) range:[str rangeOfString:userName]];
-        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[str rangeOfString:localizedMessage]];
+        
+        NSAttributedString *localizedStr = [[NSAttributedString alloc] initWithString:localizedMessage attributes:@{NSForegroundColorAttributeName:HexRGB(0xffffff)}];
+        [attributedString appendAttributedString:localizedStr];
         if (isCreator) {
             [self addAttachmentImg:attributedString imgName:creatorImg];
         }
@@ -99,7 +101,7 @@
         }
         else if (seatApply.type == SEATHANDLE_KICKSEAT) {
             userName = seatApply.teacherName;
-            localizedMessage = @"将你下麦";
+            localizedMessage = @"将你下麦";
         }
         else if (seatApply.type == SEATHANDLE_APPLY) {
             userName = seatApply.audienceName;
@@ -110,10 +112,12 @@
             localizedMessage = @"取消了连麦申请";
         }
         
-        NSString *str =[NSString stringWithFormat:@"%@%@%@",headString,userName,localizedMessage];
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
         NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
         [attributedString addAttribute:NSForegroundColorAttributeName value:(THEMECOLOR) range:[str rangeOfString:userName]];
-        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[str rangeOfString:localizedMessage]];
+        NSAttributedString *localizedStr = [[NSAttributedString alloc] initWithString:localizedMessage attributes:@{NSForegroundColorAttributeName:HexRGB(0xffffff)}];
+        [attributedString appendAttributedString:localizedStr];
+        
         if (isCreator) {
             [self addAttachmentImg:attributedString imgName:creatorImg];
         }
@@ -139,10 +143,11 @@
             userName = seatResponse.audienceName;
             localizedMessage = @"拒绝了连麦邀请";
         }
-        NSString *str =[NSString stringWithFormat:@"%@%@%@",headString,userName,localizedMessage];
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
         NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
         [attributedString addAttribute:NSForegroundColorAttributeName value:(THEMECOLOR) range:[str rangeOfString:userName]];
-        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[str rangeOfString:localizedMessage]];
+        NSAttributedString *localizedStr = [[NSAttributedString alloc] initWithString:localizedMessage attributes:@{NSForegroundColorAttributeName:HexRGB(0xffffff)}];
+        [attributedString appendAttributedString:localizedStr];
         if (isCreator) {
             [self addAttachmentImg:attributedString imgName:creatorImg];
         }
@@ -153,11 +158,12 @@
         RCUserInfo *userInfo = model.userInfo;
         NSString *userName = [userInfo.name stringByAppendingString:@""];
         NSString *localizedMessage = [NSString stringWithFormat:@"给主讲人点了%d个赞",likeMessage.counts];
-        NSString *str =[NSString stringWithFormat:@"%@%@",userName,localizedMessage];
+        NSString *str =[NSString stringWithFormat:@"%@",userName];
         NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
         
         [attributedString addAttribute:NSForegroundColorAttributeName value:(THEMECOLOR) range:[str rangeOfString:userName]];
-        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[str rangeOfString:localizedMessage]];
+        NSAttributedString *localizedStr = [[NSAttributedString alloc] initWithString:localizedMessage attributes:@{NSForegroundColorAttributeName:HexRGB(0xffffff)}];
+        [attributedString appendAttributedString:localizedStr];
         [self.contentLabel setAttributedText:attributedString.copy];
         return;
     }
@@ -174,10 +180,11 @@
             NSString *localizedMessage = textMessage.content;
             RCUserInfo *userInfo = model.userInfo;
             NSString *userName = [userInfo.name stringByAppendingString:@":"];
-            NSString *str =[NSString stringWithFormat:@"%@%@%@",headString,userName,localizedMessage];
+            NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
             NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
             [attributedString addAttribute:NSForegroundColorAttributeName value:(THEMECOLOR) range:[str rangeOfString:userName]];
-            [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[str rangeOfString:localizedMessage]];
+            NSAttributedString *localizedStr = [[NSAttributedString alloc] initWithString:localizedMessage attributes:@{NSForegroundColorAttributeName:HexRGB(0xffffff)}];
+            [attributedString appendAttributedString:localizedStr];
             if (isCreator) {
                 [self addAttachmentImg:attributedString imgName:creatorImg];
             }

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/View/LoginBodyView.m

@@ -56,6 +56,7 @@
 
 
 - (IBAction)getVefiCode:(id)sender {
+    [self endEditing:YES];
     if ([NSString isEmptyString:self.phoneField.text]) {
         // 请输入手机号
         [self MBPShow:@"请输入手机号"];
@@ -72,23 +73,27 @@
 }
 
 - (IBAction)selectButtonAction:(id)sender {
+    [self endEditing:YES];
     self.sureButton.selected = !self.sureButton.selected;
     _isChooseProtocal = self.sureButton.isSelected;
 }
 
 - (IBAction)passwordLogin:(id)sender {
+    [self endEditing:YES];
     if (self.callback) {
         self.callback(LOGINACTION_PASSWORD, self.phoneField.text);
     }
 }
 
 - (IBAction)registerProtocal:(id)sender {
+    [self endEditing:YES];
     if (self.callback) {
         self.callback(LOGINACTION_REGPROTOCAL, @"");
     }
 }
 
 - (IBAction)privacyAction:(id)sender {
+    [self endEditing:YES];
     if (self.callback) {
         self.callback(LOGINACTION_PRIVACY, @"");
     }

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/View/PasswordBodyView.m

@@ -41,6 +41,7 @@
 }
 
 - (IBAction)loginAction:(id)sender {
+    [self endEditing:YES];
     if ([NSString isEmptyString:self.phoneField.text]) {
         [self MBPShow:@"请输入您的手机号"];
         return;
@@ -85,6 +86,7 @@
 }
 
 - (IBAction)backAction:(id)sender {
+    [self endEditing:YES];
     if (self.callback) {
         self.callback(PWDLOGIN_BACK,@{});
     }

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/View/VefiBodyView.m

@@ -158,6 +158,7 @@
 
 // 返回
 - (IBAction)backAction:(id)sender {
+    [self endEditing:YES];
     if (self.callback) {
         self.callback(VEFIACTION_BACK, @"");
     }

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

@@ -58,7 +58,8 @@
     [self.view bringSubviewToFront:self.scrollView];
     [self.view bringSubviewToFront:self.navView];
     [self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.right.top.mas_equalTo(self.view);
+        make.width.mas_equalTo(100);
+        make.right.top.mas_equalTo(self.view);
         make.height.mas_equalTo(kNaviBarHeight);
     }];
     

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Controller/HomeworkDetailViewController.m

@@ -148,7 +148,7 @@
         NSString *name = @"";
         NSString *avatar = @"";
         if (isMusicRoom) {
-            name = [NSString stringWithFormat:@"%@第%@课",self.detailModel.courseGroupName,self.detailModel.classNum];
+            name = [NSString returnNoNullStringWithString:self.detailModel.courseGroupName];
             avatar = @"";
         }
         else {

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/View/HomeworkListCell.m

@@ -55,7 +55,7 @@
     self.courseTime.text = [NSString stringWithFormat:@"%@~%@",[NSString returnNoNullStringWithString:lessonBegin],[NSString returnNoNullStringWithString:lessonEnd]];
     if ([sourceModel.type isEqualToString:@"PIANO_ROOM_CLASS"]) { // 琴房课
         [self.studentAvatal setImage:[UIImage imageNamed:@"course_musicRoom"]];
-        self.studentNameLabel.text = [NSString stringWithFormat:@"%@第%@课",[NSString returnNoNullStringWithString:sourceModel.courseGroupName],sourceModel.classNum];
+        self.studentNameLabel.text = [NSString returnNoNullStringWithString:sourceModel.courseGroupName];
         self.avatalHeight.constant = 51.0f;
         self.isMusicRoom = YES;
     }

+ 28 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/SettingViewController.m

@@ -16,6 +16,8 @@
 #import "AppDelegate.h"
 #import "CustomNavViewController.h"
 #import "JPUSHService.h"
+#import "UserInfoManager.h"
+#import "AccountDeleteViewController.h"
 
 @interface SettingViewController ()
 
@@ -32,6 +34,21 @@
     [self configUI];
 }
 
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self requestUserMemo];
+}
+
+- (void)requestUserMemo {
+    [[UserInfoManager shareInstance] requsetconfigCallback:^(BOOL success) {
+        [self refreshBodyView:success];
+    }];
+}
+
+- (void)refreshBodyView:(BOOL)isMember {
+    self.bodyView.isMember = isMember;
+}
+
 - (void)configUI {
     [self.scrollView mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
@@ -90,11 +107,22 @@
         {
             [self logoutAction];
         }
+            break;
+        case SETTINGACTION_DELETEACCOUNT:
+        {
+            [self toDelteAccountView];
+        }
+            break;
         default:
             break;
     }
 }
 
+- (void)toDelteAccountView {
+    AccountDeleteViewController *detailView = [[AccountDeleteViewController alloc] init];
+    [self.navigationController pushViewController:detailView animated:YES];
+}
+
 - (void)logoutAction {
     [KSNetworkingManager logoutRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         [self clearSource];

+ 16 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.h

@@ -0,0 +1,16 @@
+//
+//  AccountDeleteViewController.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/7/12.
+//
+
+#import "KSBaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AccountDeleteViewController : KSBaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 202 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m

@@ -0,0 +1,202 @@
+//
+//  AccountDeleteViewController.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/7/12.
+//
+
+#import "AccountDeleteViewController.h"
+#import "DeleteAccountBodyView.h"
+#import "VeriCheckView.h"
+#import "LoginViewController.h"
+#import "AppDelegate.h"
+#import "CustomNavViewController.h"
+#import "JPUSHService.h"
+#import "RCConnectionManager.h"
+#import "NSString+phone.h"
+#import "KSPublicAlertView.h"
+
+@interface AccountDeleteViewController ()
+{
+    NSTimer *_time;
+    int _count;
+}
+@property (nonatomic, strong) DeleteAccountBodyView *bodyView;
+
+@property (nonatomic, strong) KSPublicAlertView *alertView;
+
+
+@end
+
+@implementation AccountDeleteViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    [self allocTitle:@"注销账号"];
+    [self configUI];
+}
+
+- (void)configUI {
+    self.bodyView = [DeleteAccountBodyView shareInstance];
+    [self.scrollView addSubview:_bodyView];
+    [_bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(self.scrollView.mas_top);
+        make.right.left.mas_equalTo(self.view);
+        make.height.mas_equalTo(kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin);
+    }];
+    MJWeakSelf;
+    [_bodyView deleteAccountCallback:^(DELETEACCOUNT action, NSDictionary * _Nonnull parm) {
+        [weakSelf operationWithAction:action parm:parm];
+    }];
+    
+}
+
+- (void)operationWithAction:(DELETEACCOUNT)action parm:(NSDictionary *)parm {
+    
+    if (action == DELETEACCOUNT_CODE) {
+        // 图形化验证
+        [self veriCheckWithParm:parm];
+    }
+    else if (action == DELETEACCOUNT_SURE) {
+        
+        MJWeakSelf;
+        self.alertView = [KSPublicAlertView shareInstanceWithTitle:@"提示" descMessage:@"注销账号后您所有的留存信息将被清空且无法恢复,请谨慎操作" leftTitle:@"取消" rightTitle:@"确定" cancelAction:^{
+            
+        } sureAction:^{
+            [weakSelf deleteAccount:[parm stringValueForKey:@"code"]];
+        }];
+        
+    }
+}
+
+#pragma mark ----- 删除账号
+- (void)deleteAccount:(NSString *)code {
+    [self showhud];
+    [KSNetworkingManager logoffRequest:KS_GET smsCode:code success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            MJWeakSelf;
+            [self KSShowMsg:@"注销成功" promptCompletion:^{
+                [weakSelf successDeleteBack];
+            }];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+    }];
+}
+
+- (void)successDeleteBack {
+    
+    [RCConnectionManager shareManager].isNeedJoin = NO;
+    [RCConnectionManager shareManager].isNeedShowMessage = NO;
+    [[RCIM sharedRCIM] logout];
+    [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
+    // 取消推送别名
+    [JPUSHService deleteAlias:nil seq:0];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:TokenKey];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:Token_type];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:RefreshToken];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:RongTokenKey];
+    [[NSUserDefaults standardUserDefaults] synchronize];
+    [KSNetworkingManager clearRequestHeader];
+    LoginViewController *loginVC = [[LoginViewController alloc] init];
+    CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:loginVC];
+    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    appDelegate.window.rootViewController = navCtrl;
+}
+
+#pragma mark --- 验证码
+- (void)veriCheckWithParm:(NSDictionary *)parm {
+    NSString *phoneNo = [parm stringValueForKey:@"phone"];
+    // 图形化验证
+    VeriCheckView *view = [VeriCheckView shareInstanceShowInView:self.view];
+    __weak typeof(view) weakView = view;
+    [view showViewCallback:^(NSDictionary * _Nonnull parm) {
+        [self veriImageCodeWithParm:parm checkView:weakView];
+    }];
+    [view disPlayImageWithPhone:phoneNo];
+}
+
+- (void)veriImageCodeWithParm:(NSDictionary *)parm checkView:(VeriCheckView *)checkView {
+    [self showhud];
+    [KSNetworkingManager verifyLoginImageRequest:KS_POST phone:[parm stringValueForKey:@"phone"] code:[parm stringValueForKey:@"code"] success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            [checkView hiddView];
+            [self sendSMSRequestWithParm:parm];
+        }
+        else {
+            [self removehub];
+            [self MBShowInWindow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+    }];
+}
+
+// 发送短信
+- (void)sendSMSRequestWithParm:(NSDictionary *)parm {
+    [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm stringValueForKey:@"phone"] type:@"LOGOFF" success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            [self MBPShow:@"验证码已发送"];
+            [self codeButtonCountDown];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+    }];
+}
+
+- (void)codeButtonCountDown {
+    _bodyView.codeButton.userInteractionEnabled = NO;
+    [_bodyView.codeButton setTitleColor:HexRGB(0xe5e5e5) forState:UIControlStateNormal];
+    __weak typeof(self) weakSelf = self;
+    _time = [NSTimer scheduledTimerWithTimeInterval:1 target:weakSelf selector:@selector(buttonChangeAction) userInfo:nil repeats:YES];
+    [[NSRunLoop mainRunLoop] addTimer:_time forMode:NSRunLoopCommonModes];
+    _count = 89;
+}
+
+- (void)clearButtonState {
+    [_time invalidate];
+    _time = nil;
+    _count = 0;
+    [_bodyView.codeButton setTitle:@"获取验证码" forState:UIControlStateNormal];
+    [_bodyView.codeButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
+    _bodyView.codeButton.userInteractionEnabled = YES;
+}
+
+#pragma mark  ---- 验证码按钮状态
+- (void)buttonChangeAction {
+    _bodyView.codeButton.userInteractionEnabled = NO;
+    NSString *title = [NSString stringWithFormat:@"%ds",_count];
+    [_bodyView.codeButton setTitle:title forState:UIControlStateNormal];
+    _count--;
+    if(_count == -1){
+        [_time invalidate];
+        _time = nil;
+        [_bodyView.codeButton setTitle:@"获取验证码" forState:UIControlStateNormal];
+        [_bodyView.codeButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
+        _bodyView.codeButton.userInteractionEnabled = YES;    }
+}
+
+- (void)dealloc {
+    [_time invalidate];
+    _time = nil;
+}
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 29 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.h

@@ -0,0 +1,29 @@
+//
+//  DeleteAccountBodyView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/7/12.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef NS_ENUM(NSInteger, DELETEACCOUNT) {
+    DELETEACCOUNT_CODE,   // 获取验证码
+    DELETEACCOUNT_SURE,   // 注销账号
+};
+
+typedef void(^DeleteAccountBlock)(DELETEACCOUNT action, NSDictionary * _Nonnull parm);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DeleteAccountBodyView : UIView
+
+@property (weak, nonatomic) IBOutlet UIButton *codeButton;
+
++ (instancetype)shareInstance;
+
+- (void)deleteAccountCallback:(DeleteAccountBlock)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 89 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.m

@@ -0,0 +1,89 @@
+//
+//  DeleteAccountBodyView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/7/12.
+//
+
+#import "DeleteAccountBodyView.h"
+
+@interface DeleteAccountBodyView ()<UITextFieldDelegate>
+
+@property (weak, nonatomic) IBOutlet UILabel *phoneDescLabel;
+
+@property (weak, nonatomic) IBOutlet UITextField *codeField;
+
+@property (nonatomic, copy) DeleteAccountBlock callback;
+
+@property (nonatomic, strong) NSString *phoneNo;
+
+@end
+
+@implementation DeleteAccountBodyView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    self.codeField.delegate = self;
+    self.phoneNo = UserDefault(PHONEKEY);
+    
+    NSString *phoneDim = [self.phoneNo stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"];
+    self.phoneDescLabel.text = [NSString stringWithFormat:@"将%@所绑定的账号注销",phoneDim];    
+}
+
++ (instancetype)shareInstance {
+    DeleteAccountBodyView *view = [[[NSBundle mainBundle] loadNibNamed:@"DeleteAccountBodyView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)deleteAccountCallback:(DeleteAccountBlock)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+- (IBAction)sendCode:(id)sender {
+    [self endEditing:YES];
+    
+    if (self.callback) {
+        self.callback(DELETEACCOUNT_CODE, @{@"phone" : self.phoneNo});
+    }
+}
+
+- (IBAction)sureAction:(id)sender {
+    [self endEditing:YES];
+    
+    if ([NSString isEmptyString:self.codeField.text]) {
+        [self MBPShow:@"请输入短信验证码"];
+        return;
+    }
+    if (self.callback) {
+        self.callback(DELETEACCOUNT_SURE, @{@"phone" : self.phoneNo,
+                                           @"code" : self.codeField.text,
+                                           });
+    }
+}
+
+- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    if ([string isEqualToString:@"\n"]) {
+        [self endEditing:YES];
+        return YES;
+    }
+    // 输入控制
+    NSString *newString = [textField.text stringByReplacingCharactersInRange:range withString:string];
+    if (textField == self.codeField) {
+        if (newString.length > 6) {
+            return NO;
+        }
+    }
+    return YES;
+}
+
+@end

+ 162 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.xib

@@ -0,0 +1,162 @@
+<?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">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <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="DeleteAccountBodyView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="497"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="将***********所绑定的账号注销" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KTf-hd-DqL">
+                    <rect key="frame" x="80" y="40" width="254.5" height="24"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="24" id="shE-jI-SbL"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                    <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5vd-tZ-CWT">
+                    <rect key="frame" x="14" y="94" width="386" height="144.5"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注销后,您在相关产品/服务留存的信息将被清空切无法找回,具体包括:" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c7e-F8-dgF">
+                            <rect key="frame" x="12" y="15" width="362" height="33.5"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="个人资料,实名认证等身份信息" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6u6-Ma-2KR">
+                            <rect key="frame" x="12" y="58.5" width="362" height="17"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="各产品/服务及权益信息" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="plu-48-YfS">
+                            <rect key="frame" x="12" y="85.5" width="362" height="17"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="以及您在使用各产品/服务时留存的其他信息" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="czQ-5I-E7e">
+                            <rect key="frame" x="12" y="112.5" width="362" height="17"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="c7e-F8-dgF" firstAttribute="top" secondItem="5vd-tZ-CWT" secondAttribute="top" constant="15" id="74w-wx-g4G"/>
+                        <constraint firstAttribute="trailing" secondItem="c7e-F8-dgF" secondAttribute="trailing" constant="12" id="AKi-Uc-c3h"/>
+                        <constraint firstAttribute="trailing" secondItem="plu-48-YfS" secondAttribute="trailing" constant="12" id="GNq-jw-Z22"/>
+                        <constraint firstItem="czQ-5I-E7e" firstAttribute="top" secondItem="plu-48-YfS" secondAttribute="bottom" constant="10" id="GZu-XY-X4l"/>
+                        <constraint firstItem="plu-48-YfS" firstAttribute="leading" secondItem="5vd-tZ-CWT" secondAttribute="leading" constant="12" id="JHb-9D-PwY"/>
+                        <constraint firstItem="6u6-Ma-2KR" firstAttribute="leading" secondItem="5vd-tZ-CWT" secondAttribute="leading" constant="12" id="MH2-cz-kST"/>
+                        <constraint firstItem="6u6-Ma-2KR" firstAttribute="top" secondItem="c7e-F8-dgF" secondAttribute="bottom" constant="10" id="MhW-PN-YDi"/>
+                        <constraint firstItem="czQ-5I-E7e" firstAttribute="leading" secondItem="5vd-tZ-CWT" secondAttribute="leading" constant="12" id="NJD-Xj-YMr"/>
+                        <constraint firstAttribute="trailing" secondItem="czQ-5I-E7e" secondAttribute="trailing" constant="12" id="RGt-dD-6zV"/>
+                        <constraint firstAttribute="bottom" secondItem="czQ-5I-E7e" secondAttribute="bottom" constant="15" id="Zxu-el-Q9z"/>
+                        <constraint firstItem="plu-48-YfS" firstAttribute="top" secondItem="6u6-Ma-2KR" secondAttribute="bottom" constant="10" id="hzW-RT-JQz"/>
+                        <constraint firstItem="c7e-F8-dgF" firstAttribute="leading" secondItem="5vd-tZ-CWT" secondAttribute="leading" constant="12" id="rBH-eL-pS0"/>
+                        <constraint firstAttribute="trailing" secondItem="6u6-Ma-2KR" secondAttribute="trailing" constant="12" id="toW-r2-je8"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mMv-gk-ABM">
+                    <rect key="frame" x="14" y="253.5" width="386" height="48"/>
+                    <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入短信验证码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="byh-5B-J1p">
+                            <rect key="frame" x="12" y="0.0" width="272" height="48"/>
+                            <color key="textColor" red="0.2666666667" green="0.2666666667" blue="0.2666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <textInputTraits key="textInputTraits" keyboardType="numberPad" enablesReturnKeyAutomatically="YES"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="akE-r3-235">
+                            <rect key="frame" x="294" y="9" width="80" height="30"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="80" id="ZPH-DO-yJC"/>
+                                <constraint firstAttribute="height" constant="30" id="mdJ-zw-XGc"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <state key="normal" title="获取验证码">
+                                <color key="titleColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                            </state>
+                            <connections>
+                                <action selector="sendCode:" destination="iN0-l3-epB" eventType="touchUpInside" id="H9d-M4-iaP"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstItem="byh-5B-J1p" firstAttribute="leading" secondItem="mMv-gk-ABM" secondAttribute="leading" constant="12" id="0cm-iw-BJ0"/>
+                        <constraint firstItem="akE-r3-235" firstAttribute="leading" secondItem="byh-5B-J1p" secondAttribute="trailing" constant="10" id="2QK-Zj-399"/>
+                        <constraint firstAttribute="height" constant="48" id="8GK-N2-btA"/>
+                        <constraint firstAttribute="trailing" secondItem="akE-r3-235" secondAttribute="trailing" constant="12" id="KAl-hV-nSe"/>
+                        <constraint firstItem="byh-5B-J1p" firstAttribute="top" secondItem="mMv-gk-ABM" secondAttribute="top" id="VVU-2V-Mc1"/>
+                        <constraint firstAttribute="bottom" secondItem="byh-5B-J1p" secondAttribute="bottom" id="us4-Ge-6Tm"/>
+                        <constraint firstItem="akE-r3-235" firstAttribute="centerY" secondItem="mMv-gk-ABM" secondAttribute="centerY" id="zZv-Ds-IBi"/>
+                    </constraints>
+                </view>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qi7-Np-SbU">
+                    <rect key="frame" x="14" y="427" width="386" height="50"/>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="50" id="Q5v-LL-ePg"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                    <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.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </state>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                    <connections>
+                        <action selector="sureAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="2MO-WT-9Dy"/>
+                    </connections>
+                </button>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="Qi7-Np-SbU" secondAttribute="trailing" constant="14" id="AFc-rt-tSu"/>
+                <constraint firstItem="mMv-gk-ABM" firstAttribute="top" secondItem="5vd-tZ-CWT" secondAttribute="bottom" constant="15" id="OLs-IR-ajo"/>
+                <constraint firstItem="mMv-gk-ABM" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="Pcw-R9-wV9"/>
+                <constraint firstItem="KTf-hd-DqL" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="XZr-bU-x53"/>
+                <constraint firstItem="5vd-tZ-CWT" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="d80-b8-FdW"/>
+                <constraint firstAttribute="bottom" secondItem="Qi7-Np-SbU" secondAttribute="bottom" constant="20" id="dOO-dg-7et"/>
+                <constraint firstAttribute="trailing" secondItem="5vd-tZ-CWT" secondAttribute="trailing" constant="14" id="gfd-ed-lOS"/>
+                <constraint firstItem="5vd-tZ-CWT" firstAttribute="top" secondItem="KTf-hd-DqL" secondAttribute="bottom" constant="30" id="ib6-Ic-OL6"/>
+                <constraint firstAttribute="trailing" secondItem="mMv-gk-ABM" secondAttribute="trailing" constant="14" id="rij-Zo-11s"/>
+                <constraint firstItem="Qi7-Np-SbU" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="v9U-R8-Lum"/>
+                <constraint firstItem="KTf-hd-DqL" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="40" id="xQA-iX-82Y"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="codeButton" destination="akE-r3-235" id="XHj-Ps-QHA"/>
+                <outlet property="codeField" destination="byh-5B-J1p" id="7om-O3-CaM"/>
+                <outlet property="phoneDescLabel" destination="KTf-hd-DqL" id="RxJ-6p-d9V"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="-55.245535714285715"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.h

@@ -14,6 +14,7 @@ typedef NS_ENUM(NSInteger, SETTINGACTION) {
     SETTINGACTION_FEEEDBACK, // 反馈
     SETTINGACTION_ABOUTUS,  // 关于我们
     SETTINGACTION_LOGOUT,   // 退出
+    SETTINGACTION_DELETEACCOUNT,  // 注销账号
 };
 
 typedef void(^SettingCallback)(SETTINGACTION type);
@@ -22,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface SettingBodyView : UIView
 
+@property (nonatomic, assign) BOOL isMember;
 
 @property (nonatomic, assign) BOOL enableCheck;
 

+ 12 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.m

@@ -12,6 +12,8 @@
 @property (nonatomic, copy) SettingCallback callback;
 @property (weak, nonatomic) IBOutlet UIButton *switchButton;
 
+@property (weak, nonatomic) IBOutlet UIView *checkView;
+
 @end
 
 @implementation SettingBodyView
@@ -52,6 +54,16 @@
         self.callback(SETTINGACTION_LOGOUT);
     }
 }
+
+- (void)setIsMember:(BOOL)isMember {
+    _isMember = isMember;
+    if (isMember) {
+        self.checkView.hidden = YES;
+    }
+    else {
+        self.checkView.hidden = NO;
+    }
+}
 /*
  // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 73 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.xib

@@ -4,6 +4,7 @@
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -239,20 +240,84 @@
                         <action selector="logoutAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="cSa-5v-igG"/>
                     </connections>
                 </button>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E2i-As-HC7">
+                    <rect key="frame" x="14" y="235" width="386" height="50"/>
+                    <subviews>
+                        <view tag="1007" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AEo-Tn-nDU">
+                            <rect key="frame" x="0.0" y="0.0" 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="RCe-mt-b6q">
+                                    <rect key="frame" x="12" y="15" width="75" height="20"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="75" id="yne-77-5Gh"/>
+                                    </constraints>
+                                    <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="setting_next" translatesAutoresizingMaskIntoConstraints="NO" id="rS3-Z9-bGW">
+                                    <rect key="frame" x="365" y="19.5" width="6" height="11"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="11" id="Wdf-vH-o7h"/>
+                                        <constraint firstAttribute="width" constant="6" id="iP6-ap-PtE"/>
+                                    </constraints>
+                                </imageView>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ued-Ch-Ay3">
+                                    <rect key="frame" x="11" y="49" width="366" height="1"/>
+                                    <color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="1" id="fVV-Mw-Iie"/>
+                                    </constraints>
+                                </view>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <gestureRecognizers/>
+                            <constraints>
+                                <constraint firstAttribute="bottom" secondItem="ued-Ch-Ay3" secondAttribute="bottom" id="2MH-lc-95k"/>
+                                <constraint firstItem="RCe-mt-b6q" firstAttribute="leading" secondItem="AEo-Tn-nDU" secondAttribute="leading" constant="12" id="7bS-W6-gI7"/>
+                                <constraint firstItem="rS3-Z9-bGW" firstAttribute="centerY" secondItem="AEo-Tn-nDU" secondAttribute="centerY" id="82t-rT-dvs"/>
+                                <constraint firstAttribute="trailing" secondItem="ued-Ch-Ay3" secondAttribute="trailing" constant="9" id="9IH-63-MFd"/>
+                                <constraint firstAttribute="height" constant="50" id="L0L-yI-mMR"/>
+                                <constraint firstItem="ued-Ch-Ay3" firstAttribute="leading" secondItem="AEo-Tn-nDU" secondAttribute="leading" constant="11" id="b7v-mc-KuY"/>
+                                <constraint firstItem="RCe-mt-b6q" firstAttribute="centerY" secondItem="AEo-Tn-nDU" secondAttribute="centerY" id="ost-4L-I6H"/>
+                                <constraint firstAttribute="trailing" secondItem="rS3-Z9-bGW" secondAttribute="trailing" constant="15" id="wfl-JE-cAY"/>
+                            </constraints>
+                            <connections>
+                                <outletCollection property="gestureRecognizers" destination="Kbn-yl-Hs4" appends="YES" id="uIH-4U-BiA"/>
+                            </connections>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="AEo-Tn-nDU" secondAttribute="bottom" id="KOJ-pG-4I4"/>
+                        <constraint firstAttribute="trailing" secondItem="AEo-Tn-nDU" secondAttribute="trailing" id="PrU-p6-kIF"/>
+                        <constraint firstItem="AEo-Tn-nDU" firstAttribute="top" secondItem="E2i-As-HC7" secondAttribute="top" id="TtL-V3-wSg"/>
+                        <constraint firstItem="AEo-Tn-nDU" firstAttribute="leading" secondItem="E2i-As-HC7" secondAttribute="leading" id="dJx-67-Bxx"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstItem="bvI-vo-wNV" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="5n4-bb-LbN"/>
                 <constraint firstAttribute="trailing" secondItem="bvI-vo-wNV" secondAttribute="trailing" constant="14" id="7ac-ck-hbr"/>
+                <constraint firstItem="E2i-As-HC7" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="HaR-ke-ILN"/>
                 <constraint firstAttribute="trailing" secondItem="6YJ-Ux-PMN" secondAttribute="trailing" constant="14" id="HgM-Qa-LP6"/>
                 <constraint firstItem="bvI-vo-wNV" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="15" id="QbZ-et-vlc"/>
+                <constraint firstAttribute="trailing" secondItem="E2i-As-HC7" secondAttribute="trailing" constant="14" id="WFI-BB-PFC"/>
                 <constraint firstAttribute="bottom" secondItem="6YJ-Ux-PMN" secondAttribute="bottom" constant="20" id="ee5-re-JQh"/>
+                <constraint firstItem="E2i-As-HC7" firstAttribute="top" secondItem="bvI-vo-wNV" secondAttribute="bottom" constant="12" id="fZw-1P-uis"/>
                 <constraint firstItem="6YJ-Ux-PMN" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="tjy-fb-nU4"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
+                <outlet property="checkView" destination="E2i-As-HC7" id="147-WG-2OJ"/>
                 <outlet property="switchButton" destination="ZKM-lu-myi" id="Gli-bu-Kkp"/>
             </connections>
             <point key="canvasLocation" x="131.8840579710145" y="78.348214285714278"/>
@@ -277,9 +342,17 @@
                 <action selector="tapAction:" destination="iN0-l3-epB" id="oQQ-9p-gfF"/>
             </connections>
         </tapGestureRecognizer>
+        <tapGestureRecognizer id="Kbn-yl-Hs4">
+            <connections>
+                <action selector="tapAction:" destination="iN0-l3-epB" id="269-6d-3Zd"/>
+            </connections>
+        </tapGestureRecognizer>
     </objects>
     <resources>
         <image name="setting_next" width="6" height="11"/>
         <image name="switch_on" width="47" height="24"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
     </resources>
 </document>

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineNavView.xib

@@ -10,11 +10,11 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MineNavView">
-            <rect key="frame" x="0.0" y="0.0" width="414" height="87"/>
+            <rect key="frame" x="0.0" y="0.0" width="100" height="87"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="o7c-br-wf5">
-                    <rect key="frame" x="364" y="47" width="40" height="40"/>
+                    <rect key="frame" x="50" y="47" width="40" height="40"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="40" id="He1-cX-k8M"/>
                         <constraint firstAttribute="width" constant="40" id="S21-d9-pEr"/>
@@ -26,7 +26,7 @@
                     </connections>
                 </button>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EJV-LH-t1s">
-                    <rect key="frame" x="319" y="47" width="40" height="40"/>
+                    <rect key="frame" x="5" y="47" width="40" height="40"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="40" id="deq-GW-hFW"/>
                         <constraint firstAttribute="width" constant="40" id="hPx-qs-89D"/>
@@ -48,7 +48,7 @@
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <point key="canvasLocation" x="131.8840579710145" y="-96.763392857142847"/>
+            <point key="canvasLocation" x="353.62318840579712" y="-96.763392857142847"/>
         </view>
     </objects>
     <resources>

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/Chat/InputBar/InputBarControl.m

@@ -89,7 +89,7 @@
     
     [UIView animateWithDuration:0.2 animations:^{
         [UIView setAnimationCurve:curve];
-        self.frame = CGRectMake(-([UIScreen mainScreen].bounds.size.width-self.originalFrame.size.width), self.originalFrame.origin.y-keyboardBounds.size.height,[UIScreen mainScreen].bounds.size.width,HeighInputBar);
+        self.frame = CGRectMake(iPhoneXSafeBottomMargin-([UIScreen mainScreen].bounds.size.width-self.originalFrame.size.width), self.originalFrame.origin.y-keyboardBounds.size.height,[UIScreen mainScreen].bounds.size.width,HeighInputBar);
         [UIView commitAnimations];
     }];
     if ([self.delegate respondsToSelector:@selector(onInputBarControlContentSizeChanged:withAnimationDuration:andAnimationCurve:)]) {

+ 7 - 7
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/Chat/MessageManager/MessageCell/MessageCell.m

@@ -8,10 +8,11 @@
 
 #import "MessageCell.h"
 #import "Masonry.h"
-#import "RolePortraitView.h"
 #import "ClassroomService.h"
+
 @interface MessageCell()
-@property(nonatomic, strong) RolePortraitView *headerImage;
+@property (nonatomic, strong) UIImageView *headerImage;
+
 @property(nonatomic, strong) UILabel *nameLabel;
 @property (nonatomic, strong) UIView *sendStatusContentView;
 @property (nonatomic, strong) UIActivityIndicatorView *sendIndicatorView;
@@ -71,7 +72,7 @@
         member = [[RoomMember alloc] init];
     }
     member.name = self.nameLabel.text;
-    [self.headerImage addHeaderBackground:member];
+    [self.headerImage sd_setImageWithURL:[NSURL URLWithString:[member.headUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USER_LOGO_RECTANGLE]];
 }
 
 - (void)showSendIndicatorView:(BOOL)show{
@@ -159,16 +160,15 @@
         _messageContentView.backgroundColor = HexRGB(0xffffff);
         _messageContentView.layer.masksToBounds = YES;
         _messageContentView.layer.cornerRadius = 4;
-        
     }
     return _messageContentView;
 }
 
-- (RolePortraitView *)headerImage{
+- (UIImageView *)headerImage {
     if (!_headerImage) {
-        _headerImage = [[RolePortraitView alloc] init];
+        _headerImage = [[UIImageView alloc] init];
         _headerImage.layer.masksToBounds = YES;
-        _headerImage.layer.cornerRadius = 20;
+        _headerImage.layer.cornerRadius = 6;
     }
     return _headerImage;
 }

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomService.m

@@ -354,6 +354,7 @@
                 mem.joinTime = msg.timestamp;
                 mem.cameraEnable = YES;
                 mem.microphoneEnable = YES;
+                mem.headUrl = msg.avatar;
                 if ([self.currentRoom addMemeber:mem]) {
                     [self.classroomDelegate memberDidJoin:mem];
                 }

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Message/MemberChangeMessage.h

@@ -29,5 +29,7 @@ typedef NS_ENUM(NSUInteger, MemberChangeAction) {
 @property (nonatomic, assign) MemberChangeAction action;
 @property (nonatomic, assign) int role;
 @property (nonatomic, assign) long timestamp;
+@property (nonatomic, strong) NSString *avatar;
+
 @end
 

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Message/MemberChangeMessage.m

@@ -20,6 +20,7 @@
         self.userId = [member stringValueForKey:@"userId"];
         self.userName = [member stringValueForKey:@"username"];
         self.role = [member intValueForKey:@"role"];
+        self.avatar = [member stringValueForKey:@"avatar"];
         NSString *roleString = [dic stringValueForKey:@"changedEnum"];
         if ([roleString isEqualToString:@"LEAVE"]) {
             self.action = MemberChangeActionLeave;
@@ -33,6 +34,7 @@
         
         
         self.timestamp = [member longValueForKey:@"joinTime"];
+        
     }
 }
 + (NSString *)getObjectName {

+ 6 - 0
KulexiuForStudent/fastlane/Appfile

@@ -0,0 +1,6 @@
+# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
+# apple_id("[[APPLE_ID]]") # Your Apple email address
+
+
+# For more information about the Appfile, see:
+#     https://docs.fastlane.tools/advanced/#appfile

+ 46 - 0
KulexiuForStudent/fastlane/Fastfile

@@ -0,0 +1,46 @@
+# This file contains the fastlane.tools configuration
+# You can find the documentation at https://docs.fastlane.tools
+#
+# For a list of all available actions, check out
+#
+#     https://docs.fastlane.tools/actions
+#
+# For a list of all available plugins, check out
+#
+#     https://docs.fastlane.tools/plugins/available-plugins
+#
+
+# Uncomment the line if you want fastlane to automatically update itself
+# update_fastlane
+
+default_platform(:ios)
+
+
+platform :ios do
+  desc "酷乐秀自动化打包"
+  lane :Colexiu  do
+    time = Time.new.strftime("%Y%m%d") #获取时间格式
+    version = get_version_number #获取版本号
+    ipaName = "酷乐秀#{version}_#{time}.ipa"
+    scheme = "KulexiuForStudent"  # 项目的 scheme,自己项目名
+
+    # add actions here: https://docs.fastlane.tools/actions
+# 开始打包
+  build_app(
+  clean: true,    # 每次打包之前clean一下
+  workspace: "KulexiuForStudent.xcworkspace", # 指定工程文件
+  export_method: 'development',  # 打包导出方式,包含 app-store, validation, ad-hoc, package,enterprise, development, developer-id and mac-application
+  export_xcargs: '-allowProvisioningUpdates', # 这个设置是为了设置 xcode 自动配置证书和配置文件,当然也可以手动配置,可以参考文档
+  configuration: 'Debug',   # 默认 Release,Release or Debug
+  silent: true, # 隐藏构建app时输出的不必要的信息
+  output_directory: '/Users/wangzhi/Desktop/Archive/Debug',  # 打包出 ipa 文件的路径   output_name:"#{ipaName}", # 打包的名称,可任意取
+)
+#配置上传蒲公英账号  蒲公英的 api_key和 user_key  
+    pgyer(api_key:'b4f2e606f6a6ffd71f5368fc9af634ea', user_key: 'fca8034bee3a119cbbe9ccd81141b8e7')
+    # mac上的通知弹窗,通知打包完毕
+    notification(app_icon: './fastlane/icon.png', title: 'manager', subtitle: '打包成功,已导出安装包', message: '准备发布中……')
+    
+    # 通知上传成功
+    notification(app_icon:"icon.png",title:"LoanManager",subtitle: "IPA上传成功", message: "自动打包完成!")
+  end
+end

+ 32 - 0
KulexiuForStudent/fastlane/README.md

@@ -0,0 +1,32 @@
+fastlane documentation
+----
+
+# Installation
+
+Make sure you have the latest version of the Xcode command line tools installed:
+
+```sh
+xcode-select --install
+```
+
+For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
+
+# Available Actions
+
+## iOS
+
+### ios Colexiu
+
+```sh
+[bundle exec] fastlane ios Colexiu
+```
+
+酷乐秀自动化打包
+
+----
+
+This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
+
+More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
+
+The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

File diff suppressed because it is too large
+ 19 - 0
KulexiuForStudent/fastlane/report.xml


Some files were not shown because too many files changed in this diff