Bläddra i källkod

Merge remote-tracking branch 'refs/remotes/origin/main'

culturetown 11 månader sedan
förälder
incheckning
e34e490863
58 ändrade filer med 4766 tillägg och 978 borttagningar
  1. 176 12
      Koala/Koala.xcodeproj/project.pbxproj
  2. 1 1
      Koala/Koala/FX/Base/BaseView.swift
  3. 14 1
      Koala/Koala/FX/Macro/ColorOrImage.swift
  4. 2 2
      Koala/Koala/FX/Macro/PublicMethod.swift
  5. 15 7
      Koala/Koala/FX/NetClass/Network.swift
  6. 1 0
      Koala/Koala/FX/NetClass/URLS.swift
  7. 55 0
      Koala/Koala/Modular/Market/M/MarketModel.swift
  8. 21 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDAnnouncementView/MDAnnouncementView.swift
  9. 170 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteInfoCell.swift
  10. 358 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteInfoCell.xib
  11. 200 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteKLinewCell.swift
  12. 56 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteKLinewCell.xib
  13. 218 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteView.swift
  14. 21 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDFinanceView/MDFinanceView.swift
  15. 21 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDNewsView/MDNewsView.swift
  16. 21 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsView.swift
  17. 21 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDProfileView/MDProfileView.swift
  18. 147 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MarketDetailNavView.swift
  19. 149 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MarketDetailNavView.xib
  20. 0 239
      Koala/Koala/Modular/Market/V/MarketListCell.swift
  21. 0 75
      Koala/Koala/Modular/Market/V/MarketNavView.swift
  22. 0 369
      Koala/Koala/Modular/Market/V/MarketView.swift
  23. 298 0
      Koala/Koala/Modular/Market/V/MarketView/MarketHeaderView.swift
  24. 276 0
      Koala/Koala/Modular/Market/V/MarketView/MarketHeaderView.xib
  25. 81 0
      Koala/Koala/Modular/Market/V/MarketView/MarketListCell.swift
  26. 94 0
      Koala/Koala/Modular/Market/V/MarketView/MarketListCell.xib
  27. 4 5
      Koala/Koala/Modular/Market/V/MarketView/MarketListHeaderView.swift
  28. 87 0
      Koala/Koala/Modular/Market/V/MarketView/MarketNavView.swift
  29. 99 0
      Koala/Koala/Modular/Market/V/MarketView/MarketOptionsListCell.swift
  30. 105 0
      Koala/Koala/Modular/Market/V/MarketView/MarketOptionsListCell.xib
  31. 0 0
      Koala/Koala/Modular/Market/V/MarketView/MarketPopView.swift
  32. 291 0
      Koala/Koala/Modular/Market/V/MarketView/MarketRecommendView.swift
  33. 147 0
      Koala/Koala/Modular/Market/V/MarketView/MarketRecommendView.xib
  34. 447 0
      Koala/Koala/Modular/Market/V/MarketView/MarketView.swift
  35. 269 0
      Koala/Koala/Modular/Market/VC/MarketDetailViewController.swift
  36. 13 6
      Koala/Koala/Modular/Market/VC/MarketViewController.swift
  37. 13 0
      Koala/Koala/Modular/Market/VM/MDAnnouncementViewModel.swift
  38. 175 0
      Koala/Koala/Modular/Market/VM/MDAuoteViewModel.swift
  39. 13 0
      Koala/Koala/Modular/Market/VM/MDFinanceViewModel.swift
  40. 13 0
      Koala/Koala/Modular/Market/VM/MDNewsViewModel.swift
  41. 13 0
      Koala/Koala/Modular/Market/VM/MDOptionsViewModel.swift
  42. 13 0
      Koala/Koala/Modular/Market/VM/MDProfileViewModel.swift
  43. 539 163
      Koala/Koala/Modular/Market/VM/MarketViewModel.swift
  44. 1 1
      Koala/Koala/Modular/MarketDetail/C/MarketMainDetailViewController.swift
  45. 0 97
      Koala/Koala/Modular/MarketDetail/V/MarketDetailNavView.swift
  46. 1 0
      Koala/Koala/Modular/Public/Model/PublicModel.swift
  47. 21 0
      Koala/Koala/Other/Assets.xcassets/Market/Market_W_Recommend_Hint.imageset/Contents.json
  48. BIN
      Koala/Koala/Other/Assets.xcassets/Market/Market_W_Recommend_Hint.imageset/no-data.png
  49. 21 0
      Koala/Koala/Other/Assets.xcassets/Market/Market_W_Screen.imageset/Contents.json
  50. BIN
      Koala/Koala/Other/Assets.xcassets/Market/Market_W_Screen.imageset/filter1.png
  51. 21 0
      Koala/Koala/Other/Assets.xcassets/Market/Market_W_Select.imageset/Contents.json
  52. BIN
      Koala/Koala/Other/Assets.xcassets/Market/Market_W_Select.imageset/check1.png
  53. 21 0
      Koala/Koala/Other/Assets.xcassets/Market/Market_W_unSelect.imageset/Contents.json
  54. BIN
      Koala/Koala/Other/Assets.xcassets/Market/Market_W_unSelect.imageset/check.png
  55. 23 0
      Koala/Koala/Other/Assets.xcassets/Market/Market_unCollection.imageset/Contents.json
  56. BIN
      Koala/Koala/Other/Assets.xcassets/Market/Market_unCollection.imageset/路径备份 4.png
  57. BIN
      Koala/Koala/Other/Assets.xcassets/Market/Market_unCollection.imageset/路径备份 4@2x.png
  58. BIN
      Koala/Koala/Other/Assets.xcassets/Market/Market_unCollection.imageset/路径备份 4@3x.png

+ 176 - 12
Koala/Koala.xcodeproj/project.pbxproj

@@ -134,7 +134,6 @@
 		04D38E872A9EEA750047EF9C /* InfomationListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38E862A9EEA750047EF9C /* InfomationListViewController.swift */; };
 		04D38E892A9F1DB30047EF9C /* InfomationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38E882A9F1DB30047EF9C /* InfomationCell.swift */; };
 		04D38E8E2AA1C0C80047EF9C /* MarketMainDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38E8D2AA1C0C80047EF9C /* MarketMainDetailViewController.swift */; };
-		04D38E902AA1C4460047EF9C /* MarketDetailNavView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38E8F2AA1C4460047EF9C /* MarketDetailNavView.swift */; };
 		04D38E922AA1C82F0047EF9C /* MarketAnnouncementViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38E912AA1C82F0047EF9C /* MarketAnnouncementViewController.swift */; };
 		04D38E942AA1CB060047EF9C /* AnnouncementCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38E932AA1CB060047EF9C /* AnnouncementCell.swift */; };
 		04D38E962AA1CE8B0047EF9C /* MarketGeneralSituationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38E952AA1CE8B0047EF9C /* MarketGeneralSituationViewController.swift */; };
@@ -147,7 +146,6 @@
 		04D38EA82AA8553E0047EF9C /* FinancesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38EA72AA8553E0047EF9C /* FinancesView.swift */; };
 		04D38EAA2AA98EEF0047EF9C /* MarketNewsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38EA92AA98EEF0047EF9C /* MarketNewsViewController.swift */; };
 		04D38EAC2AAAE9B10047EF9C /* MarketNavView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38EAB2AAAE9B10047EF9C /* MarketNavView.swift */; };
-		04D38EAE2AAAF6E90047EF9C /* MarketListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38EAD2AAAF6E90047EF9C /* MarketListCell.swift */; };
 		04D38EB02AAB07B10047EF9C /* MarketListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38EAF2AAB07B10047EF9C /* MarketListHeaderView.swift */; };
 		04D38EB22AAB19E80047EF9C /* JDHomeMenuCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38EB12AAB19E80047EF9C /* JDHomeMenuCell.swift */; };
 		04D38EB42AAC164A0047EF9C /* JDHomeExponentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D38EB32AAC164A0047EF9C /* JDHomeExponentCell.swift */; };
@@ -586,6 +584,33 @@
 		6CA9FF33295DCED70097ABA6 /* SecuritySettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CA9FF32295DCED70097ABA6 /* SecuritySettingsViewModel.swift */; };
 		6CA9FF36295DCEF20097ABA6 /* SecuritySettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CA9FF35295DCEF20097ABA6 /* SecuritySettingsView.swift */; };
 		6CBB62B82AD2F6540045A4C9 /* JDChartLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62B52AD2F6540045A4C9 /* JDChartLineView.swift */; };
+		6CBB62BB2AD427F00045A4C9 /* MarketListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62B92AD427F00045A4C9 /* MarketListCell.swift */; };
+		6CBB62BC2AD427F00045A4C9 /* MarketListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CBB62BA2AD427F00045A4C9 /* MarketListCell.xib */; };
+		6CBB62BE2AD4451D0045A4C9 /* MarketRecommendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62BD2AD4451D0045A4C9 /* MarketRecommendView.swift */; };
+		6CBB62C02AD445320045A4C9 /* MarketRecommendView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CBB62BF2AD445320045A4C9 /* MarketRecommendView.xib */; };
+		6CBB62C32AD588260045A4C9 /* MarketHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62C22AD588260045A4C9 /* MarketHeaderView.swift */; };
+		6CBB62C72AD588380045A4C9 /* MarketHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CBB62C62AD588380045A4C9 /* MarketHeaderView.xib */; };
+		6CBB62CA2AD6EFD80045A4C9 /* MarketOptionsListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62C82AD6EFD80045A4C9 /* MarketOptionsListCell.swift */; };
+		6CBB62CB2AD6EFD80045A4C9 /* MarketOptionsListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CBB62C92AD6EFD80045A4C9 /* MarketOptionsListCell.xib */; };
+		6CBB62CD2AD81EC80045A4C9 /* MarketDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62CC2AD81EC80045A4C9 /* MarketDetailViewController.swift */; };
+		6CBB62D12AD81F550045A4C9 /* MarketDetailNavView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62D02AD81F550045A4C9 /* MarketDetailNavView.swift */; };
+		6CBB62D32AD820130045A4C9 /* MarketDetailNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CBB62D22AD820130045A4C9 /* MarketDetailNavView.xib */; };
+		6CBB62D52AD827F20045A4C9 /* MDAuoteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62D42AD827F20045A4C9 /* MDAuoteView.swift */; };
+		6CBB62D72AD828170045A4C9 /* MDFinanceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62D62AD828170045A4C9 /* MDFinanceView.swift */; };
+		6CBB62D92AD828440045A4C9 /* MDProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62D82AD828440045A4C9 /* MDProfileView.swift */; };
+		6CBB62DB2AD828550045A4C9 /* MDNewsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62DA2AD828550045A4C9 /* MDNewsView.swift */; };
+		6CBB62DD2AD828990045A4C9 /* MDAnnouncementView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62DC2AD828990045A4C9 /* MDAnnouncementView.swift */; };
+		6CBB62DF2AD828C20045A4C9 /* MDOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62DE2AD828C20045A4C9 /* MDOptionsView.swift */; };
+		6CBB62E12AD829170045A4C9 /* MDAuoteViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62E02AD829170045A4C9 /* MDAuoteViewModel.swift */; };
+		6CBB62E32AD829290045A4C9 /* MDFinanceViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62E22AD829290045A4C9 /* MDFinanceViewModel.swift */; };
+		6CBB62E52AD829360045A4C9 /* MDProfileViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62E42AD829360045A4C9 /* MDProfileViewModel.swift */; };
+		6CBB62E72AD829440045A4C9 /* MDNewsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62E62AD829440045A4C9 /* MDNewsViewModel.swift */; };
+		6CBB62E92AD829500045A4C9 /* MDAnnouncementViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62E82AD829500045A4C9 /* MDAnnouncementViewModel.swift */; };
+		6CBB62EB2AD8295C0045A4C9 /* MDOptionsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62EA2AD8295C0045A4C9 /* MDOptionsViewModel.swift */; };
+		6CBB62F52AD83CD00045A4C9 /* MDAuoteInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62F32AD83CD00045A4C9 /* MDAuoteInfoCell.swift */; };
+		6CBB62F62AD83CD00045A4C9 /* MDAuoteInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CBB62F42AD83CD00045A4C9 /* MDAuoteInfoCell.xib */; };
+		6CBB62F92AD84E2D0045A4C9 /* MDAuoteKLinewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBB62F72AD84E2D0045A4C9 /* MDAuoteKLinewCell.swift */; };
+		6CBB62FA2AD84E2D0045A4C9 /* MDAuoteKLinewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CBB62F82AD84E2D0045A4C9 /* MDAuoteKLinewCell.xib */; };
 		6CBDC8F32972F352003E068F /* ScriptMessageProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBDC8F22972F352003E068F /* ScriptMessageProxy.swift */; };
 		6CBDC8F52972F443003E068F /* WKWebViewConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBDC8F42972F443003E068F /* WKWebViewConfiguration.swift */; };
 		6CBDC8F72972FB69003E068F /* BaseWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBDC8F62972FB69003E068F /* BaseWebViewController.swift */; };
@@ -887,7 +912,6 @@
 		04D38E862A9EEA750047EF9C /* InfomationListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfomationListViewController.swift; sourceTree = "<group>"; };
 		04D38E882A9F1DB30047EF9C /* InfomationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfomationCell.swift; sourceTree = "<group>"; };
 		04D38E8D2AA1C0C80047EF9C /* MarketMainDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketMainDetailViewController.swift; sourceTree = "<group>"; };
-		04D38E8F2AA1C4460047EF9C /* MarketDetailNavView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketDetailNavView.swift; sourceTree = "<group>"; };
 		04D38E912AA1C82F0047EF9C /* MarketAnnouncementViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketAnnouncementViewController.swift; sourceTree = "<group>"; };
 		04D38E932AA1CB060047EF9C /* AnnouncementCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnnouncementCell.swift; sourceTree = "<group>"; };
 		04D38E952AA1CE8B0047EF9C /* MarketGeneralSituationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketGeneralSituationViewController.swift; sourceTree = "<group>"; };
@@ -900,7 +924,6 @@
 		04D38EA72AA8553E0047EF9C /* FinancesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinancesView.swift; sourceTree = "<group>"; };
 		04D38EA92AA98EEF0047EF9C /* MarketNewsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketNewsViewController.swift; sourceTree = "<group>"; };
 		04D38EAB2AAAE9B10047EF9C /* MarketNavView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketNavView.swift; sourceTree = "<group>"; };
-		04D38EAD2AAAF6E90047EF9C /* MarketListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketListCell.swift; sourceTree = "<group>"; };
 		04D38EAF2AAB07B10047EF9C /* MarketListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketListHeaderView.swift; sourceTree = "<group>"; };
 		04D38EB12AAB19E80047EF9C /* JDHomeMenuCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JDHomeMenuCell.swift; sourceTree = "<group>"; };
 		04D38EB32AAC164A0047EF9C /* JDHomeExponentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JDHomeExponentCell.swift; sourceTree = "<group>"; };
@@ -1347,6 +1370,33 @@
 		6CA9FF32295DCED70097ABA6 /* SecuritySettingsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecuritySettingsViewModel.swift; sourceTree = "<group>"; };
 		6CA9FF35295DCEF20097ABA6 /* SecuritySettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecuritySettingsView.swift; sourceTree = "<group>"; };
 		6CBB62B52AD2F6540045A4C9 /* JDChartLineView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JDChartLineView.swift; sourceTree = "<group>"; };
+		6CBB62B92AD427F00045A4C9 /* MarketListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketListCell.swift; sourceTree = "<group>"; };
+		6CBB62BA2AD427F00045A4C9 /* MarketListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MarketListCell.xib; sourceTree = "<group>"; };
+		6CBB62BD2AD4451D0045A4C9 /* MarketRecommendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketRecommendView.swift; sourceTree = "<group>"; };
+		6CBB62BF2AD445320045A4C9 /* MarketRecommendView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MarketRecommendView.xib; sourceTree = "<group>"; };
+		6CBB62C22AD588260045A4C9 /* MarketHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketHeaderView.swift; sourceTree = "<group>"; };
+		6CBB62C62AD588380045A4C9 /* MarketHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MarketHeaderView.xib; sourceTree = "<group>"; };
+		6CBB62C82AD6EFD80045A4C9 /* MarketOptionsListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketOptionsListCell.swift; sourceTree = "<group>"; };
+		6CBB62C92AD6EFD80045A4C9 /* MarketOptionsListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MarketOptionsListCell.xib; sourceTree = "<group>"; };
+		6CBB62CC2AD81EC80045A4C9 /* MarketDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketDetailViewController.swift; sourceTree = "<group>"; };
+		6CBB62D02AD81F550045A4C9 /* MarketDetailNavView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketDetailNavView.swift; sourceTree = "<group>"; };
+		6CBB62D22AD820130045A4C9 /* MarketDetailNavView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MarketDetailNavView.xib; sourceTree = "<group>"; };
+		6CBB62D42AD827F20045A4C9 /* MDAuoteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDAuoteView.swift; sourceTree = "<group>"; };
+		6CBB62D62AD828170045A4C9 /* MDFinanceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDFinanceView.swift; sourceTree = "<group>"; };
+		6CBB62D82AD828440045A4C9 /* MDProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDProfileView.swift; sourceTree = "<group>"; };
+		6CBB62DA2AD828550045A4C9 /* MDNewsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDNewsView.swift; sourceTree = "<group>"; };
+		6CBB62DC2AD828990045A4C9 /* MDAnnouncementView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDAnnouncementView.swift; sourceTree = "<group>"; };
+		6CBB62DE2AD828C20045A4C9 /* MDOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsView.swift; sourceTree = "<group>"; };
+		6CBB62E02AD829170045A4C9 /* MDAuoteViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDAuoteViewModel.swift; sourceTree = "<group>"; };
+		6CBB62E22AD829290045A4C9 /* MDFinanceViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDFinanceViewModel.swift; sourceTree = "<group>"; };
+		6CBB62E42AD829360045A4C9 /* MDProfileViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDProfileViewModel.swift; sourceTree = "<group>"; };
+		6CBB62E62AD829440045A4C9 /* MDNewsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDNewsViewModel.swift; sourceTree = "<group>"; };
+		6CBB62E82AD829500045A4C9 /* MDAnnouncementViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDAnnouncementViewModel.swift; sourceTree = "<group>"; };
+		6CBB62EA2AD8295C0045A4C9 /* MDOptionsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsViewModel.swift; sourceTree = "<group>"; };
+		6CBB62F32AD83CD00045A4C9 /* MDAuoteInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDAuoteInfoCell.swift; sourceTree = "<group>"; };
+		6CBB62F42AD83CD00045A4C9 /* MDAuoteInfoCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDAuoteInfoCell.xib; sourceTree = "<group>"; };
+		6CBB62F72AD84E2D0045A4C9 /* MDAuoteKLinewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDAuoteKLinewCell.swift; sourceTree = "<group>"; };
+		6CBB62F82AD84E2D0045A4C9 /* MDAuoteKLinewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDAuoteKLinewCell.xib; sourceTree = "<group>"; };
 		6CBDC8F22972F352003E068F /* ScriptMessageProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScriptMessageProxy.swift; sourceTree = "<group>"; };
 		6CBDC8F42972F443003E068F /* WKWebViewConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WKWebViewConfiguration.swift; sourceTree = "<group>"; };
 		6CBDC8F62972FB69003E068F /* BaseWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseWebViewController.swift; sourceTree = "<group>"; };
@@ -1781,7 +1831,6 @@
 		04D38E8C2AA1C0B50047EF9C /* V */ = {
 			isa = PBXGroup;
 			children = (
-				04D38E8F2AA1C4460047EF9C /* MarketDetailNavView.swift */,
 				04D38E932AA1CB060047EF9C /* AnnouncementCell.swift */,
 				04D38EA02AA704140047EF9C /* GeneralSituationHeaderView.swift */,
 				04D38EA22AA804080047EF9C /* ShareholderInfoCell.swift */,
@@ -2843,6 +2892,12 @@
 			isa = PBXGroup;
 			children = (
 				6CBDC8FA2973059F003E068F /* MarketViewModel.swift */,
+				6CBB62E02AD829170045A4C9 /* MDAuoteViewModel.swift */,
+				6CBB62E22AD829290045A4C9 /* MDFinanceViewModel.swift */,
+				6CBB62E42AD829360045A4C9 /* MDProfileViewModel.swift */,
+				6CBB62E62AD829440045A4C9 /* MDNewsViewModel.swift */,
+				6CBB62E82AD829500045A4C9 /* MDAnnouncementViewModel.swift */,
+				6CBB62EA2AD8295C0045A4C9 /* MDOptionsViewModel.swift */,
 			);
 			path = VM;
 			sourceTree = "<group>";
@@ -2850,11 +2905,8 @@
 		6C584E24295C607400CE1D2C /* V */ = {
 			isa = PBXGroup;
 			children = (
-				6CBDC8F82973058E003E068F /* MarketView.swift */,
-				6C35369629817804003BB632 /* MarketPopView.swift */,
-				04D38EAB2AAAE9B10047EF9C /* MarketNavView.swift */,
-				04D38EAD2AAAF6E90047EF9C /* MarketListCell.swift */,
-				04D38EAF2AAB07B10047EF9C /* MarketListHeaderView.swift */,
+				6CBB62CF2AD81EE70045A4C9 /* MarketView */,
+				6CBB62CE2AD81ED10045A4C9 /* MarketDetailView */,
 			);
 			path = V;
 			sourceTree = "<group>";
@@ -2863,6 +2915,7 @@
 			isa = PBXGroup;
 			children = (
 				6C584E26295C60C000CE1D2C /* MarketViewController.swift */,
+				6CBB62CC2AD81EC80045A4C9 /* MarketDetailViewController.swift */,
 			);
 			path = VC;
 			sourceTree = "<group>";
@@ -3203,6 +3256,92 @@
 			path = SecuritySettings;
 			sourceTree = "<group>";
 		};
+		6CBB62CE2AD81ED10045A4C9 /* MarketDetailView */ = {
+			isa = PBXGroup;
+			children = (
+				6CBB62D02AD81F550045A4C9 /* MarketDetailNavView.swift */,
+				6CBB62D22AD820130045A4C9 /* MarketDetailNavView.xib */,
+				6CBB62ED2AD83BCA0045A4C9 /* MDAuoteView */,
+				6CBB62EE2AD83BDE0045A4C9 /* MDFinanceView */,
+				6CBB62EF2AD83BF00045A4C9 /* MDProfileView */,
+				6CBB62F02AD83C000045A4C9 /* MDNewsView */,
+				6CBB62F12AD83C0D0045A4C9 /* MDAnnouncementView */,
+				6CBB62F22AD83C190045A4C9 /* MDOptionsView */,
+			);
+			path = MarketDetailView;
+			sourceTree = "<group>";
+		};
+		6CBB62CF2AD81EE70045A4C9 /* MarketView */ = {
+			isa = PBXGroup;
+			children = (
+				6CBDC8F82973058E003E068F /* MarketView.swift */,
+				6CBB62B92AD427F00045A4C9 /* MarketListCell.swift */,
+				6CBB62BA2AD427F00045A4C9 /* MarketListCell.xib */,
+				6CBB62C82AD6EFD80045A4C9 /* MarketOptionsListCell.swift */,
+				6CBB62C92AD6EFD80045A4C9 /* MarketOptionsListCell.xib */,
+				6C35369629817804003BB632 /* MarketPopView.swift */,
+				04D38EAB2AAAE9B10047EF9C /* MarketNavView.swift */,
+				6CBB62C22AD588260045A4C9 /* MarketHeaderView.swift */,
+				6CBB62C62AD588380045A4C9 /* MarketHeaderView.xib */,
+				04D38EAF2AAB07B10047EF9C /* MarketListHeaderView.swift */,
+				6CBB62BD2AD4451D0045A4C9 /* MarketRecommendView.swift */,
+				6CBB62BF2AD445320045A4C9 /* MarketRecommendView.xib */,
+			);
+			path = MarketView;
+			sourceTree = "<group>";
+		};
+		6CBB62ED2AD83BCA0045A4C9 /* MDAuoteView */ = {
+			isa = PBXGroup;
+			children = (
+				6CBB62D42AD827F20045A4C9 /* MDAuoteView.swift */,
+				6CBB62F32AD83CD00045A4C9 /* MDAuoteInfoCell.swift */,
+				6CBB62F42AD83CD00045A4C9 /* MDAuoteInfoCell.xib */,
+				6CBB62F72AD84E2D0045A4C9 /* MDAuoteKLinewCell.swift */,
+				6CBB62F82AD84E2D0045A4C9 /* MDAuoteKLinewCell.xib */,
+			);
+			path = MDAuoteView;
+			sourceTree = "<group>";
+		};
+		6CBB62EE2AD83BDE0045A4C9 /* MDFinanceView */ = {
+			isa = PBXGroup;
+			children = (
+				6CBB62D62AD828170045A4C9 /* MDFinanceView.swift */,
+			);
+			path = MDFinanceView;
+			sourceTree = "<group>";
+		};
+		6CBB62EF2AD83BF00045A4C9 /* MDProfileView */ = {
+			isa = PBXGroup;
+			children = (
+				6CBB62D82AD828440045A4C9 /* MDProfileView.swift */,
+			);
+			path = MDProfileView;
+			sourceTree = "<group>";
+		};
+		6CBB62F02AD83C000045A4C9 /* MDNewsView */ = {
+			isa = PBXGroup;
+			children = (
+				6CBB62DA2AD828550045A4C9 /* MDNewsView.swift */,
+			);
+			path = MDNewsView;
+			sourceTree = "<group>";
+		};
+		6CBB62F12AD83C0D0045A4C9 /* MDAnnouncementView */ = {
+			isa = PBXGroup;
+			children = (
+				6CBB62DC2AD828990045A4C9 /* MDAnnouncementView.swift */,
+			);
+			path = MDAnnouncementView;
+			sourceTree = "<group>";
+		};
+		6CBB62F22AD83C190045A4C9 /* MDOptionsView */ = {
+			isa = PBXGroup;
+			children = (
+				6CBB62DE2AD828C20045A4C9 /* MDOptionsView.swift */,
+			);
+			path = MDOptionsView;
+			sourceTree = "<group>";
+		};
 		6CBDC8EB2972EDC7003E068F /* WebView */ = {
 			isa = PBXGroup;
 			children = (
@@ -3603,6 +3742,7 @@
 				6CA7130C2956F2E30047F450 /* MineHeaderViewCell.xib in Resources */,
 				6C4AFB0C29A1035E00508EA7 /* HoldAccountInfoCell.xib in Resources */,
 				6CD200B829E709A600F0966D /* ASavingsDetailsScreenPopView.xib in Resources */,
+				6CBB62D32AD820130045A4C9 /* MarketDetailNavView.xib in Resources */,
 				6C10F10429DB08D900B79491 /* updateAPP006.png in Resources */,
 				6CA713562959F8F30047F450 /* ForgotPasswordCell.xib in Resources */,
 				6C4AFAD9299D1FD100508EA7 /* AFiatDepositsCell.xib in Resources */,
@@ -3617,6 +3757,7 @@
 				6C00A883242D8FEB00CE9ADB /* LaunchScreen.storyboard in Resources */,
 				6C2FFCD42961C423005B8180 /* RealNameCell.xib in Resources */,
 				6C10F10529DB08D900B79491 /* updateAPP038.png in Resources */,
+				6CBB62C02AD445320045A4C9 /* MarketRecommendView.xib in Resources */,
 				6C10F0EA29DB08D900B79491 /* updateAPP088.png in Resources */,
 				6CDC5B0329CF140500E60730 /* AHistoryDetailsViewController.xib in Resources */,
 				6C0C4990295DD2F8000BFEEB /* SecuritySettingsCell.xib in Resources */,
@@ -3636,6 +3777,7 @@
 				6C86531A29B4E0E500A2E7FB /* TalentReportViewController.xib in Resources */,
 				6C35368629800931003BB632 /* CTDealHeaderView.xib in Resources */,
 				6C10F10629DB08D900B79491 /* updateAPP010.png in Resources */,
+				6CBB62C72AD588380045A4C9 /* MarketHeaderView.xib in Resources */,
 				6C2FFCA529607AB7005B8180 /* TradingPasswordsCell.xib in Resources */,
 				6C3717D529AA3D59000DDD8B /* MyCopyingHeaderView.xib in Resources */,
 				6C2EAD8029E3110800E03AF8 /* AInvestNowViewController.xib in Resources */,
@@ -3659,6 +3801,7 @@
 				6C4AFAEA299E870400508EA7 /* AFiatWithdrawalsListCell.xib in Resources */,
 				6CC37FC3298971030079FA5C /* DealHintListCell.xib in Resources */,
 				6C031B202962C4DA0043BECF /* RealNameFileCell.xib in Resources */,
+				6CBB62BC2AD427F00045A4C9 /* MarketListCell.xib in Resources */,
 				6CD5EB8129D9DE870053325F /* CommunityHeaderView.xib in Resources */,
 				6C10F0E229DB08D900B79491 /* updateAPP078.png in Resources */,
 				6C8652F729AA6E9D00A2E7FB /* TDStatisticsProfitCell.xib in Resources */,
@@ -3676,10 +3819,12 @@
 				6C7A1AF629F82BCC004CFBE3 /* CreditsListCell.xib in Resources */,
 				6C86530829AFAC5400A2E7FB /* TDProfitInfoCell.xib in Resources */,
 				6C2FFC9A295F5ACC005B8180 /* LoginCell.xib in Resources */,
+				6CBB62CB2AD6EFD80045A4C9 /* MarketOptionsListCell.xib in Resources */,
 				6C10F10029DB08D900B79491 /* updateAPP014.png in Resources */,
 				6C86531229B47ED000A2E7FB /* TDOrderListCell.xib in Resources */,
 				6CC37FFB299286700079FA5C /* AssetsSavingHeaderView.xib in Resources */,
 				6C0C499C295DDD86000BFEEB /* ChangePasswordCell.xib in Resources */,
+				6CBB62F62AD83CD00045A4C9 /* MDAuoteInfoCell.xib in Resources */,
 				6C10F11B29E1C02700B79491 /* AFinanceRedemptionViewController.xib in Resources */,
 				6CC380032992B8A80079FA5C /* AssetsDealCell.xib in Resources */,
 				6C7A1AEB29F80797004CFBE3 /* CreditsViewController.xib in Resources */,
@@ -3771,6 +3916,7 @@
 				6C10F0D629DB08D900B79491 /* updateAPP042.png in Resources */,
 				6C00A9482432F1A500CE9ADB /* CodeScan.bundle in Resources */,
 				6C10F0E529DB08D900B79491 /* updateAPP092.png in Resources */,
+				6CBB62FA2AD84E2D0045A4C9 /* MDAuoteKLinewCell.xib in Resources */,
 				6C10F0D929DB08D900B79491 /* updateAPP080.png in Resources */,
 				6C10F0F029DB08D900B79491 /* updateAPP074.png in Resources */,
 				6C10F0E829DB08D900B79491 /* updateAPP052.png in Resources */,
@@ -3899,6 +4045,7 @@
 				6CBDC91A297AE49A003E068F /* KLineHeaderView.swift in Sources */,
 				04CEE27C2AB6052500FAA760 /* JDNewsModel.swift in Sources */,
 				6C00A920242D918D00CE9ADB /* BaseView.swift in Sources */,
+				6CBB62DF2AD828C20045A4C9 /* MDOptionsView.swift in Sources */,
 				6C4AFB0829A0FFFE00508EA7 /* PositionHistoryViewModel.swift in Sources */,
 				6C584E46295C7BB800CE1D2C /* BaseTabBarController.swift in Sources */,
 				04B46A952AD8EA4500421177 /* JDChangePasswordCell.swift in Sources */,
@@ -3930,6 +4077,7 @@
 				6C2FFCAA29608447005B8180 /* AsunBasicAttributes.swift in Sources */,
 				6C4AFB0029A0FF9B00508EA7 /* HoldView.swift in Sources */,
 				6C2FFCBA29618239005B8180 /* FreezeAccountViewController.swift in Sources */,
+				6CBB62D92AD828440045A4C9 /* MDProfileView.swift in Sources */,
 				6C00A9A324346C4600CE9ADB /* KWebsocket.swift in Sources */,
 				6C10F11A29E1C02700B79491 /* AFinanceRedemptionViewController.swift in Sources */,
 				6C7F446C29556B6000DC6771 /* BaseAlertView.swift in Sources */,
@@ -3943,8 +4091,10 @@
 				6C00A9AE2434A18B00CE9ADB /* HDEmptyView.swift in Sources */,
 				6C031DA5296315930043BECF /* FSPageControl.swift in Sources */,
 				6C00A911242D918D00CE9ADB /* PublicEnum.swift in Sources */,
+				6CBB62D12AD81F550045A4C9 /* MarketDetailNavView.swift in Sources */,
 				6C2FFCB529617471005B8180 /* KSelectBottonPopView.swift in Sources */,
 				6C031B1C2962C4C70043BECF /* RealNameFileView.swift in Sources */,
+				6CBB62E12AD829170045A4C9 /* MDAuoteViewModel.swift in Sources */,
 				04D38E5C2A9EE8A10047EF9C /* JXSegmentedTitleOrImageDataSource.swift in Sources */,
 				041D4F222AD2CAEA008ABDF7 /* JDMineJoinUsViewController.swift in Sources */,
 				04CEE2A42ABC257900FAA760 /* JDMessageListViewController.swift in Sources */,
@@ -3990,7 +4140,6 @@
 				6C2FFCA129607A2A005B8180 /* TradingPasswordsView.swift in Sources */,
 				6C7A1AF929FC1445004CFBE3 /* PHistoryFooterView.swift in Sources */,
 				6C00A9962433313300CE9ADB /* HXAlbumCell.swift in Sources */,
-				04D38EAE2AAAF6E90047EF9C /* MarketListCell.swift in Sources */,
 				6C00A9912433313300CE9ADB /* HXSelectButton.swift in Sources */,
 				6CA71345295889770047F450 /* RegisterView.swift in Sources */,
 				6C2FFCB8296174AB005B8180 /* BasePureCodeCell.swift in Sources */,
@@ -4056,6 +4205,7 @@
 				04D38EA32AA804080047EF9C /* ShareholderInfoCell.swift in Sources */,
 				6C00A9892433313300CE9ADB /* HXImageClipViewController.swift in Sources */,
 				6C00A877242D8FEA00CE9ADB /* AppDelegate.swift in Sources */,
+				6CBB62DB2AD828550045A4C9 /* MDNewsView.swift in Sources */,
 				04CEE2B82ABD3ACA00FAA760 /* JDWorkOrderDetailViewController.swift in Sources */,
 				6CA713552959F8F30047F450 /* ForgotPasswordCell.swift in Sources */,
 				6C00A8F5242D918D00CE9ADB /* ESTabBarController.swift in Sources */,
@@ -4071,6 +4221,7 @@
 				6CD5EB6429D5C6A40053325F /* FundsRecordCell.swift in Sources */,
 				6CDC5B1529D0814E00E60730 /* AssetsProxyHeaderView.swift in Sources */,
 				6CC8024329968A2300C36373 /* AWithdrawalsViewController.swift in Sources */,
+				6CBB62EB2AD8295C0045A4C9 /* MDOptionsViewModel.swift in Sources */,
 				04B46A8D2AD7BEA700421177 /* JDMineModifyNickNameViewController.swift in Sources */,
 				041D4EE42ABEBA0C008ABDF7 /* JDAFiatAccountListPopView.swift in Sources */,
 				04B46A992AD94BC500421177 /* JDRealNameAlertPopView.swift in Sources */,
@@ -4079,6 +4230,7 @@
 				6CC37FBE298962B40079FA5C /* DealHintCell.swift in Sources */,
 				6CC37FF9299286520079FA5C /* AssetsSavingHeaderView.swift in Sources */,
 				6C7A1AD029F2D5B0004CFBE3 /* AssetsDealSetDefaultPopView.swift in Sources */,
+				6CBB62C32AD588260045A4C9 /* MarketHeaderView.swift in Sources */,
 				6C4AFB3529A7B5D700508EA7 /* MessageView.swift in Sources */,
 				6C00A903242D918D00CE9ADB /* UIView+CategoryClass.swift in Sources */,
 				04D38E5D2A9EE8A10047EF9C /* JXSegmentedTitleOrImageCell.swift in Sources */,
@@ -4102,7 +4254,6 @@
 				041D4F052AC42D62008ABDF7 /* JDSelectCell.swift in Sources */,
 				6CA7134D2959F6900047F450 /* ForgotPasswordViewController.swift in Sources */,
 				6CDC5AFE29CE127900E60730 /* TransferHistoryListCell.swift in Sources */,
-				04D38E902AA1C4460047EF9C /* MarketDetailNavView.swift in Sources */,
 				6C86531529B492DA00A2E7FB /* TDUserListCell.swift in Sources */,
 				6C86530729AFAC5400A2E7FB /* TDProfitInfoCell.swift in Sources */,
 				6CA712FF2956E51C0047F450 /* MineViewModel.swift in Sources */,
@@ -4115,6 +4266,7 @@
 				04D38E702A9EE8A10047EF9C /* JXSegmentedDotCell.swift in Sources */,
 				04D38E742A9EE8A10047EF9C /* JXSegmentedTitleImageItemModel.swift in Sources */,
 				6CBDC8F32972F352003E068F /* ScriptMessageProxy.swift in Sources */,
+				6CBB62E32AD829290045A4C9 /* MDFinanceViewModel.swift in Sources */,
 				6C4AFB4429A8FC6100508EA7 /* DealTalentView.swift in Sources */,
 				6C2FFCD02961C3B5005B8180 /* RealNameView.swift in Sources */,
 				6C2FFCCD2961C39E005B8180 /* RealNameViewModel.swift in Sources */,
@@ -4127,6 +4279,7 @@
 				6CC802272994067600C36373 /* AssetsProxyInfoCell.swift in Sources */,
 				6C00A8FA242D918D00CE9ADB /* ESTabBarItemContainer.swift in Sources */,
 				04D38EB22AAB19E80047EF9C /* JDHomeMenuCell.swift in Sources */,
+				6CBB62D72AD828170045A4C9 /* MDFinanceView.swift in Sources */,
 				6C7F446A29556B2600DC6771 /* BaseViewModel.swift in Sources */,
 				04C2831C2AD69C3F00FC04AC /* JDMineUserInfoViewController.swift in Sources */,
 				04CEE2722AB4311F00FAA760 /* JDTradeAccountModel.swift in Sources */,
@@ -4135,6 +4288,7 @@
 				041D4F1E2AD2B0FC008ABDF7 /* JDMineHeaderView.swift in Sources */,
 				6C00A8F8242D918D00CE9ADB /* ESTabBarItemBadgeView.swift in Sources */,
 				6C2FFCBF29618271005B8180 /* FreezeAccountView.swift in Sources */,
+				6CBB62DD2AD828990045A4C9 /* MDAnnouncementView.swift in Sources */,
 				6CBDC91E297AE49A003E068F /* KLinePeriod.swift in Sources */,
 				6C00A918242D918D00CE9ADB /* PhotoManager.swift in Sources */,
 				04D38EA12AA704140047EF9C /* GeneralSituationHeaderView.swift in Sources */,
@@ -4160,6 +4314,7 @@
 				6C35368F29815FB7003BB632 /* DealView.swift in Sources */,
 				6C4AFB0229A0FFB300508EA7 /* HoldViewModel.swift in Sources */,
 				6C00A9942433313300CE9ADB /* HXImageNavigationView.swift in Sources */,
+				6CBB62D52AD827F20045A4C9 /* MDAuoteView.swift in Sources */,
 				6CBDC908297AD8C5003E068F /* CTKLineFooterView.swift in Sources */,
 				6C7A1ACC29F2C495004CFBE3 /* AssetsDealSetAmountPopView.swift in Sources */,
 				6CC37FC9298EC19C0079FA5C /* DealClosedPopView.swift in Sources */,
@@ -4251,6 +4406,7 @@
 				04CEE2902AB9736900FAA760 /* JDAFiatDepositsViewController.swift in Sources */,
 				6CBDC91D297AE49A003E068F /* KLineBaseView.swift in Sources */,
 				6C00A9B22434A18B00CE9ADB /* HDEmptyBaseView.swift in Sources */,
+				6CBB62F92AD84E2D0045A4C9 /* MDAuoteKLinewCell.swift in Sources */,
 				6C584E40295C687A00CE1D2C /* UIStackView+CategoryClass.swift in Sources */,
 				6C00A907242D918D00CE9ADB /* UIViewControllerProtocal.swift in Sources */,
 				6C00A8FD242D918D00CE9ADB /* String+CategoryClass.swift in Sources */,
@@ -4300,6 +4456,7 @@
 				04CEE2B62ABD351000FAA760 /* InformationFlashCell.swift in Sources */,
 				6C00A95A2432F43600CE9ADB /* LBXScanWrapper.swift in Sources */,
 				04D38EC52AB15BF80047EF9C /* JDKLineTradingSessionCell.swift in Sources */,
+				6CBB62E52AD829360045A4C9 /* MDProfileViewModel.swift in Sources */,
 				6C584E4A295CA3DA00CE1D2C /* ModifyNicknameViewController.swift in Sources */,
 				04CEE2A62ABC275800FAA760 /* JDMessageView.swift in Sources */,
 				6CC380062993D4E10079FA5C /* AssetsDealListCell.swift in Sources */,
@@ -4318,8 +4475,12 @@
 				6C4AFB5529AA21E700508EA7 /* MyCopyingViewModel.swift in Sources */,
 				6C7A1AE129F5780F004CFBE3 /* PositionHistoryDatePopView.swift in Sources */,
 				6CC37FC2298971030079FA5C /* DealHintListCell.swift in Sources */,
+				6CBB62BE2AD4451D0045A4C9 /* MarketRecommendView.swift in Sources */,
 				6C00A9A02434314F00CE9ADB /* UpdatePopupView.swift in Sources */,
+				6CBB62F52AD83CD00045A4C9 /* MDAuoteInfoCell.swift in Sources */,
 				04CEE2962ABAE9CC00FAA760 /* JDAFiatWithdrawalsCell.swift in Sources */,
+				6CBB62CD2AD81EC80045A4C9 /* MarketDetailViewController.swift in Sources */,
+				6CBB62CA2AD6EFD80045A4C9 /* MarketOptionsListCell.swift in Sources */,
 				04B46A932AD7D72300421177 /* JDMineModifyRemarkViewController.swift in Sources */,
 				04D38E612A9EE8A10047EF9C /* JXSegmentedCollectionView.swift in Sources */,
 				6CDC5B0629CF164500E60730 /* AHistoryDetaisHeaderView.swift in Sources */,
@@ -4331,6 +4492,7 @@
 				6C10F10A29E1638400B79491 /* FeedbackViewController.swift in Sources */,
 				041D4F092AC4367E008ABDF7 /* JDAccountTypeCheckCell.swift in Sources */,
 				6C4AFB0B29A1035E00508EA7 /* HoldAccountInfoCell.swift in Sources */,
+				6CBB62E72AD829440045A4C9 /* MDNewsViewModel.swift in Sources */,
 				6C031B222963136B0043BECF /* HomeHeaderView.swift in Sources */,
 				6C00A8B5242D916100CE9ADB /* UserInfoDataModel.swift in Sources */,
 				04D38E6F2A9EE8A10047EF9C /* JXSegmentedComponetGradientView.swift in Sources */,
@@ -4373,12 +4535,14 @@
 				6C3536892980156C003BB632 /* CTTradesListCell.swift in Sources */,
 				6CC37FEB298FDE2E0079FA5C /* AssetsTotalCell.swift in Sources */,
 				041D4EE82ABFE4D6008ABDF7 /* JDRecipientCurrencyListViewController.swift in Sources */,
+				6CBB62BB2AD427F00045A4C9 /* MarketListCell.swift in Sources */,
 				04D38E622A9EE8A10047EF9C /* JXSegmentedView.swift in Sources */,
 				04CEE2AA2ABC38C800FAA760 /* JDWorkOrderManagerViewController.swift in Sources */,
 				04D38E9A2AA5D3970047EF9C /* JDMineViewController.swift in Sources */,
 				04D38E652A9EE8A10047EF9C /* JXSegmentedIndicatorTriangleView.swift in Sources */,
 				04CEE2B22ABD27BC00FAA760 /* JDTextView.swift in Sources */,
 				04D38EA82AA8553E0047EF9C /* FinancesView.swift in Sources */,
+				6CBB62E92AD829500045A4C9 /* MDAnnouncementViewModel.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

+ 1 - 1
Koala/Koala/FX/Base/BaseView.swift

@@ -7,7 +7,7 @@
 //
 
 import UIKit
-
+import MJRefresh
 class BaseView: UIView {
     
     public func setViewModel(viewmodel: AnyObject) {

+ 14 - 1
Koala/Koala/FX/Macro/ColorOrImage.swift

@@ -61,7 +61,7 @@ var InputBackGroundColor : UIColor {
 
 var TitleTextColor : UIColor {
     get{
-        return  _color("#030407&#030407")//
+        return  _color("#333333&#333333")//
     }
 }
 
@@ -89,6 +89,19 @@ var MidTextColor : UIColor {
     }
 }
 
+
+var GrayTextColor : UIColor {
+    get{
+        return  _color("#4A4A4A&#4A4A4A")//
+    }
+}
+
+var LightTextColor : UIColor {
+    get{
+        return  _color("#BEBEBE&#BEBEBE")//
+    }
+}
+
 var Popup_Back_Color : UIColor {
     get{
         return  _color("#FFFFFF&#FFFFFF")//背景色

+ 2 - 2
Koala/Koala/FX/Macro/PublicMethod.swift

@@ -918,8 +918,8 @@ func getSymbolList() -> [KSymbolModel]{
                 }
                 model.newPrice = precisionString(with: ask, precision: model.digits)
                 let np = decimalNumber(A: model.newPrice, B: model.open, type: .Subtract, scale:model.digits)
-                model.increase = decimalNumber(A: np, B: model.open, type: .Divid)
-                model.increase = decimalNumber(A: model.increase, B: "100", type: .Multiply)
+                let increase = (conerData(np, .MyDouble).2!/conerData(model.open, .MyDouble).2!)*100
+                model.increase = String(format: "%.2f",increase)
                 arr.append(model)
             }
            

+ 15 - 7
Koala/Koala/FX/NetClass/Network.swift

@@ -150,6 +150,12 @@ extension NetWork {
       
                     Dlog(json)
                     
+                    var data = json["data"]
+                    
+                    if json["pageInfo"].type != Type.null{
+                        data = json["pageInfo"]
+                    }
+                    
                     if errno == 4000 || status == 4000 || code == 4000 {
                         //登录失效
                         self.login()
@@ -164,7 +170,7 @@ extension NetWork {
                         }
                         
                         var dict:[String: Any] = [String:Any]()
-                        if json["data"].dictionaryObject != nil{
+                        if data.dictionaryObject != nil{
                             guard let dic = json["data"].dictionaryObject else {
                                 failured(errno,"转字典失败" as AnyObject)
                                 return
@@ -179,25 +185,27 @@ extension NetWork {
                         return
                     }
                     
-                    if json["data"].dictionaryObject != nil{
-                        guard let dict = json["data"].dictionaryObject else {
+                    if data.dictionaryObject != nil{
+                        guard let dict = data.dictionaryObject else {
                             failured(errno,"转字典失败" as AnyObject)
                             return
                         }
                         success(errno,handleDic(myData: dict) as AnyObject)
-                    }else if json["data"].arrayObject != nil{
-                        guard let arr = json["data"].arrayObject else {
+                    }else if data.arrayObject != nil{
+                        guard let arr = data.arrayObject else {
                             failured(errno,"转数组失败" as AnyObject)
                             return
                         }
                         success(errno,handleDic(myData: arr) as AnyObject)
                     }else{
-                        if ((json["data"].object as? NSNull) == nil){
-                            success(errno,handleDic(myData: json["data"].object) as AnyObject)
+                        if ((data.object as? NSNull) == nil){
+                            success(errno,handleDic(myData: data.object) as AnyObject)
                         }else{
                             success(errno,"" as AnyObject)
                         }
                     }
+                    
+                   
                     //缓存数据
                     //  self.cacheResponseObject(responseObject:array as AnyObject,
                     //                                             request: response.request!,

+ 1 - 0
Koala/Koala/FX/NetClass/URLS.swift

@@ -209,6 +209,7 @@ let netOpenSubscribe = "Public/openSubscribe"       //开启订阅,没有token
 
 let netUpdateSubscribe    = "Public/updateSubscribe"    //修改报价订阅 参数 symbols  = ["BTCUSD","EURUSD"]
 
+let netForGetOptionProductListGroup = "Public/getOptionProductListGroup"//期权列表
 
 /* ********************* 极度 **********************/
 

+ 55 - 0
Koala/Koala/Modular/Market/M/MarketModel.swift

@@ -38,3 +38,58 @@ class ProductGroupLangListModel: BaseModel {
     var title: String = ""
     var language: String = "0"
 }
+
+class OptionsTimerModel: BaseModel {
+    var timer: String = ""
+    var title: String = ""
+    var isSelect: Bool = false
+}
+
+class OptionsMarketModel: BaseModel {
+    var market:String = ""
+    var title: String = ""
+}
+
+class OptionsListModel: BaseModel {
+    var id:Int = 0
+    var type:Int = 0
+    var update_datetime_3m:Int = 0
+    var update_datetime_6m:Int = 0
+    var update_datetime_12m:Int = 0
+    var update_datetime_1m:Int = 0
+    var update_datetime_2m:Int = 0
+    var update_datetime_15d:Int = 0
+    var price_12m:String = ""
+    var standard:String = ""
+    var title:String = ""
+    var price_1m:String = ""
+    var price_15d:String = ""
+    var price_2m:String = ""
+    var price_6m:String = ""
+    var code:String = ""
+    var price_3m:String = ""
+    var bak02:String = ""
+    var visible:Int = 0
+    var bak01:String = ""
+    var market:String = ""
+    var count_15d:Int = 0
+    var count_1m:Int = 0
+    var count_2m:Int = 0
+    var price_6m_list:String = ""
+    var price_1m_list:String = ""
+    var price_3m_list:String = ""
+    var count_6m:Int = 0
+    var standard_list:String = ""
+    var recommend:Int = 0
+    var count_12m:Int = 0
+    var count_3m:Int = 0
+    var price_2m_list:String = ""
+    var insert_datetime:String = ""
+    
+    var symbolData:KSymbolModel = KSymbolModel()
+
+}
+
+
+
+

+ 21 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDAnnouncementView/MDAnnouncementView.swift

@@ -0,0 +1,21 @@
+//
+//  MDAnnouncementView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDAnnouncementView: BaseView {
+
+    /*
+    // Only override draw() if you perform custom drawing.
+    // An empty implementation adversely affects performance during animation.
+    override func draw(_ rect: CGRect) {
+        // Drawing code
+    }
+    */
+
+}

+ 170 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteInfoCell.swift

@@ -0,0 +1,170 @@
+//
+//  MDAuoteInfoCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDAuoteInfoCell: BaseTableViewCell {
+
+    @IBOutlet weak var bgView: UIView!
+    
+    @IBOutlet weak var priceLab: UILabel!
+    @IBOutlet weak var numberLab: UILabel!
+    @IBOutlet weak var changeLab: UILabel!
+    @IBOutlet weak var mark1Btn: UIButton!
+    @IBOutlet weak var mark2Btn: UIButton!
+    @IBOutlet weak var stateLab: UILabel!
+    
+    @IBOutlet weak var title1Lab: UILabel!
+    @IBOutlet weak var value1Lab: UILabel!
+    
+    @IBOutlet weak var title2Lab: UILabel!
+    @IBOutlet weak var value2Lab: UILabel!
+    
+    @IBOutlet weak var title3Lab: UILabel!
+    @IBOutlet weak var value3Lab: UILabel!
+    
+    @IBOutlet weak var title4Lab: UILabel!
+    @IBOutlet weak var value4Lab: UILabel!
+    
+    @IBOutlet weak var title5Lab: UILabel!
+    @IBOutlet weak var value5Lab: UILabel!
+    
+    @IBOutlet weak var title6Lab: UILabel!
+    @IBOutlet weak var value6Lab: UILabel!
+    
+    @IBOutlet weak var title7Lab: UILabel!
+    @IBOutlet weak var value7Lab: UILabel!
+    
+    @IBOutlet weak var title8Lab: UILabel!
+    @IBOutlet weak var value8Lab: UILabel!
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        // Initialization code
+        self.bgView.backgroundColor = ALLBackGroundColor
+        
+        self.priceLab.setTextFont(.PFSM, 28)
+        self.priceLab.textColor = MidTextColor
+        self.priceLab.text = "0.00"
+        
+        self.numberLab.setTextFont(.PFSM, 13)
+        self.numberLab.textColor = TitleTextColor
+        self.numberLab.text = ""
+        
+        self.stateLab.setTextFont(.PFSR, 13)
+        self.stateLab.textColor = TitleTextColor
+        self.stateLab.text = switchLanguage("已休盘")
+        
+        self.changeLab.setTextFont(.PFSR, 13)
+        self.changeLab.textColor = MidTextColor
+        self.changeLab.text = "0.00(0.00%)"
+        
+        self.mark1Btn.setTextFont(.PFSR, 12)
+        self.mark1Btn.contentEdgeInsets = UIEdgeInsets(top: 0, left: 2, bottom: 0, right: 2)
+        
+        self.mark2Btn.setTextFont(.PFSR, 12)
+        self.mark2Btn.contentEdgeInsets = UIEdgeInsets(top: 0, left: 2, bottom: 0, right: 2)
+        
+        self.setTitleLayer(lab: self.title1Lab, text: switchLanguage("开盘"))
+        self.setValueLayer(lab: self.value1Lab, text: "--")
+        
+        self.setTitleLayer(lab: self.title2Lab, text: switchLanguage("最高"))
+        self.setValueLayer(lab: self.value2Lab, text: "--")
+        
+        self.setTitleLayer(lab: self.title3Lab, text: switchLanguage("总股本"))
+        self.setValueLayer(lab: self.value3Lab, text: "--")
+        
+        self.setTitleLayer(lab: self.title4Lab, text: switchLanguage("市值"))
+        self.setValueLayer(lab: self.value4Lab, text: "--")
+        
+        self.setTitleLayer(lab: self.title5Lab, text: switchLanguage("昨收"))
+        self.setValueLayer(lab: self.value5Lab, text: "--")
+        
+        self.setTitleLayer(lab: self.title6Lab, text: switchLanguage("最低"))
+        self.setValueLayer(lab: self.value6Lab, text: "--")
+        
+        self.setTitleLayer(lab: self.title7Lab, text: switchLanguage("流通股本"))
+        self.setValueLayer(lab: self.value7Lab, text: "--")
+        
+        self.setTitleLayer(lab: self.title8Lab, text:"")
+        self.setValueLayer(lab: self.value8Lab, text: "")
+        
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    
+    func updateCellWith(model:KSymbolModel) -> Void {
+        self.updatePriceWith(model: model)
+        
+        self.numberLab.text = model.symbol
+        
+        self.value1Lab.text = precisionString(with: model.open, precision: model.digits)
+        
+        self.value2Lab.text = precisionString(with: model.high, precision: model.digits)
+        
+        self.value3Lab.text = "--"
+        
+        self.value4Lab.text = "--"
+        
+        self.value5Lab.text = precisionString(with: model.open, precision: model.digits)
+        
+        self.value6Lab.text = precisionString(with: model.low, precision: model.digits)
+        
+        self.value7Lab.text = "--"
+        
+    }
+    
+    func updatePriceWith(model:KSymbolModel) -> Void {
+        
+        let difference:Double = conerData(model.newPrice, .MyDouble).2! - conerData(model.open, .MyDouble).2!
+        var differenceStr = "0.00"
+        if difference > 0 {
+            differenceStr = String(format: "+%.2f", difference)
+        }else{
+            differenceStr = String(format: "%.2f", difference)
+        }
+        
+        let increase = conerData(model.increase as Any, .MyFloat).1!
+        var increaseStr = "0.00%"
+        if increase > 0 {
+            increaseStr = "+" + precisionString(with: model.increase, precision: "2")  + "%"
+        }else{
+            increaseStr = precisionString(with: model.increase, precision: "2")  + "%"
+        }
+        
+        self.priceLab.textColor = exchangeColorAndImage(increase: increase).0
+        self.priceLab.text = String(format: "%@", model.newPrice)
+        
+        
+        self.changeLab.textColor = exchangeColorAndImage(increase: increase).0
+        self.changeLab.text = String(format: "%@(%@)",differenceStr,increaseStr)
+    }
+    
+    
+}
+
+extension MDAuoteInfoCell {
+    
+    func setTitleLayer(lab:UILabel,text:String) -> Void {
+        lab.setTextFont(.PFSR, 10)
+        lab.textColor = MidTextColor
+        lab.text = text
+    }
+    
+    func setValueLayer(lab:UILabel,text:String) -> Void {
+        lab.setTextFont(.PFSM, 10)
+        lab.textColor = TitleTextColor
+        lab.text = text
+    }
+    
+}

+ 358 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteInfoCell.xib

@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <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"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="193" id="KGk-i7-Jjw" customClass="MDAuoteInfoCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="406" height="193"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="406" height="193"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wiw-fI-LxM">
+                        <rect key="frame" x="0.0" y="0.0" width="406" height="193"/>
+                        <subviews>
+                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="dsh-Ds-ifS">
+                                <rect key="frame" x="0.0" y="0.0" width="406" height="193"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aWu-Gn-orV">
+                                        <rect key="frame" x="0.0" y="0.0" width="406" height="66.666666666666671"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CHU-fJ-dcM">
+                                                <rect key="frame" x="15.000000000000004" y="20" width="41.333333333333343" height="1.6666666666666679"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tvl-9p-yTX">
+                                                <rect key="frame" x="15" y="41.666666666666664" width="376" height="15"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ggq-Qr-ifq">
+                                                        <rect key="frame" x="0.0" y="0.0" width="125.33333333333333" height="15"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Ay-Dd-0K7">
+                                                        <rect key="frame" x="125.33333333333334" y="0.0" width="125.33333333333334" height="15"/>
+                                                        <subviews>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tqj-Os-Zy4">
+                                                                <rect key="frame" x="21.333333333333314" y="-2.6666666666666643" width="82.666666666666671" height="20.333333333333332"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="laq-rA-uTg">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="idZ-G6-DOn">
+                                                                        <rect key="frame" x="41.333333333333343" y="0.0" width="41.333333333333343" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                            </stackView>
+                                                        </subviews>
+                                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                        <constraints>
+                                                            <constraint firstItem="Tqj-Os-Zy4" firstAttribute="centerY" secondItem="4Ay-Dd-0K7" secondAttribute="centerY" id="Y4f-fd-5Up"/>
+                                                            <constraint firstItem="Tqj-Os-Zy4" firstAttribute="centerX" secondItem="4Ay-Dd-0K7" secondAttribute="centerX" id="eLq-pf-5CT"/>
+                                                        </constraints>
+                                                    </view>
+                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AGm-En-xac">
+                                                        <rect key="frame" x="250.66666666666671" y="0.0" width="125.33333333333334" height="15"/>
+                                                        <subviews>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="VYM-ne-UJV">
+                                                                <rect key="frame" x="60.333333333333314" y="0.0" width="65" height="15"/>
+                                                                <subviews>
+                                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ku6-J2-BI5">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="30" height="15"/>
+                                                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                                    </button>
+                                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eUM-L3-Wum">
+                                                                        <rect key="frame" x="35" y="0.0" width="30" height="15"/>
+                                                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                                    </button>
+                                                                </subviews>
+                                                            </stackView>
+                                                        </subviews>
+                                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="trailing" secondItem="VYM-ne-UJV" secondAttribute="trailing" id="46s-Fs-rR6"/>
+                                                            <constraint firstAttribute="bottom" secondItem="VYM-ne-UJV" secondAttribute="bottom" id="5ho-ms-zMy"/>
+                                                            <constraint firstItem="VYM-ne-UJV" firstAttribute="top" secondItem="AGm-En-xac" secondAttribute="top" id="kxN-wc-1s4"/>
+                                                        </constraints>
+                                                    </view>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="AGm-En-xac" firstAttribute="width" secondItem="ggq-Qr-ifq" secondAttribute="width" id="0Mz-1U-JBK"/>
+                                                    <constraint firstItem="4Ay-Dd-0K7" firstAttribute="width" secondItem="ggq-Qr-ifq" secondAttribute="width" id="uIw-qw-Qjk"/>
+                                                    <constraint firstAttribute="height" constant="15" id="wKr-6H-eLX"/>
+                                                </constraints>
+                                            </stackView>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstItem="Tvl-9p-yTX" firstAttribute="top" secondItem="CHU-fJ-dcM" secondAttribute="bottom" constant="20" id="6Sq-d0-vf0"/>
+                                            <constraint firstItem="Tvl-9p-yTX" firstAttribute="leading" secondItem="aWu-Gn-orV" secondAttribute="leading" constant="15" id="BzM-6d-7s9"/>
+                                            <constraint firstItem="CHU-fJ-dcM" firstAttribute="top" secondItem="aWu-Gn-orV" secondAttribute="top" constant="20" id="GwN-99-Sul"/>
+                                            <constraint firstAttribute="bottom" secondItem="Tvl-9p-yTX" secondAttribute="bottom" constant="10" id="Wai-PD-mmy"/>
+                                            <constraint firstAttribute="trailing" secondItem="Tvl-9p-yTX" secondAttribute="trailing" constant="15" id="cqq-sK-gBu"/>
+                                            <constraint firstItem="CHU-fJ-dcM" firstAttribute="leading" secondItem="aWu-Gn-orV" secondAttribute="leading" constant="15" id="quD-42-Af2"/>
+                                        </constraints>
+                                    </view>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lYc-qe-ZEE">
+                                        <rect key="frame" x="0.0" y="66.666666666666686" width="406" height="126.33333333333331"/>
+                                        <subviews>
+                                            <stackView opaque="NO" contentMode="scaleToFill" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="rHl-kY-Ucq">
+                                                <rect key="frame" x="15" y="10" width="376" height="96.333333333333329"/>
+                                                <subviews>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="wPZ-nh-ZDl">
+                                                        <rect key="frame" x="0.0" y="0.0" width="178" height="96.333333333333329"/>
+                                                        <subviews>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ybm-1L-lDG">
+                                                                <rect key="frame" x="0.0" y="0.0" width="178" height="20.333333333333332"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F7P-DP-0aa">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k1b-x0-KnD">
+                                                                        <rect key="frame" x="89" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="k1b-x0-KnD" firstAttribute="width" secondItem="F7P-DP-0aa" secondAttribute="width" id="czY-ux-B1l"/>
+                                                                </constraints>
+                                                            </stackView>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wDg-jF-u8R">
+                                                                <rect key="frame" x="0.0" y="25.333333333333329" width="178" height="20.333333333333329"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aGE-C2-QLB">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hFF-eb-afk">
+                                                                        <rect key="frame" x="89" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="hFF-eb-afk" firstAttribute="width" secondItem="aGE-C2-QLB" secondAttribute="width" id="Qdh-MO-M9v"/>
+                                                                </constraints>
+                                                            </stackView>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Jk-Z1-ke0">
+                                                                <rect key="frame" x="0.0" y="50.666666666666657" width="178" height="20.333333333333329"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bFL-xV-Fm4">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OGI-wy-Csg">
+                                                                        <rect key="frame" x="89" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="OGI-wy-Csg" firstAttribute="width" secondItem="bFL-xV-Fm4" secondAttribute="width" id="EjB-V5-XSM"/>
+                                                                </constraints>
+                                                            </stackView>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dKt-yC-crM">
+                                                                <rect key="frame" x="0.0" y="75.999999999999986" width="178" height="20.333333333333329"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qfS-1P-c6E">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wNw-Lb-9UM">
+                                                                        <rect key="frame" x="89" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="wNw-Lb-9UM" firstAttribute="width" secondItem="qfS-1P-c6E" secondAttribute="width" id="weX-Jf-sja"/>
+                                                                </constraints>
+                                                            </stackView>
+                                                        </subviews>
+                                                        <constraints>
+                                                            <constraint firstItem="wDg-jF-u8R" firstAttribute="height" secondItem="Ybm-1L-lDG" secondAttribute="height" id="P7g-cy-qDo"/>
+                                                            <constraint firstItem="dKt-yC-crM" firstAttribute="height" secondItem="Ybm-1L-lDG" secondAttribute="height" id="ajW-4l-DhA"/>
+                                                            <constraint firstItem="1Jk-Z1-ke0" firstAttribute="height" secondItem="Ybm-1L-lDG" secondAttribute="height" id="nUT-EG-RIF"/>
+                                                        </constraints>
+                                                    </stackView>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="LLC-bc-L41">
+                                                        <rect key="frame" x="198" y="0.0" width="178" height="96.333333333333329"/>
+                                                        <subviews>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iLc-1q-iFE">
+                                                                <rect key="frame" x="0.0" y="0.0" width="178" height="20.333333333333332"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2lo-cd-unU">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Khm-Ii-PHq">
+                                                                        <rect key="frame" x="89" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="Khm-Ii-PHq" firstAttribute="width" secondItem="2lo-cd-unU" secondAttribute="width" id="u1W-78-JYV"/>
+                                                                </constraints>
+                                                            </stackView>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ID-yf-oAC">
+                                                                <rect key="frame" x="0.0" y="25.333333333333329" width="178" height="20.333333333333329"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pMr-2z-4aO">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tBo-Ec-x4V">
+                                                                        <rect key="frame" x="89" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="tBo-Ec-x4V" firstAttribute="width" secondItem="pMr-2z-4aO" secondAttribute="width" id="lSn-CV-7MW"/>
+                                                                </constraints>
+                                                            </stackView>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LP8-uT-nHW">
+                                                                <rect key="frame" x="0.0" y="50.666666666666657" width="178" height="20.333333333333329"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yuN-sv-B6d">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jRC-xh-Jdd">
+                                                                        <rect key="frame" x="89" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="jRC-xh-Jdd" firstAttribute="width" secondItem="yuN-sv-B6d" secondAttribute="width" id="d7a-C1-Gj3"/>
+                                                                </constraints>
+                                                            </stackView>
+                                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rhg-xc-Las">
+                                                                <rect key="frame" x="0.0" y="75.999999999999986" width="178" height="20.333333333333329"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="75x-M0-etj">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cbf-Ca-Ltm">
+                                                                        <rect key="frame" x="89" y="0.0" width="89" height="20.333333333333332"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="Cbf-Ca-Ltm" firstAttribute="width" secondItem="75x-M0-etj" secondAttribute="width" id="t7C-eF-KP0"/>
+                                                                </constraints>
+                                                            </stackView>
+                                                        </subviews>
+                                                    </stackView>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="iLc-1q-iFE" firstAttribute="height" secondItem="Ybm-1L-lDG" secondAttribute="height" id="NWZ-to-ggY"/>
+                                                    <constraint firstItem="rhg-xc-Las" firstAttribute="height" secondItem="Ybm-1L-lDG" secondAttribute="height" id="jN9-zs-wDQ"/>
+                                                    <constraint firstItem="LLC-bc-L41" firstAttribute="width" secondItem="wPZ-nh-ZDl" secondAttribute="width" id="oU3-Xd-CKs"/>
+                                                    <constraint firstItem="4ID-yf-oAC" firstAttribute="height" secondItem="Ybm-1L-lDG" secondAttribute="height" id="pzh-Ee-rku"/>
+                                                    <constraint firstItem="LP8-uT-nHW" firstAttribute="height" secondItem="Ybm-1L-lDG" secondAttribute="height" id="wfF-jk-nT3"/>
+                                                </constraints>
+                                            </stackView>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstAttribute="bottom" secondItem="rHl-kY-Ucq" secondAttribute="bottom" constant="20" id="4oL-mO-H8w"/>
+                                            <constraint firstItem="rHl-kY-Ucq" firstAttribute="leading" secondItem="lYc-qe-ZEE" secondAttribute="leading" constant="15" id="V7V-4x-mIj"/>
+                                            <constraint firstItem="rHl-kY-Ucq" firstAttribute="top" secondItem="lYc-qe-ZEE" secondAttribute="top" constant="10" id="Zty-hq-mac"/>
+                                            <constraint firstAttribute="trailing" secondItem="rHl-kY-Ucq" secondAttribute="trailing" constant="15" id="b0O-lS-N4r"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                            </stackView>
+                        </subviews>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstAttribute="bottom" secondItem="dsh-Ds-ifS" secondAttribute="bottom" id="24D-Zc-vlo"/>
+                            <constraint firstItem="dsh-Ds-ifS" firstAttribute="top" secondItem="Wiw-fI-LxM" secondAttribute="top" id="b8r-70-OfX"/>
+                            <constraint firstAttribute="trailing" secondItem="dsh-Ds-ifS" secondAttribute="trailing" id="p9M-df-dMT"/>
+                            <constraint firstItem="dsh-Ds-ifS" firstAttribute="leading" secondItem="Wiw-fI-LxM" secondAttribute="leading" id="wym-yJ-eK9"/>
+                        </constraints>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="Wiw-fI-LxM" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="21J-9x-vPk"/>
+                    <constraint firstAttribute="bottom" secondItem="Wiw-fI-LxM" secondAttribute="bottom" id="LN6-No-ED4"/>
+                    <constraint firstAttribute="trailing" secondItem="Wiw-fI-LxM" secondAttribute="trailing" id="g4n-sy-Yqy"/>
+                    <constraint firstItem="Wiw-fI-LxM" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="jPV-SP-4w8"/>
+                </constraints>
+            </tableViewCellContentView>
+            <connections>
+                <outlet property="bgView" destination="Wiw-fI-LxM" id="99q-Vd-x2x"/>
+                <outlet property="changeLab" destination="idZ-G6-DOn" id="lTj-2V-Op2"/>
+                <outlet property="mark1Btn" destination="Ku6-J2-BI5" id="dKK-h8-wsa"/>
+                <outlet property="mark2Btn" destination="eUM-L3-Wum" id="fad-jW-KpE"/>
+                <outlet property="numberLab" destination="ggq-Qr-ifq" id="h4e-7u-mic"/>
+                <outlet property="priceLab" destination="CHU-fJ-dcM" id="hbe-LP-lHp"/>
+                <outlet property="stateLab" destination="laq-rA-uTg" id="kEZ-UV-LEQ"/>
+                <outlet property="title1Lab" destination="F7P-DP-0aa" id="hA1-wE-fYE"/>
+                <outlet property="title2Lab" destination="aGE-C2-QLB" id="0kZ-24-Npg"/>
+                <outlet property="title3Lab" destination="bFL-xV-Fm4" id="krk-xV-RLF"/>
+                <outlet property="title4Lab" destination="qfS-1P-c6E" id="24Y-KR-DNy"/>
+                <outlet property="title5Lab" destination="2lo-cd-unU" id="Gno-lH-DkZ"/>
+                <outlet property="title6Lab" destination="pMr-2z-4aO" id="A5Z-A9-fSU"/>
+                <outlet property="title7Lab" destination="yuN-sv-B6d" id="Zqe-aF-zeo"/>
+                <outlet property="title8Lab" destination="75x-M0-etj" id="jFS-3e-L4A"/>
+                <outlet property="value1Lab" destination="k1b-x0-KnD" id="sGi-Ja-DQO"/>
+                <outlet property="value2Lab" destination="hFF-eb-afk" id="U5L-jP-ghI"/>
+                <outlet property="value3Lab" destination="OGI-wy-Csg" id="KI8-Wn-CpF"/>
+                <outlet property="value4Lab" destination="wNw-Lb-9UM" id="ORR-Hq-Kcp"/>
+                <outlet property="value5Lab" destination="Khm-Ii-PHq" id="xNp-ax-npK"/>
+                <outlet property="value6Lab" destination="tBo-Ec-x4V" id="sdj-lD-QtL"/>
+                <outlet property="value7Lab" destination="jRC-xh-Jdd" id="WLQ-ii-4gd"/>
+                <outlet property="value8Lab" destination="Cbf-Ca-Ltm" id="ycT-Gi-Bv5"/>
+            </connections>
+            <point key="canvasLocation" x="167.93893129770993" y="89.788732394366207"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 200 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteKLinewCell.swift

@@ -0,0 +1,200 @@
+//
+//  MDAuoteKLinewCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+import ReactiveSwift
+import ReactiveCocoa
+
+class MDAuoteKLinewCell: BaseTableViewCell {
+    @IBOutlet weak var topView: UIView!
+    @IBOutlet weak var centerView: UIView!
+
+    let (signal, observer) = Signal<String,Never>.pipe()
+    lazy var data:[(String,String)] = {
+        let arr:[(String,String)] = [(String,String)]()
+        return arr
+    }()
+    
+    /// k线周期
+    private lazy var kPeriod:KLinePeriod = {
+        let kPeriod = KLinePeriod.getDefaultKLinePeriod()
+        return kPeriod
+    }()
+    
+    //k线图
+    private lazy var kLineView:KLineView = {
+        let kLineView = KLineView()
+        kLineView.delegate = self
+        return kLineView
+    }()
+    
+    // k线数据源
+    private lazy var dataSource:[KLineModel] = {
+        let dataSource = [KLineModel]()
+        return dataSource
+    }()
+    
+    lazy var kLHeaderView:KLineHeaderView = {
+        let kLHeaderView:KLineHeaderView = KLineHeaderView()
+        kLHeaderView.signalKLineHeader.observeResult({[weak self] (result) in
+            let type = try! result.get()
+            self?.observer.send(value: type)
+        })
+        return kLHeaderView
+    }()
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ALLBackGroundColor
+        self.topView.backgroundColor = ALLBackGroundColor
+        
+        self.centerView.backgroundColor = ALLBackGroundColor
+        
+        self.topView.addSubview(kLHeaderView)
+        self.centerView.addSubview(kLineView)
+        
+        self.kLHeaderView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        self.kLineView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        
+        
+        // Initialization code
+    }
+    
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+        
+        // Configure the view for the selected state
+    }
+    
+}
+extension MDAuoteKLinewCell {
+    func updateCellWithModel(list:[KSymbolKlineData],symbol:KSymbolModel,isSocket:Bool){
+        let pModel = SymbolPrecisionModel()
+        pModel.pricePrecision = symbol.digits
+        pModel.numberPrecision = symbol.digits
+        kLineView.setSymbolPrecision(model: pModel)
+        if isSocket {
+            let cModel = list.first!
+            if dataSource.count == 0{
+                dataSource.append(self.kLineModel(cModel: cModel))
+            }else{
+                let kModel:KLineModel = dataSource.last!
+                if kModel.timestamp == cModel.datetime{
+                    dataSource[dataSource.count-1] = self.kLineModel(cModel: cModel)
+                }else{
+                    dataSource.append(self.kLineModel(cModel: cModel))
+                }
+            }
+            UtilAlgorithm.calculationResults(models: dataSource)
+        }else{
+            //self.kLHeaderView.timeBtn.setTitle(KLinePeriod.titleFor(kPeriod:KLinePeriod.getDefaultKLinePeriod()), for: .normal)
+            //               self.kLHeaderView.timeBtn.setImage(CT_Kline_Arrow_Image, for: .normal)
+            //               self.kLHeaderView.timeBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5)
+            self.kLHeaderView.updateMoreTimer()
+            self.kLHeaderView.collectionView.reloadData()
+            self.kLHeaderView.targetBtn.setImage(CT_Kline_Arrow_Image, for: .normal)
+            dataSource = [KLineModel]()
+            for model in list{
+                guard model.datetime.length >  0 else{
+                    return
+                }
+                dataSource.append(self.kLineModel(cModel:model))
+            }
+
+            UtilAlgorithm.calculationResults(models: dataSource)
+//            if KLineMainTarget.getDefaultKLineTarget() == KLineMainTarget.targetNONE {
+//                kLineView.setKIndexTop(index: .NONE)
+//            }else
+            if KLineMainTarget.getDefaultKLineTarget() == KLineMainTarget.targetBOLL {
+                kLineView.setKIndexTop(index: .BOLL)
+            }else if KLineMainTarget.getDefaultKLineTarget() == KLineMainTarget.targetMA {
+                kLineView.setKIndexTop(index: .SMA)
+            }
+
+            kLineView.setKIndexCenter(index: .VOL)
+            let viceArr = KLineViceTarget.getDefaultKLineTarget()
+//            if viceArr.contains(.targetNONE) {
+//                kLineView.setHighly(topHeight:250, centerHeight: 120, bottomHeight:0)
+//            }else{
+            kLineView.setHighly(topHeight:250, centerHeight: 0, bottomHeight:Double(viceArr.count*100))
+//            }
+
+            var indexBottoms:[KIndexBottom] = [KIndexBottom]()
+            for vice in viceArr {
+                if vice == .targetMACD {
+                    indexBottoms.append(.MACD)
+                }else if vice == .targetKDJ {
+                    indexBottoms.append(.KDJ)
+                }else if vice == .targetRSI {
+                    indexBottoms.append(.RSI)
+                }else if vice == .targetWR {
+                    indexBottoms.append(.WR)
+                }
+//                else if vice == .targetNONE{
+//                    indexBottoms.append(.NONE)
+//                }
+            }
+
+            kLineView.setKIndexBottom(indexs: indexBottoms)
+
+
+//            if KLineViceTarget.getDefaultKLineTarget() == KLineViceTarget.targetNONE {
+//                kLineView.setKIndexBottom(index: .NONE)
+//                kLineView.setHighly(topHeight: 1.85, centerHeight: 1.15, bottomHeight: 0)
+//            }else if  KLineViceTarget.getDefaultKLineTarget() == KLineViceTarget.targetKDJ {
+//                kLineView.setKIndexBottom(index: .KDJ)
+//            }else if  KLineViceTarget.getDefaultKLineTarget() == KLineViceTarget.targetMACD {
+//                kLineView.setKIndexBottom(index: .MACD)
+//            }else if  KLineViceTarget.getDefaultKLineTarget() == KLineViceTarget.targetRSI {
+//                kLineView.setKIndexBottom(index: .RSI)
+//            }else if  KLineViceTarget.getDefaultKLineTarget() == KLineViceTarget.targetWR {
+//                kLineView.setKIndexBottom(index: .WR)
+//            }
+        }
+
+        self.kLineView.reloadData(isSocket: isSocket)
+
+
+
+    }
+
+    func kLineModel(cModel:KSymbolKlineData) -> KLineModel {
+        let time:String = cModel.datetime
+        let open:Double = conerData(cModel.open as Any, .MyDouble).2!
+        let high:Double = conerData(cModel.high as Any, .MyDouble).2!
+        let low:Double = conerData(cModel.low as Any, .MyDouble).2!
+        let close:Double = conerData(cModel.close as Any,.MyDouble).2!
+        let openClose = decimalNumber(A: cModel.close, B: cModel.open, type: .Subtract)
+        let inc = decimalNumber(A: openClose, B: cModel.open, type: .Divid)
+        let increase:String = precisionString(with: decimalNumber(A: inc, B: "100", type: .Multiply), precision: "2") + "%"
+
+        return KLineModel(timestamp:time , open:open , high: high, low: low, close: close, increase:increase)
+    }
+
+}
+
+extension MDAuoteKLinewCell : KLineViewDataSource {
+
+    func kLineViewForType(_ kLineView: KLineView) -> KType {
+        return .kLine
+    }
+    func kLineViewForData(_ kLineView: KLineView) -> [KLineModel] {
+        return dataSource
+    }
+}
+
+extension CTKLineChartsCell{
+
+//    func updateCelldata(vm:CTProViewModel) -> Void {
+//        _ = vm.marketModel
+//    }
+}
+

+ 56 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteKLinewCell.xib

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <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"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="183" id="KGk-i7-Jjw" customClass="MDAuoteKLinewCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="439" height="183"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="439" height="183"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WUe-r1-l1X">
+                        <rect key="frame" x="0.0" y="0.0" width="439" height="40"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="40" id="Jdr-M4-Vf6"/>
+                        </constraints>
+                    </view>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sUB-Xr-McZ">
+                        <rect key="frame" x="0.0" y="41" width="439" height="142"/>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="trailing" secondItem="WUe-r1-l1X" secondAttribute="trailing" id="1mE-vo-xFF"/>
+                    <constraint firstItem="sUB-Xr-McZ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="MT6-RO-tCI"/>
+                    <constraint firstItem="sUB-Xr-McZ" firstAttribute="top" secondItem="WUe-r1-l1X" secondAttribute="bottom" constant="1" id="MsZ-ZD-dcL"/>
+                    <constraint firstAttribute="bottom" secondItem="sUB-Xr-McZ" secondAttribute="bottom" id="gh2-Mc-6He"/>
+                    <constraint firstAttribute="trailing" secondItem="sUB-Xr-McZ" secondAttribute="trailing" id="h1Z-IQ-KvD"/>
+                    <constraint firstItem="WUe-r1-l1X" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="u2k-2L-E4h"/>
+                    <constraint firstItem="WUe-r1-l1X" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="zzL-Bm-3VK"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="centerView" destination="sUB-Xr-McZ" id="pBe-8n-M3j"/>
+                <outlet property="topView" destination="WUe-r1-l1X" id="myk-06-uG4"/>
+            </connections>
+            <point key="canvasLocation" x="170" y="64"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 218 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDAuoteView/MDAuoteView.swift

@@ -0,0 +1,218 @@
+//
+//  MDAuoteView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDAuoteView: BaseView {
+    var VM: MDAuoteViewModel?
+    
+    lazy var tableView: BaseTableView = { [weak self] in
+        let tableView = BaseTableView.init(frame: .zero, style: .grouped)
+        tableView.separatorStyle = .singleLine
+        tableView.separatorColor = ViewBorderColor
+        tableView.separatorInset = UIEdgeInsets.init(top: 0, left: 0, bottom: 0, right: 0)
+        tableView.delegate = self
+        tableView.dataSource = self
+        tableView.backgroundColor = .clear
+        tableView.tableHeaderView = UIView()
+        tableView.tableFooterView = UIView()
+        tableView.showsHorizontalScrollIndicator = false
+        tableView.showsVerticalScrollIndicator = false
+        
+        
+        tableView.register(UINib.init(nibName: "MDAuoteInfoCell", bundle: nil), forCellReuseIdentifier: "MDAuoteInfoCell")
+        
+        tableView.register(UINib.init(nibName: "MDAuoteKLinewCell", bundle: nil), forCellReuseIdentifier: "MDAuoteKLinewCell")
+        
+        tableView.register(UINib.init(nibName: "AssetsTotalRecordCell", bundle: nil), forCellReuseIdentifier: "AssetsTotalRecordCell")
+        
+        if #available(iOS 11, *){
+            tableView.contentInsetAdjustmentBehavior = .never
+        }
+        return tableView
+        }()
+    
+
+    lazy var bottomView:UIView = {
+        let view:UIView = UIView()
+        view.backgroundColor = ALLBackGroundColor
+        
+        let lineView:UIView = UIView()
+        lineView.backgroundColor = ViewBorderColor
+        view.addSubview(lineView)
+        
+        let leftBtn:UIButton = UIButton.init(type: .custom)
+        leftBtn.setTitle(switchLanguage("买入"), for: .normal)
+        leftBtn.setTextFont(.PFSR, 14)
+        leftBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds:20)
+        leftBtn.setTitleColor(WhiteTextColor, for: .normal)
+        leftBtn.backgroundColor = exchangeColorAndImage(increase: 1).0
+        view.addSubview(leftBtn)
+        
+        let rightBtn:UIButton = UIButton.init(type: .custom)
+        rightBtn.setTitle(switchLanguage("卖出"), for: .normal)
+        rightBtn.setTextFont(.PFSR, 14)
+        rightBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds:20)
+        rightBtn.setTitleColor(WhiteTextColor, for: .normal)
+        rightBtn.backgroundColor = exchangeColorAndImage(increase: -1).0
+        view.addSubview(rightBtn)
+        
+        lineView.snp.makeConstraints { make in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(1)
+        }
+        
+        leftBtn.snp.makeConstraints { make in
+            make.left.equalTo(15)
+            make.top.equalTo(10)
+            make.height.equalTo(40)
+        }
+        
+        rightBtn.snp.makeConstraints { make in
+            make.left.equalTo(leftBtn.snp.right).offset(15)
+            make.right.equalTo(-15)
+            make.top.equalTo(10)
+            make.height.equalTo(40)
+            make.width.equalTo(leftBtn.snp.width)
+        }
+        
+        return view
+    }()
+    
+    override func subView() {
+        self.addSubview(tableView)
+        self.addSubview(bottomView)
+
+        mySwitchLanguage()
+        mySwitchSkin()
+        
+    }
+    
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        tableView.snp.makeConstraints { make in
+            make.top.right.left.equalToSuperview()
+        }
+        
+        bottomView.snp.makeConstraints { make in
+            make.left.right.bottom.equalToSuperview()
+            make.top.equalTo(self.tableView.snp.bottom)
+            make.height.equalTo(KBottomMargin+60)
+            
+        }
+        
+       
+       
+    }
+    
+    override func setViewModel(viewmodel: AnyObject) {
+        guard viewmodel is MDAuoteViewModel else {
+            return
+        }
+        self.VM = viewmodel as? MDAuoteViewModel
+        super.setViewModel(viewmodel: viewmodel)
+       
+    }
+    
+    override func mySwitchLanguage() {
+        //self.footerView.mySwitchLanguage()
+       
+    }
+    
+    override func mySwitchSkin() {
+        self.tableView.backgroundColor = .clear
+        self.backgroundColor = ALLBackGroundColor
+       
+    }
+    
+
+    override func blindModel() {
+        
+    }
+    
+    func reloadTable() {
+        DispatchQueue.main.async {
+//            self.tableView.mj_header!.endRefreshing()
+            self.tableView.reloadData()
+        }
+    }
+
+}
+
+//代理
+extension MDAuoteView:UITableViewDelegate,UITableViewDataSource{
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 2
+    }
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        if indexPath.section == 0 {
+            let cell:MDAuoteInfoCell = tableView.dequeueReusableCell(withIdentifier: "MDAuoteInfoCell") as! MDAuoteInfoCell
+            cell.updateCellWith(model: self.VM!.symbolModel)
+            return cell
+        }
+        else if indexPath.section == 1 {
+            let cell:MDAuoteKLinewCell = tableView.dequeueReusableCell(withIdentifier: "MDAuoteKLinewCell") as! MDAuoteKLinewCell
+            cell.updateCellWithModel(list: self.VM!.priceList,symbol: self.VM!.symbolModel, isSocket: false)
+            cell.signal.observeResult { [weak self] (result) in
+                let type = try! result.get()
+                if type == "MainClose" || type == "ViceClose" || type == "Main" || type == "Vice" {
+                    self?.reloadTable()
+                }else if type == "Full"{
+                    
+                }else{
+                    self?.VM?.period = type
+                    //self?.VM?.netGetKline()
+                }
+            }
+            return cell
+        }
+        
+        let cell:MDAuoteInfoCell = tableView.dequeueReusableCell(withIdentifier: "MDAuoteInfoCell") as! MDAuoteInfoCell
+       
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        if indexPath.section == 0{
+            return 190
+        }
+        else if indexPath.section == 1{
+            let viceArr = KLineViceTarget.getDefaultKLineTarget()
+            return CGFloat(300+KLineViceTarget.getDefaultKLineTarget().count*110)
+        }
+        return 60
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        let footer:UIView = UIView()
+        footer.backgroundColor = ViewBorderColor
+        return footer
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.01
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 5
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+      
+    }
+    
+}
+

+ 21 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDFinanceView/MDFinanceView.swift

@@ -0,0 +1,21 @@
+//
+//  MDFinanceView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDFinanceView: BaseView {
+
+    /*
+    // Only override draw() if you perform custom drawing.
+    // An empty implementation adversely affects performance during animation.
+    override func draw(_ rect: CGRect) {
+        // Drawing code
+    }
+    */
+
+}

+ 21 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDNewsView/MDNewsView.swift

@@ -0,0 +1,21 @@
+//
+//  MDNewsView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDNewsView: BaseView {
+
+    /*
+    // Only override draw() if you perform custom drawing.
+    // An empty implementation adversely affects performance during animation.
+    override func draw(_ rect: CGRect) {
+        // Drawing code
+    }
+    */
+
+}

+ 21 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsView.swift

@@ -0,0 +1,21 @@
+//
+//  MDOptionsView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsView: BaseView {
+
+    /*
+    // Only override draw() if you perform custom drawing.
+    // An empty implementation adversely affects performance during animation.
+    override func draw(_ rect: CGRect) {
+        // Drawing code
+    }
+    */
+
+}

+ 21 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDProfileView/MDProfileView.swift

@@ -0,0 +1,21 @@
+//
+//  MDProfileView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDProfileView: BaseView {
+
+    /*
+    // Only override draw() if you perform custom drawing.
+    // An empty implementation adversely affects performance during animation.
+    override func draw(_ rect: CGRect) {
+        // Drawing code
+    }
+    */
+
+}

+ 147 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MarketDetailNavView.swift

@@ -0,0 +1,147 @@
+//
+//  MarketDetailNavView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MarketDetailNavView: BaseView {
+
+    @IBOutlet weak var bgView: UIView!
+    @IBOutlet weak var backBtn: UIButton!
+    @IBOutlet weak var titleLab: UILabel!
+    @IBOutlet weak var stateBgView: UIView!
+    @IBOutlet weak var stateBtn: UIButton!
+    @IBOutlet weak var priceLab: UILabel!
+    @IBOutlet weak var shareBtn: UIButton!
+    @IBOutlet weak var collectionBtn: UIButton!
+    
+    var collectionBlock:(() -> ())?
+    var shareBlock:(() -> ())?
+    
+    var navView: UIView!
+    
+    func loadFromNib() -> UIView {
+        return Bundle.main.loadNibNamed("MarketDetailNavView", owner: self, options: nil)?.first as! UIView
+    }
+
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        navView = loadFromNib()
+        addSubview(navView)
+        navView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        
+        self.backBtn.addTarget(self, action: #selector(clickBackBtnAction), for: .touchUpInside)
+        
+        self.shareBtn.addTarget(self, action: #selector(clickShareBtnAction), for: .touchUpInside)
+        
+        self.collectionBtn.addTarget(self, action: #selector(clickCollectionBtnAction), for: .touchUpInside)
+        
+        self.titleLab.setTextFont(.PFSM, 18)
+        
+        self.priceLab.setTextFont(.PFSR, 12)
+        
+        self.stateBtn.setTextFont(.PFSR, 12)
+        
+        self.stateBtn.contentEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)
+        
+        self.stateBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        
+        self.stateBtn.layer.masksToBounds = true
+        
+        
+        mySwitchLanguage()
+        mySwitchSkin()
+       
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+    }
+    
+    override func mySwitchLanguage() {
+        self.stateBtn.setTitle(switchLanguage("已休盘"), for: .normal)
+        
+    }
+    
+    override func mySwitchSkin() {
+        self.navView.backgroundColor = ALLBackGroundColor
+        self.stateBgView.backgroundColor = MidBackGroundColor
+        
+        self.backBtn .setImage(NavViewBlackImage, for: .normal)
+        
+        self.titleLab.textColor = TitleTextColor
+        self.stateBtn.setTitleColor(MidTextColor, for: .normal)
+        self.stateBtn.backgroundColor = MidBackGroundColor
+        
+        self.shareBtn.setImage(_image("Market_share&Market_share"), for: .normal)
+        
+        self.collectionBtn.setImage(_image("Market_collection&Market_collection"), for: .normal)
+        
+        
+        
+    }
+    
+    func updateDataWith(model:KSymbolModel) -> Void {
+        self.titleLab.text = model.title
+        self.updatePriceWith(model: model)
+        
+        self.updateCollection(isCollection: model.isCollection)
+    }
+
+    func updatePriceWith(model:KSymbolModel) -> Void {
+        
+        let difference:Double = conerData(model.newPrice, .MyDouble).2! - conerData(model.open, .MyDouble).2!
+        var differenceStr = "0.00"
+        if difference > 0 {
+            differenceStr = String(format: "+%.2f", difference)
+        }else{
+            differenceStr = String(format: "%.2f", difference)
+        }
+        
+        let increase = conerData(model.increase as Any, .MyFloat).1!
+        var increaseStr = "0.00%"
+        if increase > 0 {
+            increaseStr = "+" + precisionString(with: model.increase, precision: "2")  + "%"
+        }else{
+            increaseStr = precisionString(with: model.increase, precision: "2")  + "%"
+        }
+        
+        self.priceLab.textColor = exchangeColorAndImage(increase: increase).0
+        self.priceLab.text = String(format: "%@ %@ %@", model.newPrice,differenceStr,increaseStr)
+    }
+    
+    
+    func updateCollection(isCollection:Bool) -> Void {
+        if isCollection {
+            self.collectionBtn.setImage(_image("Market_unCollection&Market_unCollection"), for: .normal)
+        }else{
+            self.collectionBtn.setImage(_image("Market_collection&Market_collection"), for: .normal)
+        }
+    }
+    
+    
+    
+}
+
+extension MarketDetailNavView{
+    
+    @objc func clickBackBtnAction(){
+        currentVc()?.navigationController?.popViewController(animated: true)
+    }
+    
+    @objc func clickShareBtnAction(){
+        self.shareBlock?()
+    }
+    
+    @objc func clickCollectionBtnAction(){
+        self.collectionBlock?()
+    }
+    
+    
+}

+ 149 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MarketDetailNavView.xib

@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <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" customClass="MarketDetailNavView" customModule="Koala" customModuleProvider="target">
+            <connections>
+                <outlet property="backBtn" destination="Ot1-Eh-u3p" id="dhk-cp-KAI"/>
+                <outlet property="bgView" destination="BcV-Ki-hIW" id="ABy-Wj-u7s"/>
+                <outlet property="collectionBtn" destination="iGr-8s-w8Z" id="qut-cS-I2H"/>
+                <outlet property="priceLab" destination="unw-4h-oaa" id="gG6-Dv-Bo7"/>
+                <outlet property="shareBtn" destination="CXz-o6-eGU" id="0gI-UA-RJj"/>
+                <outlet property="stateBgView" destination="Icq-dQ-ZRf" id="ASD-ab-ypU"/>
+                <outlet property="stateBtn" destination="KMH-mY-wuv" id="kg2-To-gXr"/>
+                <outlet property="titleLab" destination="0rp-10-f9d" id="fOe-cA-oiZ"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="402" height="116"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BcV-Ki-hIW">
+                    <rect key="frame" x="0.0" y="72" width="402" height="44"/>
+                    <subviews>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ot1-Eh-u3p">
+                            <rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
+                            <constraints>
+                                <constraint firstAttribute="width" secondItem="Ot1-Eh-u3p" secondAttribute="height" multiplier="1:1" id="6Rf-f3-aB3"/>
+                            </constraints>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                        </button>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4XX-Iz-XNd">
+                            <rect key="frame" x="180.33333333333334" y="2" width="41.333333333333343" height="40.333333333333336"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OT2-Rc-AbI">
+                                    <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20"/>
+                                    <subviews>
+                                        <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="BL0-Uh-Iwd">
+                                            <rect key="frame" x="-122.33333333333334" y="0.0" width="286.33333333333331" height="20"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0rp-10-f9d">
+                                                    <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Icq-dQ-ZRf">
+                                                    <rect key="frame" x="46.333333333333314" y="0.0" width="240" height="20"/>
+                                                    <subviews>
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KMH-mY-wuv">
+                                                            <rect key="frame" x="0.0" y="2.3333333333333286" width="240" height="15"/>
+                                                            <constraints>
+                                                                <constraint firstAttribute="height" constant="15" id="ibt-Sc-rLU"/>
+                                                            </constraints>
+                                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                        </button>
+                                                    </subviews>
+                                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                    <constraints>
+                                                        <constraint firstItem="KMH-mY-wuv" firstAttribute="centerY" secondItem="Icq-dQ-ZRf" secondAttribute="centerY" id="OqR-th-abD"/>
+                                                        <constraint firstAttribute="trailing" secondItem="KMH-mY-wuv" secondAttribute="trailing" id="ijd-hL-dZK"/>
+                                                        <constraint firstItem="KMH-mY-wuv" firstAttribute="leading" secondItem="Icq-dQ-ZRf" secondAttribute="leading" id="xnR-5r-9GQ"/>
+                                                    </constraints>
+                                                </view>
+                                            </subviews>
+                                        </stackView>
+                                    </subviews>
+                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <constraints>
+                                        <constraint firstItem="BL0-Uh-Iwd" firstAttribute="centerX" secondItem="OT2-Rc-AbI" secondAttribute="centerX" id="BvD-nT-F65"/>
+                                        <constraint firstItem="BL0-Uh-Iwd" firstAttribute="top" secondItem="OT2-Rc-AbI" secondAttribute="top" id="EoS-Yg-BY7"/>
+                                        <constraint firstItem="BL0-Uh-Iwd" firstAttribute="centerY" secondItem="OT2-Rc-AbI" secondAttribute="centerY" id="g4E-dJ-ajQ"/>
+                                        <constraint firstAttribute="height" constant="20" id="l1z-fi-qaA"/>
+                                    </constraints>
+                                </view>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="unw-4h-oaa">
+                                    <rect key="frame" x="0.0" y="20" width="41.333333333333336" height="20.333333333333329"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <nil key="textColor"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="unw-4h-oaa" firstAttribute="leading" secondItem="4XX-Iz-XNd" secondAttribute="leading" id="1vg-XP-GRh"/>
+                                <constraint firstAttribute="trailing" secondItem="unw-4h-oaa" secondAttribute="trailing" id="LZ9-oZ-CIa"/>
+                                <constraint firstItem="OT2-Rc-AbI" firstAttribute="leading" secondItem="4XX-Iz-XNd" secondAttribute="leading" id="UwH-c1-ENd"/>
+                                <constraint firstItem="unw-4h-oaa" firstAttribute="top" secondItem="OT2-Rc-AbI" secondAttribute="bottom" id="bj1-pk-k3q"/>
+                                <constraint firstAttribute="trailing" secondItem="OT2-Rc-AbI" secondAttribute="trailing" id="i9n-Lt-eRM"/>
+                                <constraint firstItem="OT2-Rc-AbI" firstAttribute="top" secondItem="4XX-Iz-XNd" secondAttribute="top" id="mJm-am-faI"/>
+                                <constraint firstAttribute="bottom" secondItem="unw-4h-oaa" secondAttribute="bottom" id="tMs-2o-XIk"/>
+                            </constraints>
+                        </view>
+                        <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e7h-lG-Gh9">
+                            <rect key="frame" x="314" y="0.0" width="88" height="44"/>
+                            <subviews>
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CXz-o6-eGU">
+                                    <rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
+                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                </button>
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iGr-8s-w8Z">
+                                    <rect key="frame" x="44" y="0.0" width="44" height="44"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" secondItem="iGr-8s-w8Z" secondAttribute="height" multiplier="1:1" id="HGy-M8-Xg1"/>
+                                    </constraints>
+                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                </button>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="iGr-8s-w8Z" firstAttribute="width" secondItem="CXz-o6-eGU" secondAttribute="width" id="GFd-Dq-vyC"/>
+                            </constraints>
+                        </stackView>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="DED-XL-jbP"/>
+                        <constraint firstItem="e7h-lG-Gh9" firstAttribute="top" secondItem="BcV-Ki-hIW" secondAttribute="top" id="KOY-xb-LNc"/>
+                        <constraint firstItem="Ot1-Eh-u3p" firstAttribute="top" secondItem="BcV-Ki-hIW" secondAttribute="top" id="Kj1-Tg-RBp"/>
+                        <constraint firstAttribute="bottom" secondItem="Ot1-Eh-u3p" secondAttribute="bottom" id="SIo-rQ-2wV"/>
+                        <constraint firstItem="4XX-Iz-XNd" firstAttribute="centerX" secondItem="BcV-Ki-hIW" secondAttribute="centerX" id="TKd-B2-p6X"/>
+                        <constraint firstAttribute="trailing" secondItem="e7h-lG-Gh9" secondAttribute="trailing" id="ZNC-1B-a9A"/>
+                        <constraint firstItem="Ot1-Eh-u3p" firstAttribute="leading" secondItem="BcV-Ki-hIW" secondAttribute="leading" id="a2l-ai-5Ad"/>
+                        <constraint firstItem="4XX-Iz-XNd" firstAttribute="centerY" secondItem="BcV-Ki-hIW" secondAttribute="centerY" id="a5V-nt-YHh"/>
+                        <constraint firstAttribute="bottom" secondItem="e7h-lG-Gh9" secondAttribute="bottom" id="gyu-Jh-6Qz"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+            <constraints>
+                <constraint firstItem="BcV-Ki-hIW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="4CB-CJ-NG0"/>
+                <constraint firstAttribute="trailing" secondItem="BcV-Ki-hIW" secondAttribute="trailing" id="7Qb-Db-ZqT"/>
+                <constraint firstAttribute="bottom" secondItem="BcV-Ki-hIW" secondAttribute="bottom" id="8S1-xi-DOM"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="-6.1068702290076331" y="281.69014084507046"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 0 - 239
Koala/Koala/Modular/Market/V/MarketListCell.swift

@@ -1,239 +0,0 @@
-//
-//  MarketCell.swift
-//  Koala
-//
-//  Created by mac on 2023/9/8.
-//  Copyright © 2023 刘千军. All rights reserved.
-//
-
-import Foundation
-import UIKit
-
-class MarketListCell: BaseTableViewCell {
-    
-    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
-        super.init(style: style, reuseIdentifier: reuseIdentifier)
-        
-        contentView.addSubview(collectionBtn)
-        collectionBtn.snp.makeConstraints { make in
-            make.centerY.equalTo(contentView)
-            make.left.equalTo(contentView.snp.left).offset(12)
-            make.size.equalTo(CGSize(width: 10, height: 10))
-        }
-        contentView.addSubview(nameLab)
-        
-        nameLab.snp.makeConstraints { make in
-            make.left.equalTo(collectionBtn.snp.right).offset(12)
-            make.top.equalTo(contentView.snp.top).offset(10)
-        }
-        
-        contentView.addSubview(hintLab)
-        hintLab.snp.makeConstraints { make in
-            make.left.equalTo(nameLab.snp.left)
-            make.bottom.equalTo(contentView.snp.bottom).offset(-7)
-        }
-        
-        contentView.addSubview(value1Lab)
-        value1Lab.snp.makeConstraints { make in
-            make.centerY.equalTo(contentView)
-            make.right.equalTo(contentView.snp.right).offset(-17)
-            make.size.equalTo(CGSize(width: 72, height: 23))
-        }
-        
-        contentView.addSubview(valueLab)
-        valueLab.snp.makeConstraints { make in
-            make.centerY.equalTo(value1Lab)
-            make.right.equalTo(value1Lab.snp.left).offset(-12)
-        }
-        contentView.addSubview(bottomLine)
-        bottomLine.snp.makeConstraints { make in
-            make.left.equalTo(nameLab.snp.left)
-            make.right.equalTo(value1Lab.snp.right)
-            make.bottom.equalTo(contentView.snp.bottom)
-            make.height.equalTo(1)
-        }
-        
-    }
-    
-    required init?(coder aDecoder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-//    @IBOutlet weak var leftConstraint: NSLayoutConstraint!
-//    @IBOutlet weak var collectionBtn: UIButton!
-//    @IBOutlet weak var currencyView: UIImageView!
-//    @IBOutlet weak var nameLab: UILabel!
-//    @IBOutlet weak var hintLab: UILabel!
-//    @IBOutlet weak var valueLab: UILabel!
-//    @IBOutlet weak var value1Lab: UILabel!
-    
-    lazy var currencyView : UIImageView = {
-        let v = UIImageView()
-        return v
-    }()
-    
-    lazy var collectionBtn : UIButton = {
-        
-        let v = UIButton(type: .custom)
-        v.setImage(_image("Market_W_unCollect&Market_W_unCollect"), for: .normal)
-        
-        v.addTarget(self, action: #selector(clickCollectionBtnAction), for: .touchUpInside)
-        
-        return v
-    }()
-    
-    lazy var nameLab: UILabel = {
-        
-        let v = UILabel()
-        v.textColor = UIColor.pg_color(withHexString: "333333")
-        v.font = .systemFont(ofSize: 16)
-        v.text = "苹果"
-        return v
-    }()
-    
-    lazy var hintLab: UILabel = {
-        
-        let v = UILabel()
-        v.textColor = UIColor.pg_color(withHexString: "959697")
-        v.font = .systemFont(ofSize: 12)
-        v.text = "AAPL"
-        return v
-    }()
-    
-    lazy var value1Lab : UILabel = {
-        
-        let v = UILabel()
-        v.textColor = UIColor.pg_color(withHexString: "FEFFFF")
-        v.font = .systemFont(ofSize: 14)
-        v.text = "+1.28%"
-        v.textAlignment = .center
-        v.backgroundColor = UIColor.pg_color(withHexString: "E86343")
-        v.layer.masksToBounds = true
-        v.layer.cornerRadius = 2
-        return v
-    }()
-    
-    lazy var valueLab : UILabel = {
-        
-        let v = UILabel()
-        v.textColor = UIColor.pg_color(withHexString: "E86343")
-        v.font = .systemFont(ofSize: 14)
-        v.text = "178.726"
-        v.textAlignment = .right
-        return v
-    }()
-    
-    lazy var bottomLine : UIView = {
-        let v = UIView()
-        v.backgroundColor = UIColor.pg_color(withHexString: "F2F2F2")
-        return v
-    }()
-    
-    
-    
-    var symbolModel:KSymbolModel?
-    var clickCollectionBlock: ((_ symbolModel: KSymbolModel) -> ())?
-    
-    override func awakeFromNib() {
-        super.awakeFromNib()
-        self.backgroundColor = .clear
-        self.contentView.backgroundColor = .clear
-        self.collectionBtn.isHidden = true
-        
-        self.currencyView.backgroundColor = InputBackGroundColor
-        self.currencyView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 12)
-        self.currencyView.layer.masksToBounds = true
-        
-        self.nameLab.text = ""
-        self.hintLab.text = ""
-        self.valueLab.text = ""
-        self.value1Lab.text = ""
-        
-//        self.collectionBtn.addTarget(self, action: #selector(clickCollectionBtnAction), for: .touchUpInside)
-        
-    }
-    
-    override func setSelected(_ selected: Bool, animated: Bool) {
-        super.setSelected(selected, animated: animated)
-
-        // Configure the view for the selected state
-    }
-    
-   
-    @objc func clickCollectionBtnAction(){
-        self.clickCollectionBlock?(self.symbolModel!)
-    }
-}
-
-
-extension MarketListCell {
-    func updateHomeCellWith(model:KSymbolModel) -> Void {
-//        self.leftConstraint.constant = 15
-        self.nameLab.setTextFont(.PFSR, 14)
-        self.hintLab.setTextFont(.PFSR, 12)
-        self.valueLab.setTextFont(.PFSR, 16)
-        self.value1Lab.setTextFont(.PFSR, 12)
-        self.nameLab.textColor = TitleTextColor
-        self.hintLab.textColor = _color("#68727e&#68727e")
-        self.valueLab.textColor = TitleTextColor
-        
-        self.nameLab.text = model.symbol
-        self.hintLab.text = model.description
-
-        self.updateNewPrice(model: model)
-        
-        if let url = URL.init(string:fileLinkPackage(path:"png/"+model.symbol+".png")) {
-            self.currencyView.kf.setImage(with:url, placeholder: _image("Base_W_Default_Currency&Base_W_Default_Currency"))
-        }
-
-        
-        
-    }
-    
-    func updateNewPrice(model:KSymbolModel) -> Void {
-        self.valueLab.text = precisionString(with: model.newPrice, precision: model.digits)
-        self.value1Lab.text = precisionString(with: model.increase, precision: "2") + "%"
-//        self.value1Lab.textColor = exchangeColorAndImage(increase: conerData(model.increase as Any, .MyFloat).1!).0
-        
-        self.valueLab.textColor = exchangeColorAndImage(increase: conerData(model.increase as Any, .MyFloat).1!).0
-        self.value1Lab.backgroundColor = exchangeColorAndImage(increase: conerData(model.increase as Any, .MyFloat).1!).0
-    }
-    
-    func updateMarketCellWith(model:KSymbolModel) -> Void {
-        self.symbolModel = model
-//        self.leftConstraint.constant = 0
-        self.collectionBtn.isHidden = false
-        if model.isCollection{
-            self.collectionBtn .setImage(_image("Market_W_unCollect&Market_W_unCollect").imageWithTintColor(color: AllGreenColor), for: .normal)
-        }else{
-            self.collectionBtn .setImage(_image("Market_W_unCollect&Market_W_unCollect"), for: .normal)
-        }
-       
-        self.nameLab.setTextFont(.PFSR, 14)
-        self.hintLab.setTextFont(.PFSR, 12)
-        self.valueLab.setTextFont(.PFSR, 16)
-        self.value1Lab.setTextFont(.PFSR, 12)
-        self.nameLab.textColor = TitleTextColor
-        self.hintLab.textColor = _color("#68727e&#68727e")
-        self.valueLab.textColor = TitleTextColor
-       
-//        self.nameLab.text = model.symbol
-        
-        self.nameLab.text = model.title
-        
-//        self.hintLab.text = model.description
-        
-        self.hintLab.text = model.symbol
-
-        self.updateNewPrice(model: model)
-        
-        //www.ddse.io/png/AAPLm.png
-        
-        if let url = URL.init(string:fileLinkPackage(path:"png/"+model.symbol+".png")) {
-          
-            self.currencyView.kf.setImage(with:url, placeholder: _image("Base_W_Default_Currency&Base_W_Default_Currency"))
-        }
-//
-        
-    }
-}

+ 0 - 75
Koala/Koala/Modular/Market/V/MarketNavView.swift

@@ -1,75 +0,0 @@
-//
-//  MarketNavView.swift
-//  Koala
-//
-//  Created by mac on 2023/9/8.
-//  Copyright © 2023 刘千军. All rights reserved.
-//
-
-import Foundation
-import UIKit
-
-class MarketNavView: BaseView
-{
-
-    lazy var titleLb : UILabel = {
-        
-        let v = UILabel()
-        v.textColor = .black
-        v.font = .boldSystemFont(ofSize: 22)
-        v.text = "市场"
-        
-        return v
-    }()
-    
-    lazy var searchBtn : UIButton = {
-        
-        let  v = UIButton(type: .custom)
-        
-        v.setImage(UIImage(named: "Infomation_search"), for: .normal)
-        
-        return v
-    }()
-    
-    lazy var chatBtn : UIButton = {
-        
-        let v = UIButton(type: .custom)
-        v.setImage(UIImage(named: "Infomation_chat"), for: .normal)
-        
-        return v
-    }()
-    
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-    
-        backgroundColor = .white
-        
-        self.addSubview(titleLb)
-        titleLb.snp.makeConstraints { make in
-            make.left.equalTo(self.snp.left).offset(18)
-            make.bottom.equalTo(self.snp.bottom).offset(-16)
-        }
-        
-        self.addSubview(chatBtn)
-        chatBtn.snp.makeConstraints { make in
-            make.right.equalTo(self.snp.right).offset(-15)
-            make.bottom.equalTo(self.snp.bottom).offset(-15)
-            make.size.equalTo(CGSizeMake(24, 24))
-        }
-        
-        self.addSubview(searchBtn)
-        searchBtn.snp.makeConstraints { make in
-            make.right.equalTo(chatBtn.snp.left).offset(-14)
-            make.centerY.equalTo(chatBtn)
-            make.size.equalTo(CGSizeMake(24, 24))
-        }
-        
-        
-    }
-    
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    
-}

+ 0 - 369
Koala/Koala/Modular/Market/V/MarketView.swift

@@ -1,369 +0,0 @@
-//
-//  MarketView.swift
-//  Koala
-//
-//  Created by 刘千军 on 2023/1/14.
-//  Copyright © 2023 刘千军. All rights reserved.
-//
-
-import UIKit
-
-class MarketView: BaseView {
-    var VM: MarketViewModel?
-    
-    lazy var navView : MarketNavView = {
-        
-        let v = MarketNavView(frame: .zero)
-        
-        return v
-    }()
-    
-    lazy var segmentedControl:HMSegmentedControl = {
-        let segmentedControl:HMSegmentedControl = HMSegmentedControl.init(frame: CGRect(x: 0, y:NavigationViewHeight+StatusBarHeight, width:SCREEN_WIDTH-50, height: 40))
-        segmentedControl.selectedSegmentIndex = 1
-        segmentedControl.backgroundColor = .clear
-        segmentedControl.titleTextAttributes = [NSAttributedString.Key.foregroundColor : TitleTextColor,NSAttributedString.Key.font:_PFSR(16)]
-        segmentedControl.selectedTitleTextAttributes = [NSAttributedString.Key.foregroundColor : MainBackGroundColor,NSAttributedString.Key.font:_PFSR(18)]
-        segmentedControl.selectionIndicatorHeight = 2
-        segmentedControl.segmentWidthStyle = .dynamic
-        segmentedControl.selectionStyle = .fullWidthStripe
-        segmentedControl.selectionIndicatorLocation = .down
-        segmentedControl.selectionIndicatorColor = MainBackGroundColor
-        segmentedControl.segmentEdgeInset = UIEdgeInsets.init(top: 0, left: 20, bottom: 0, right: 0)
-        segmentedControl.indexChangeBlock = {[weak self](index) in
-            if index == 0 && !OperationalUserInfoData.getLogin(){
-                self?.segmentedControl.selectedSegmentIndex = UInt(self!.VM!.index)
-                getIntoLogin(myData: nil)
-                
-            }else{
-                self?.VM?.index = Int(index)
-            }
-           
-        }
-        segmentedControl.sectionTitles = ["",""]
-        return segmentedControl
-    }()
-    
-    
-    lazy var searchView:BaseSearchView = {
-        let view:BaseSearchView = BaseSearchView()
-        view.textFieldBlock = {[weak self] text in
-            self?.VM?.screenText = text
-        }
-        return view
-    }()
-    
-    lazy var searchBgView:UIView = {
-        let view:UIView = UIView()
-        view.addSubview(self.searchView)
-        self.searchView.snp.makeConstraints { make in
-            make.top.equalTo(5)
-            make.left.equalTo(15)
-            make.right.equalTo(-15)
-            make.bottom.equalTo(-5)
-        }
-        return view
-    }()
-    
-    lazy var listHeader:MarketListHeaderView = {
-        let view = MarketListHeaderView()
-//        view.leftBtn.setTextFont(.PFSM, 16)
-//        view.rightBtn.setTextFont(.PFSM, 16)
-        view.clickLeftBtnBlock = {
-            self.VM?.increaseSort = 0
-            if self.VM?.symbolSort == 0{
-                self.VM?.symbolSort = 1
-            }
-            else if self.VM?.symbolSort == 1{
-                self.VM?.symbolSort = 2
-            }
-            else if self.VM?.symbolSort == 2{
-                self.VM?.symbolSort = 0
-            }
-        }
-        view.clickRightBtnBlock = {
-            self.VM?.symbolSort = 0
-            if self.VM?.increaseSort == 0{
-                self.VM?.increaseSort = 1
-            }
-            else if self.VM?.increaseSort == 1{
-                self.VM?.increaseSort = 2
-            }
-            else if self.VM?.increaseSort == 2{
-                self.VM?.increaseSort = 0
-            }
-        }
-        return view
-    }()
-    
-    lazy var listHeaderBgView:UIView = {
-        let view:UIView = UIView()
-        view.addSubview(self.listHeader)
-        self.listHeader.snp.makeConstraints { make in
-            make.left.equalTo(15)
-            make.right.equalTo(-15)
-            make.top.bottom.equalToSuperview()
-        }
-        return view
-    }()
-    
-    lazy var tableView: BaseTableView = { [weak self] in
-        let tableView = BaseTableView.init(frame: .zero, style: .plain)
-        tableView.separatorStyle = .none
-        tableView.delegate = self
-        tableView.dataSource = self
-        tableView.backgroundColor = .clear
-        tableView.tableHeaderView = UIView()
-        tableView.tableFooterView = UIView()
-        tableView.showsHorizontalScrollIndicator = false
-        tableView.showsVerticalScrollIndicator = false
-        
-        tableView.register(UINib.init(nibName: "HomeInfoCell", bundle: nil), forCellReuseIdentifier: "HomeInfoCell")
-        
-        tableView.register(UINib.init(nibName: "BaseCurrencyListCell", bundle: nil), forCellReuseIdentifier: "BaseCurrencyListCell")
-        
-        tableView.register(MarketListCell.self, forCellReuseIdentifier: MarketListCell.description())
-        
-        if #available(iOS 11, *){
-            tableView.contentInsetAdjustmentBehavior = .never
-        }
-        return tableView
-    }()
-    
-    lazy var menuBtn : UIButton = {
-        let v = UIButton(type: .custom)
-        v.setImage(UIImage(named: "market_menu"), for: .normal)
-        
-        return v
-    }()
-
-    
-    override func subView() {
-        self.backgroundColor = .white //ALLBackGroundColor
-        
-        self.addSubview(navView)
-        self.addSubview(segmentedControl)
-//        self.addSubview(searchBgView)
-        self.addSubview(menuBtn)
-        self.addSubview(listHeaderBgView)
-        self.addSubview(tableView)
-        mySwitchLanguage()
-        mySwitchSkin()
-    }
-    
-    override func layoutSubviews() {
-        super.layoutSubviews()
-        
-        self.navView.snp.makeConstraints { make in
-            make.top.left.right.equalTo(self)
-            make.height.equalTo(NavigationViewHeight+StatusBarHeight)
-        }
-        
-//        self.searchBgView.snp.makeConstraints { make in
-//            make.left.right.equalToSuperview()
-//            make.height.equalTo(50)
-////            make.top.equalTo(51)
-//            make.top.equalTo(NavigationViewHeight+StatusBarHeight+51)
-//
-//        }
-        
-        self.menuBtn.snp.makeConstraints { make in
-            make.centerY.equalTo(segmentedControl)
-            make.right.equalTo(self.snp.right).offset(-17)
-            make.size.equalTo(CGSize(width: 25, height: 25))
-        }
-        self.listHeaderBgView.snp.makeConstraints { make in
-            make.left.right.equalToSuperview()
-            make.height.equalTo(40)
-//            make.top.equalTo(self.searchBgView.snp.bottom).offset(1)
-            make.top.equalTo(NavigationViewHeight + StatusBarHeight + 40)
-        }
-        
-        tableView.snp.makeConstraints { make in
-            make.bottom.right.left.equalToSuperview()
-            make.top.equalTo(self.listHeaderBgView.snp.bottom)
-        }
-    }
-    
-    override func setViewModel(viewmodel: AnyObject) {
-        guard viewmodel is MarketViewModel else {
-            return
-        }
-        self.VM = viewmodel as? MarketViewModel
-        super.setViewModel(viewmodel: viewmodel)
-       
-    }
-    
-    override func mySwitchLanguage() {
-      
-        self.searchView.setTextPlaceholder(text: switchLanguage("搜索"))
-        self.listHeader.priceBtn.setTitle(switchLanguage("价格"), for: .normal)
-        self.listHeader.upDownBtn.setTitle(switchLanguage("涨跌幅"), for: .normal)
-        self.listHeader.priceBtn.setImage(_image("Market_W_Sort_Normal&Market_W_Sort_Normal"), for: .normal)
-        self.listHeader.upDownBtn.setImage(_image("Market_W_Sort_Normal&Market_W_Sort_Normal"), for: .normal)
-        self.listHeader.priceBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5);
-        self.listHeader.upDownBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5);
-    }
-    
-    override func mySwitchSkin() {
-        self.tableView.backgroundColor = .clear
-        self.backgroundColor = .white//ViewBorderColor
-        
-        self.segmentedControl.backgroundColor = ALLBackGroundColor
-        self.searchBgView.backgroundColor = ALLBackGroundColor
-        self.searchView.textField.backgroundColor = InputBackGroundColor
-        self.searchView.mySwitchSkin()
-        
-        self.listHeaderBgView.backgroundColor = ALLBackGroundColor
-        self.tableView.backgroundColor = ALLBackGroundColor
-        self.listHeader.priceBtn.setTitleColor(_color("#68727e&#68727e"), for: .normal)
-        self.listHeader.upDownBtn.setTitleColor(_color("#68727e&#68727e"), for: .normal)
-        
-        segmentedControl.titleTextAttributes = [NSAttributedString.Key.foregroundColor : TitleTextColor,NSAttributedString.Key.font:_PFSR(14)]
-        segmentedControl.selectedTitleTextAttributes = [NSAttributedString.Key.foregroundColor : MainBackGroundColor,NSAttributedString.Key.font:_PFSM(14)]
-        segmentedControl.selectionIndicatorColor = MainBackGroundColor
-    }
-    
-
-    override func blindModel() {
-        VM?.groupListAction.values.observeValues({[weak self] (success) in
-            guard let self = self else { return }
-            if success {
-                var nameList = [String]()
-                for model in self.VM!.productGroupList {
-                    if conerData(model.id, .MyInt).0! < 1{
-                        nameList.append(model.title)
-                    }else{
-                        
-                        nameList.append(model.title)
-//                        for m in model.langList {
-//                            if OpretationalLanguage.getLanguageStatus() == .ChineseLanguage{
-//                                if m.language == "zh-CN"{
-//                                    nameList.append(m.title)
-//                                }
-//                            }else{
-//                                if m.language == "en"{
-//                                    nameList.append(m.title)
-//                                }
-//                            }
-//                        }
-                    }
-                   
-                    
-                }
-                self.segmentedControl.sectionTitles = nameList
-            }
-        })
-        
-        VM?.insertProductUserAction.values.observeValues({[weak self] (success) in
-            guard let self = self else { return }
-            if success {
-                self.reloadTable()
-            }
-        })
-        
-        VM?.deleteProductUserAction.values.observeValues({[weak self] (success) in
-            guard let self = self else { return }
-            if success {
-                self.reloadTable()
-            }
-        })
-        
-        VM?.signalScreen.observeValues({ [weak self] (success) in
-            guard let self = self else { return }
-            if success {
-                self.reloadTable()
-            }
-        })
-        
-        VM?.signalSymbol.observeValues({ [weak self] (isSocket) in
-            guard let self = self else { return }
-            if isSocket {
-                self.updateSocketCellData()
-            }
-        })
-        
-        
-    }
-    
-    func updateSocketCellData() -> Void {
-        for (i,model) in self.VM!.screenSymbolList.enumerated() {
-            if let cell:BaseCurrencyListCell = self.tableView.cellForRow(at: IndexPath(row: i, section: 0)) as? BaseCurrencyListCell{
-                cell.updateNewPrice(model: model)
-            }
-        }
-    }
-    
-    func reloadTable() {
-        DispatchQueue.main.async {
-//            self.tableView.mj_header!.endRefreshing()
-            self.tableView.reloadData()
-        }
-    }
-    
-    
-    
-}
-
-//代理
-extension MarketView:UITableViewDelegate,UITableViewDataSource{
-   
-    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-       
-        return self.VM?.screenSymbolList.count ?? 0
-    }
-    
-    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-//        let cell:BaseCurrencyListCell = tableView.dequeueReusableCell(withIdentifier: "BaseCurrencyListCell") as! BaseCurrencyListCell
-        let cell = tableView.dequeueReusableCell(withIdentifier: MarketListCell.description()) as! MarketListCell
-        let model:KSymbolModel = (self.VM?.screenSymbolList[indexPath.row])!;
-        cell.updateMarketCellWith(model: model)
-        cell.clickCollectionBlock = { symbolModel in
-            if symbolModel.isCollection{
-                self.VM?.netDeleteProductUser(symbol: symbolModel.symbol)
-            }else{
-                self.VM?.netInsertProductUser(symbol: symbolModel.symbol)
-            }
-            
-        }
-        return cell
-    }
-    
-    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
-        return 55
-    }
-    
-    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
-        return UIView()
-    }
-    
-    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
-        return UIView()
-    }
-    
-    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-        return 0
-    }
-    
-    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
-        return 0
-    }
-    
-    
-    
-    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
-        let model = self.VM?.screenSymbolList[indexPath.row]
-//        let vc = CTKLineViewController()
-//        vc.viewModel.symbolModel = model!
-//        currentVc()?.navigationController?.pushViewController(vc, animated: true)
-       
-        let vc = MarketMainDetailViewController()
-        vc.viewModel.symbolModel = model!
-        currentVc()?.navigationController?.pushViewController(vc, animated: true)
-    }
-    
-}
-
-
-
-

+ 298 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketHeaderView.swift

@@ -0,0 +1,298 @@
+//
+//  MarketHeaderView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/10.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MarketHeaderView: BaseView {
+
+    @IBOutlet weak var bg1View: UIView!
+    @IBOutlet weak var menuBg1View: UIView!
+    @IBOutlet weak var menu1Btn: UIButton!
+    
+    @IBOutlet weak var btn1: UIButton!
+    @IBOutlet weak var btn2: UIButton!
+    @IBOutlet weak var btn3: UIButton!
+    @IBOutlet weak var btn4: UIButton!
+    
+    @IBOutlet weak var priceBtn: UIButton!
+    @IBOutlet weak var changeBtn: UIButton!
+    
+    
+    @IBOutlet weak var bg2View: UIView!
+    @IBOutlet weak var menuBg2View: UIView!
+    @IBOutlet weak var menu2Btn: UIButton!
+   
+    @IBOutlet weak var optionLab: UILabel!
+    
+    @IBOutlet weak var collectionView: UICollectionView!
+    @IBOutlet weak var screenBtn: UIButton!
+    
+    
+    @IBOutlet weak var optionsTitleLab: UILabel!
+    @IBOutlet weak var optionsChangeBtn: UIButton!
+    @IBOutlet weak var optionsMeanBtn: UIButton!
+    @IBOutlet weak var optionsVirtualBtn: UIButton!
+    
+    var clickLeftBtnBlock: (() -> ())?
+    
+    var clickRightBtnBlock: (() -> ())?
+    
+    var clickTimerBlock: ((_ index:Int) -> ())?
+    
+    var listData:[OptionsTimerModel] = [OptionsTimerModel]()
+    
+    lazy var segmentedControl:HMSegmentedControl = {
+        let segmentedControl:HMSegmentedControl = HMSegmentedControl.init(frame: CGRect(x: 10, y:0, width:SCREEN_WIDTH-74, height: 44))
+        segmentedControl.selectedSegmentIndex = 0
+        segmentedControl.backgroundColor = .clear
+      
+        segmentedControl.selectionIndicatorHeight = 2
+        segmentedControl.segmentWidthStyle = .dynamic
+        segmentedControl.selectionStyle = .textWidthStripe
+        segmentedControl.selectionIndicatorLocation = .down
+        segmentedControl.selectionIndicatorColor = MainBackGroundColor
+        segmentedControl.segmentEdgeInset = UIEdgeInsets.init(top: 0, left: 10, bottom: 0, right: 10)
+
+        segmentedControl.sectionTitles = ["",""]
+        return segmentedControl
+    }()
+    
+    lazy var segmented2Control:HMSegmentedControl = {
+        let segmentedControl:HMSegmentedControl = HMSegmentedControl.init(frame: CGRect(x: 10, y:0, width:SCREEN_WIDTH-74, height: 44))
+        segmentedControl.selectedSegmentIndex = 0
+        segmentedControl.backgroundColor = .clear
+      
+        segmentedControl.selectionIndicatorHeight = 2
+        segmentedControl.segmentWidthStyle = .dynamic
+        segmentedControl.selectionStyle = .textWidthStripe
+        segmentedControl.selectionIndicatorLocation = .down
+        segmentedControl.selectionIndicatorColor = MainBackGroundColor
+        segmentedControl.segmentEdgeInset = UIEdgeInsets.init(top: 0, left: 10, bottom: 0, right: 10)
+
+        segmentedControl.sectionTitles = ["",""]
+        return segmentedControl
+    }()
+    
+    
+    
+    var headerView: UIView!
+    
+    func loadFromNib() -> UIView {
+        return Bundle.main.loadNibNamed("MarketHeaderView", owner: self, options: nil)?.first as! UIView
+    }
+
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        headerView = loadFromNib()
+        addSubview(headerView)
+        headerView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        
+        self.menuBg1View.addSubview(self.segmentedControl)
+        
+        self.menuBg2View.addSubview(self.segmented2Control)
+        
+        
+        self.priceBtn.setTextFont(.PFSR, 12)
+        self.changeBtn.setTextFont(.PFSR, 12)
+        
+        self.optionLab.setTextFont(.PFSR, 14)
+        
+        self.screenBtn.setTextFont(.PFSR, 14)
+        
+        self.optionsTitleLab.setTextFont(.PFSR, 12)
+        self.optionsChangeBtn.setTextFont(.PFSR, 12)
+        self.optionsMeanBtn.setTextFont(.PFSR, 12)
+        self.optionsVirtualBtn.setTextFont(.PFSR, 12)
+        
+    }
+    
+    override func mySwitchLanguage() {
+        self.priceBtn.setTitle(switchLanguage("价格"), for: .normal)
+        self.changeBtn.setTitle(switchLanguage("涨跌幅"), for: .normal)
+        
+        self.optionLab.text = switchLanguage("期权")
+        self.screenBtn.setTitle(switchLanguage("筛选"), for: .normal)
+        
+        self.optionsTitleLab.text = switchLanguage("标的")
+        self.optionsChangeBtn.setTitle(switchLanguage("涨跌幅"), for: .normal)
+        self.optionsMeanBtn.setTitle(switchLanguage("平值"), for: .normal)
+        self.optionsVirtualBtn.setTitle(switchLanguage("虚值105"), for: .normal)
+        
+    }
+    
+    override func mySwitchSkin() {
+        headerView.backgroundColor = ALLBackGroundColor
+        
+        segmentedControl.titleTextAttributes = [NSAttributedString.Key.foregroundColor : TitleTextColor,NSAttributedString.Key.font:_PFSR(14)]
+        segmentedControl.selectedTitleTextAttributes = [NSAttributedString.Key.foregroundColor : MainBackGroundColor,NSAttributedString.Key.font:_PFSR(16)]
+        segmentedControl.selectionIndicatorColor = MainBackGroundColor
+        
+        self.menu1Btn.setImage(_image("market_menu&market_menu"), for: .normal)
+        
+        self.btn1.setImage(_image("market_trans&market_trans"), for: .normal)
+        self.btn2.setImage(_image("market_chart&market_chart"), for: .normal)
+        self.btn3.setImage(_image("market_rect&market_rect"), for: .normal)
+        self.btn4.setImage(_image("market_setting&market_setting"), for: .normal)
+        
+     
+        self.priceBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.changeBtn.setTitleColor(TitleTextColor, for: .normal)
+        
+        self.priceBtn.setImage(_image("Market_W_Sort_Normal&Market_W_Sort_Normal"), for: .normal)
+        self.changeBtn.setImage(_image("Market_W_Sort_Normal&Market_W_Sort_Normal"), for: .normal)
+        self.priceBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5);
+        self.changeBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5);
+        
+        
+        segmented2Control.titleTextAttributes = [NSAttributedString.Key.foregroundColor : TitleTextColor,NSAttributedString.Key.font:_PFSR(14)]
+        segmented2Control.selectedTitleTextAttributes = [NSAttributedString.Key.foregroundColor : MainBackGroundColor,NSAttributedString.Key.font:_PFSR(16)]
+        segmented2Control.selectionIndicatorColor = MainBackGroundColor
+        
+        self.menu2Btn.setImage(_image("market_menu&market_menu"), for: .normal)
+        
+        self.optionLab.textColor = MidTextColor
+        
+        let layout = UICollectionViewFlowLayout.init()
+        layout.scrollDirection = UICollectionView.ScrollDirection.vertical
+        layout.minimumInteritemSpacing = 5
+        layout.minimumLineSpacing = 0
+        collectionView.setCollectionViewLayout(layout, animated: true)
+        collectionView.delegate = self
+        collectionView.dataSource = self
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        collectionView.backgroundColor = UIColor.clear
+        collectionView.base_registerCell(cellClass: MHTimerCell.self)
+       
+        self.screenBtn.setTitleColor(MidTextColor, for: .normal)
+        self.screenBtn.setImage(_image("Market_W_Screen&Market_W_Screen"), for: .normal)
+        self.screenBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5);
+        
+        
+        self.optionsTitleLab.textColor = MidTextColor
+        self.optionsChangeBtn.setTitleColor(MidTextColor, for: .normal)
+        self.optionsMeanBtn.setTitleColor(MidTextColor, for: .normal)
+        self.optionsVirtualBtn.setTitleColor(MidTextColor, for: .normal)
+        
+        self.optionsChangeBtn.setImage(_image("Market_W_Sort_Normal&Market_W_Sort_Normal"), for: .normal)
+        self.optionsMeanBtn.setImage(_image("Market_W_Sort_Normal&Market_W_Sort_Normal"), for: .normal)
+        self.optionsVirtualBtn.setImage(_image("Market_W_Sort_Normal&Market_W_Sort_Normal"), for: .normal)
+        self.optionsChangeBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5);
+        self.optionsMeanBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5);
+        self.optionsVirtualBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5);
+    }
+    
+
+    required init?(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+    }
+    
+    
+    func updateLayer(index:Int) -> Void {
+        self.bg1View.isHidden = true
+        self.bg2View.isHidden = true
+        if index == 0 {
+            self.bg1View.isHidden = false
+            self.menuBg1View.isHidden = true
+        }
+        else if index == 1{
+            self.bg1View.isHidden = false
+            self.menuBg1View.isHidden = false
+        }
+        else{
+            self.bg2View.isHidden = false
+        }
+    }
+    
+    func updateOptionsTimer(list:[OptionsTimerModel]){
+        self.listData = list
+        self.collectionView.reloadData()
+    }
+
+}
+
+extension MarketHeaderView : UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource{
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return self.listData.count
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = collectionView.base_dequeueReusableCell(indexPath: indexPath) as MHTimerCell
+        let model:OptionsTimerModel = self.listData[indexPath.row]
+        cell.updateCellDataWith(model:model)
+       
+        return cell
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:30, height: collectionView.frame.height)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        for model in self.listData {
+            model.isSelect = false
+        }
+        
+        let model:OptionsTimerModel = self.listData[indexPath.row]
+        model.isSelect = true
+        self.collectionView.reloadData()
+        self.clickTimerBlock?(indexPath.row)
+    }
+
+}
+
+class MHTimerCell: UICollectionViewCell {
+   
+    lazy var titleLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSR, 12)
+        lab.textColor = TitleTextColor
+        lab.textAlignment = .center
+        return lab
+    }()
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        contentView.addSubview(titleLab)
+        self.backgroundColor = .clear
+        self.contentView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        self.contentView.layer.masksToBounds = true
+    }
+    
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        self.titleLab.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        
+    }
+    
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+
+    func updateCellDataWith(model:OptionsTimerModel) -> Void {
+        self.titleLab.text = model.title
+        if model.isSelect {
+            self.contentView.backgroundColor = _color("#FFF1F1&#FFF1F1")
+            self.titleLab.textColor = _color("#EA4A45&#EA4A45")
+        }else{
+            self.contentView.backgroundColor = ViewBorderColor
+            self.titleLab.textColor = MidTextColor
+        }
+    }
+   
+  
+
+}
+
+

+ 276 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketHeaderView.xib

@@ -0,0 +1,276 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <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" customClass="MarketHeaderView" customModule="Koala" customModuleProvider="target">
+            <connections>
+                <outlet property="bg1View" destination="dhn-Yo-3At" id="pag-QQ-TwN"/>
+                <outlet property="bg2View" destination="3Lf-8d-mW6" id="zY1-hV-Nhn"/>
+                <outlet property="btn1" destination="bjO-Ms-oDa" id="dmY-V9-NXa"/>
+                <outlet property="btn2" destination="X9m-PT-T4f" id="hhG-M8-az3"/>
+                <outlet property="btn3" destination="vgq-N0-c5V" id="1Yl-Pe-rdA"/>
+                <outlet property="btn4" destination="Ib7-dm-kXr" id="dyQ-i7-q1r"/>
+                <outlet property="changeBtn" destination="Sau-Ax-z7A" id="Rlh-gT-scu"/>
+                <outlet property="collectionView" destination="0dO-ui-Xej" id="tpp-zC-7ru"/>
+                <outlet property="menu1Btn" destination="6sQ-sv-M6s" id="i2b-aN-yTY"/>
+                <outlet property="menu2Btn" destination="e3r-Jt-afI" id="NCN-pF-aZP"/>
+                <outlet property="menuBg1View" destination="qPY-Qn-rJ7" id="qwU-3b-gvA"/>
+                <outlet property="menuBg2View" destination="wbH-Ad-VQF" id="ikF-OT-8yR"/>
+                <outlet property="optionLab" destination="IXb-az-D5L" id="z2R-V5-XIb"/>
+                <outlet property="optionsChangeBtn" destination="aqe-M7-dkg" id="iY7-pX-FqT"/>
+                <outlet property="optionsMeanBtn" destination="YDn-eS-upl" id="c9t-wA-2nW"/>
+                <outlet property="optionsTitleLab" destination="RzD-CQ-O2w" id="VgI-wb-rjJ"/>
+                <outlet property="optionsVirtualBtn" destination="4er-hb-wzS" id="xeS-2x-MQ5"/>
+                <outlet property="priceBtn" destination="WoH-d7-CQB" id="cQW-Rg-yuw"/>
+                <outlet property="screenBtn" destination="dd7-Uq-DM3" id="bJv-b6-VWt"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="491" height="156"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="QAl-3w-QIE">
+                    <rect key="frame" x="0.0" y="12" width="491" height="144"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dhn-Yo-3At">
+                            <rect key="frame" x="0.0" y="0.0" width="491" height="144"/>
+                            <subviews>
+                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="ZmW-bX-Dma">
+                                    <rect key="frame" x="0.0" y="0.0" width="491" height="144"/>
+                                    <subviews>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qPY-Qn-rJ7">
+                                            <rect key="frame" x="0.0" y="0.0" width="491" height="44"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6sQ-sv-M6s">
+                                                    <rect key="frame" x="447" y="0.0" width="44" height="44"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" secondItem="6sQ-sv-M6s" secondAttribute="height" multiplier="1:1" id="zq2-XM-5Qf"/>
+                                                    </constraints>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                            </subviews>
+                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <constraints>
+                                                <constraint firstAttribute="bottom" secondItem="6sQ-sv-M6s" secondAttribute="bottom" id="33G-ZZ-l2V"/>
+                                                <constraint firstAttribute="trailing" secondItem="6sQ-sv-M6s" secondAttribute="trailing" id="QFB-va-nkb"/>
+                                                <constraint firstItem="6sQ-sv-M6s" firstAttribute="top" secondItem="qPY-Qn-rJ7" secondAttribute="top" id="aJz-YM-hyS"/>
+                                                <constraint firstAttribute="height" constant="44" id="k9R-52-xJj"/>
+                                            </constraints>
+                                        </view>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DA8-n0-KD4">
+                                            <rect key="frame" x="0.0" y="44" width="491" height="100"/>
+                                            <subviews>
+                                                <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qpU-vK-NwD">
+                                                    <rect key="frame" x="10" y="0.0" width="266.66666666666669" height="100"/>
+                                                    <subviews>
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bjO-Ms-oDa">
+                                                            <rect key="frame" x="0.0" y="0.0" width="66.666666666666671" height="100"/>
+                                                            <constraints>
+                                                                <constraint firstAttribute="width" secondItem="bjO-Ms-oDa" secondAttribute="height" multiplier="1:1.5" id="B1z-2V-Hqi"/>
+                                                            </constraints>
+                                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                        </button>
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="X9m-PT-T4f">
+                                                            <rect key="frame" x="66.666666666666657" y="0.0" width="66.666666666666657" height="100"/>
+                                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                        </button>
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vgq-N0-c5V">
+                                                            <rect key="frame" x="133.33333333333334" y="0.0" width="66.666666666666657" height="100"/>
+                                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                        </button>
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ib7-dm-kXr">
+                                                            <rect key="frame" x="200" y="0.0" width="66.666666666666686" height="100"/>
+                                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                        </button>
+                                                    </subviews>
+                                                    <constraints>
+                                                        <constraint firstItem="Ib7-dm-kXr" firstAttribute="width" secondItem="bjO-Ms-oDa" secondAttribute="width" id="AIJ-aZ-Z4k"/>
+                                                        <constraint firstItem="vgq-N0-c5V" firstAttribute="width" secondItem="bjO-Ms-oDa" secondAttribute="width" id="Qx8-LA-GVY"/>
+                                                        <constraint firstItem="X9m-PT-T4f" firstAttribute="width" secondItem="bjO-Ms-oDa" secondAttribute="width" id="aOa-dd-JaW"/>
+                                                    </constraints>
+                                                </stackView>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WoH-d7-CQB">
+                                                    <rect key="frame" x="391" y="0.0" width="80" height="100"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="80" id="3aJ-TO-KIM"/>
+                                                    </constraints>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sau-Ax-z7A">
+                                                    <rect key="frame" x="351" y="0.0" width="30" height="100"/>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                            </subviews>
+                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <constraints>
+                                                <constraint firstItem="qpU-vK-NwD" firstAttribute="leading" secondItem="DA8-n0-KD4" secondAttribute="leading" constant="10" id="0HK-rq-vso"/>
+                                                <constraint firstItem="WoH-d7-CQB" firstAttribute="top" secondItem="DA8-n0-KD4" secondAttribute="top" id="8gd-YZ-KCn"/>
+                                                <constraint firstAttribute="bottom" secondItem="Sau-Ax-z7A" secondAttribute="bottom" id="D0r-cj-xOi"/>
+                                                <constraint firstAttribute="bottom" secondItem="WoH-d7-CQB" secondAttribute="bottom" id="PHC-VW-aHo"/>
+                                                <constraint firstItem="Sau-Ax-z7A" firstAttribute="top" secondItem="DA8-n0-KD4" secondAttribute="top" id="f7K-GZ-g7L"/>
+                                                <constraint firstAttribute="trailing" secondItem="WoH-d7-CQB" secondAttribute="trailing" constant="20" id="fwf-gH-toT"/>
+                                                <constraint firstItem="qpU-vK-NwD" firstAttribute="top" secondItem="DA8-n0-KD4" secondAttribute="top" id="mqA-oW-Dym"/>
+                                                <constraint firstItem="WoH-d7-CQB" firstAttribute="leading" secondItem="Sau-Ax-z7A" secondAttribute="trailing" constant="10" id="n6J-ET-PjL"/>
+                                                <constraint firstAttribute="bottom" secondItem="qpU-vK-NwD" secondAttribute="bottom" id="oEf-uc-PiY"/>
+                                            </constraints>
+                                        </view>
+                                    </subviews>
+                                </stackView>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="ZmW-bX-Dma" firstAttribute="top" secondItem="dhn-Yo-3At" secondAttribute="top" id="8gG-PS-C2a"/>
+                                <constraint firstItem="ZmW-bX-Dma" firstAttribute="leading" secondItem="dhn-Yo-3At" secondAttribute="leading" id="DKN-tw-CwX"/>
+                                <constraint firstAttribute="trailing" secondItem="ZmW-bX-Dma" secondAttribute="trailing" id="MhA-2B-EAQ"/>
+                                <constraint firstAttribute="bottom" secondItem="ZmW-bX-Dma" secondAttribute="bottom" id="qIw-Tw-HWR"/>
+                            </constraints>
+                        </view>
+                        <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Lf-8d-mW6">
+                            <rect key="frame" x="0.0" y="0.0" width="491" height="88"/>
+                            <subviews>
+                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="6Hg-H7-N36">
+                                    <rect key="frame" x="0.0" y="0.0" width="491" height="88"/>
+                                    <subviews>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wbH-Ad-VQF">
+                                            <rect key="frame" x="0.0" y="0.0" width="491" height="44"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="e3r-Jt-afI">
+                                                    <rect key="frame" x="447" y="0.0" width="44" height="44"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" secondItem="e3r-Jt-afI" secondAttribute="height" multiplier="1:1" id="Kl6-3z-fdB"/>
+                                                    </constraints>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                            </subviews>
+                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="44" id="2ql-ew-Cxg"/>
+                                                <constraint firstAttribute="trailing" secondItem="e3r-Jt-afI" secondAttribute="trailing" id="9Tp-z3-qjr"/>
+                                                <constraint firstAttribute="bottom" secondItem="e3r-Jt-afI" secondAttribute="bottom" id="FCz-VH-fDM"/>
+                                                <constraint firstItem="e3r-Jt-afI" firstAttribute="top" secondItem="wbH-Ad-VQF" secondAttribute="top" id="SL3-Mc-fhB"/>
+                                            </constraints>
+                                        </view>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wni-0S-Tge">
+                                            <rect key="frame" x="0.0" y="44" width="491" height="44"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IXb-az-D5L">
+                                                    <rect key="frame" x="20.000000000000004" y="11.999999999999998" width="41.333333333333343" height="20.333333333333329"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="0dO-ui-Xej">
+                                                    <rect key="frame" x="71.333333333333343" y="12" width="369.66666666666663" height="20"/>
+                                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="20" id="fUY-yN-sHU"/>
+                                                    </constraints>
+                                                    <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="31z-1G-YbT">
+                                                        <size key="itemSize" width="128" height="128"/>
+                                                        <size key="headerReferenceSize" width="0.0" height="0.0"/>
+                                                        <size key="footerReferenceSize" width="0.0" height="0.0"/>
+                                                        <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    </collectionViewFlowLayout>
+                                                </collectionView>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dd7-Uq-DM3">
+                                                    <rect key="frame" x="451" y="0.0" width="30" height="44"/>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                            </subviews>
+                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <constraints>
+                                                <constraint firstAttribute="trailing" secondItem="dd7-Uq-DM3" secondAttribute="trailing" constant="10" id="29V-5q-N1y"/>
+                                                <constraint firstItem="IXb-az-D5L" firstAttribute="centerY" secondItem="Wni-0S-Tge" secondAttribute="centerY" id="Hjk-0G-CtO"/>
+                                                <constraint firstItem="dd7-Uq-DM3" firstAttribute="leading" secondItem="0dO-ui-Xej" secondAttribute="trailing" constant="10" id="IxT-Ah-9AR"/>
+                                                <constraint firstItem="IXb-az-D5L" firstAttribute="leading" secondItem="Wni-0S-Tge" secondAttribute="leading" constant="20" id="Po8-3r-kdn"/>
+                                                <constraint firstAttribute="height" constant="44" id="QWd-9S-hPZ"/>
+                                                <constraint firstAttribute="bottom" secondItem="dd7-Uq-DM3" secondAttribute="bottom" id="RYb-rB-m0I"/>
+                                                <constraint firstItem="0dO-ui-Xej" firstAttribute="leading" secondItem="IXb-az-D5L" secondAttribute="trailing" constant="10" id="VU4-x5-AE0"/>
+                                                <constraint firstItem="0dO-ui-Xej" firstAttribute="centerY" secondItem="Wni-0S-Tge" secondAttribute="centerY" id="jZS-wB-E2l"/>
+                                                <constraint firstItem="dd7-Uq-DM3" firstAttribute="top" secondItem="Wni-0S-Tge" secondAttribute="top" id="oMG-uw-w87"/>
+                                            </constraints>
+                                        </view>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Fr8-Zb-coO">
+                                            <rect key="frame" x="0.0" y="88" width="491" height="0.0"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RzD-CQ-O2w">
+                                                    <rect key="frame" x="20.000000000000004" y="-10" width="41.333333333333343" height="20.333333333333332"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4er-hb-wzS">
+                                                    <rect key="frame" x="391" y="0.0" width="80" height="0.0"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="80" id="hJK-pI-Dbk"/>
+                                                    </constraints>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YDn-eS-upl">
+                                                    <rect key="frame" x="311" y="0.0" width="80" height="0.0"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="80" id="3KR-iV-pGh"/>
+                                                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="80" id="hr3-wy-7ci"/>
+                                                    </constraints>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aqe-M7-dkg">
+                                                    <rect key="frame" x="281" y="0.0" width="30" height="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                            </subviews>
+                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <constraints>
+                                                <constraint firstItem="YDn-eS-upl" firstAttribute="leading" secondItem="aqe-M7-dkg" secondAttribute="trailing" id="1Jq-fG-C1k"/>
+                                                <constraint firstAttribute="bottom" secondItem="aqe-M7-dkg" secondAttribute="bottom" id="Cjb-H7-Kzd"/>
+                                                <constraint firstItem="4er-hb-wzS" firstAttribute="leading" secondItem="YDn-eS-upl" secondAttribute="trailing" id="MTZ-l2-Odc"/>
+                                                <constraint firstItem="RzD-CQ-O2w" firstAttribute="leading" secondItem="Fr8-Zb-coO" secondAttribute="leading" constant="20" id="Nao-mz-4H0"/>
+                                                <constraint firstItem="4er-hb-wzS" firstAttribute="top" secondItem="Fr8-Zb-coO" secondAttribute="top" id="ZHh-Pw-7tl"/>
+                                                <constraint firstItem="RzD-CQ-O2w" firstAttribute="centerY" secondItem="Fr8-Zb-coO" secondAttribute="centerY" id="a3k-18-sTY"/>
+                                                <constraint firstAttribute="bottom" secondItem="4er-hb-wzS" secondAttribute="bottom" id="aaK-ct-BuF"/>
+                                                <constraint firstItem="aqe-M7-dkg" firstAttribute="top" secondItem="Fr8-Zb-coO" secondAttribute="top" id="ghQ-op-BmQ"/>
+                                                <constraint firstAttribute="trailing" secondItem="4er-hb-wzS" secondAttribute="trailing" constant="20" id="tTB-fU-hco"/>
+                                                <constraint firstItem="YDn-eS-upl" firstAttribute="top" secondItem="Fr8-Zb-coO" secondAttribute="top" id="vRR-jv-K9U"/>
+                                                <constraint firstAttribute="bottom" secondItem="YDn-eS-upl" secondAttribute="bottom" id="zAi-hi-8dJ"/>
+                                            </constraints>
+                                        </view>
+                                    </subviews>
+                                </stackView>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="6Hg-H7-N36" firstAttribute="leading" secondItem="3Lf-8d-mW6" secondAttribute="leading" id="4aa-35-OMY"/>
+                                <constraint firstItem="6Hg-H7-N36" firstAttribute="top" secondItem="3Lf-8d-mW6" secondAttribute="top" id="Edy-98-Twd"/>
+                                <constraint firstAttribute="trailing" secondItem="6Hg-H7-N36" secondAttribute="trailing" id="JkT-CP-Ne1"/>
+                                <constraint firstAttribute="bottom" secondItem="6Hg-H7-N36" secondAttribute="bottom" id="KSo-nb-Gz1"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                </stackView>
+            </subviews>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+            <constraints>
+                <constraint firstItem="QAl-3w-QIE" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="0f7-V8-HyI"/>
+                <constraint firstAttribute="bottom" secondItem="QAl-3w-QIE" secondAttribute="bottom" id="Wla-hL-Xg2"/>
+                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="QAl-3w-QIE" secondAttribute="trailing" id="tOq-Rk-dH4"/>
+                <constraint firstItem="QAl-3w-QIE" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="yAY-dD-C0w"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="-8.3969465648854964" y="123.94366197183099"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 81 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketListCell.swift

@@ -0,0 +1,81 @@
+//
+//  MarketListCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/9.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MarketListCell: BaseTableViewCell {
+    @IBOutlet weak var nameLab: UILabel!
+    @IBOutlet weak var markBtn: UIButton!
+    @IBOutlet weak var numberLab: UILabel!
+    
+    @IBOutlet weak var priceLab: UILabel!
+    
+    @IBOutlet weak var changeLab: UILabel!
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        
+        self.backgroundColor = .clear
+        
+        self.nameLab.setTextFont(.PFSM, 15)
+        
+        self.markBtn.setTextFont(.PFSR, 12)
+        self.markBtn.contentEdgeInsets = UIEdgeInsets(top: 0, left: 4, bottom: 0, right: 4)
+        self.markBtn .setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 2)
+        
+        self.numberLab.setTextFont(.PFSR, 12)
+        
+        self.priceLab.setTextFont(.PFSR, 14)
+        
+        self.changeLab.setTextFont(.PFSR, 14)
+        
+        self.changeLab.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+    }
+    
+    
+    override func mySwitchColor() {
+        self.backgroundColor = ALLBackGroundColor
+        self.nameLab.textColor = TitleTextColor
+      
+        self.numberLab.textColor = LightTextColor
+        
+        self.priceLab.textColor = GrayTextColor
+        
+        self.changeLab.textColor = WhiteTextColor
+    }
+    
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    func updateCellWith(model:KSymbolModel) -> Void {
+        self.mySwitchColor()
+        self.nameLab.text = model.title
+        self.markBtn.setTitle(model.market, for: .normal)
+        self.numberLab.text = model.symbol
+        if model.market == "HK"{
+            self.markBtn.backgroundColor = _color("#EDF6FF&#EDF6FF")
+            self.markBtn.setTitleColor(_color("#1989FF&#1989FF"), for: .normal)
+        }else{
+            self.markBtn.backgroundColor = _color("#FFF1F1&#FFF1F1")
+            self.markBtn.setTitleColor(_color("#EA4A45&#EA4A45"), for: .normal)
+        }
+        
+        self.updateNewPrice(model: model)
+        
+    }
+    
+    func updateNewPrice(model:KSymbolModel) -> Void {
+        self.priceLab.text = precisionString(with: model.newPrice, precision: model.digits)
+        self.priceLab.textColor = exchangeColorAndImage(increase: conerData(model.increase as Any, .MyFloat).1!).0
+        self.changeLab.text = precisionString(with: model.increase, precision: "2") + "%"
+        self.changeLab.backgroundColor = exchangeColorAndImage(increase: conerData(model.increase as Any, .MyFloat).1!).0
+    }
+    
+}

+ 94 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketListCell.xib

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.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"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="92" id="KGk-i7-Jjw" customClass="MarketListCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="430" height="92"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="430" height="92"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="HTm-fO-hm9">
+                        <rect key="frame" x="20" y="25.333333333333332" width="240" height="41.333333333333343"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BLh-ui-ydO">
+                                <rect key="frame" x="0.0" y="0.0" width="240" height="20.333333333333332"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gnf-VG-7IY">
+                                <rect key="frame" x="0.0" y="25.333333333333329" width="240" height="16"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gJC-GR-xvw">
+                                        <rect key="frame" x="0.0" y="0.0" width="30" height="16"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Nz-bq-hom">
+                                        <rect key="frame" x="35" y="0.0" width="41.333333333333343" height="16"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="gJC-GR-xvw" firstAttribute="leading" secondItem="gnf-VG-7IY" secondAttribute="leading" id="F9K-Wh-Drp"/>
+                                    <constraint firstItem="5Nz-bq-hom" firstAttribute="top" secondItem="gnf-VG-7IY" secondAttribute="top" id="Ka9-r4-u7D"/>
+                                    <constraint firstAttribute="height" constant="16" id="OZf-85-uZd"/>
+                                    <constraint firstItem="5Nz-bq-hom" firstAttribute="leading" secondItem="gJC-GR-xvw" secondAttribute="trailing" constant="5" id="WNO-ej-kHB"/>
+                                    <constraint firstItem="gJC-GR-xvw" firstAttribute="top" secondItem="gnf-VG-7IY" secondAttribute="top" id="ZwQ-Vb-u0L"/>
+                                    <constraint firstAttribute="bottom" secondItem="5Nz-bq-hom" secondAttribute="bottom" id="c5Z-vq-w1l"/>
+                                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="5Nz-bq-hom" secondAttribute="trailing" id="tDn-bn-cVH"/>
+                                    <constraint firstAttribute="bottom" secondItem="gJC-GR-xvw" secondAttribute="bottom" id="yfT-5b-zvH"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EPp-Mg-NgL">
+                        <rect key="frame" x="330" y="31" width="80" height="30"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="80" id="in2-0g-Ox1"/>
+                            <constraint firstAttribute="height" constant="30" id="vMh-UL-0GR"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XkU-xO-HDX">
+                        <rect key="frame" x="278.66666666666669" y="36" width="41.333333333333314" height="20.333333333333329"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="EPp-Mg-NgL" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="X6J-Qs-emX"/>
+                    <constraint firstItem="HTm-fO-hm9" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Y5T-fZ-xVe"/>
+                    <constraint firstItem="HTm-fO-hm9" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="dPm-Cg-3tm"/>
+                    <constraint firstAttribute="trailing" secondItem="EPp-Mg-NgL" secondAttribute="trailing" constant="20" id="ge8-Fc-Aey"/>
+                    <constraint firstItem="EPp-Mg-NgL" firstAttribute="leading" secondItem="XkU-xO-HDX" secondAttribute="trailing" constant="10" id="mL8-Tz-l60"/>
+                    <constraint firstItem="XkU-xO-HDX" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="uTS-d4-TTM"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="changeLab" destination="EPp-Mg-NgL" id="Mr4-BT-n7b"/>
+                <outlet property="markBtn" destination="gJC-GR-xvw" id="4kB-Wh-Uwq"/>
+                <outlet property="nameLab" destination="BLh-ui-ydO" id="347-IA-u7U"/>
+                <outlet property="numberLab" destination="5Nz-bq-hom" id="gZp-v3-MAL"/>
+                <outlet property="priceLab" destination="XkU-xO-HDX" id="ikY-br-R0s"/>
+            </connections>
+            <point key="canvasLocation" x="180" y="39"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 4 - 5
Koala/Koala/Modular/Market/V/MarketListHeaderView.swift → Koala/Koala/Modular/Market/V/MarketView/MarketListHeaderView.swift

@@ -41,7 +41,7 @@ class MarketListHeaderView: BaseView {
     
     lazy var upDownBtn : UIButton = {
         let v = UIButton(type: .custom)
-       
+        v.contentHorizontalAlignment = .right
         v.setTextFont(.PFSR, 14)
         
      
@@ -83,7 +83,7 @@ class MarketListHeaderView: BaseView {
         addSubview(transBtn)
         transBtn.snp.makeConstraints { make in
             make.centerY.equalTo(self)
-            make.left.equalTo(self.snp.left).offset(17)
+            make.left.equalTo(self.snp.left).offset(20)
             make.size.equalTo(CGSize(width: 18, height: 18))
         }
         
@@ -110,15 +110,14 @@ class MarketListHeaderView: BaseView {
         addSubview(upDownBtn)
         upDownBtn.snp.makeConstraints { make in
             make.centerY.equalTo(self)
-            make.right.equalTo(self.snp.right).offset(-18)
-            make.size.equalTo(CGSize(width: 46, height: 12))
+            make.right.equalTo(self.snp.right).offset(-20)
+            make.width.equalTo(80)
         }
         
         addSubview(priceBtn)
         priceBtn.snp.makeConstraints { make in
             make.centerY.equalTo(self)
             make.right.equalTo(self.snp.right).offset(-100)
-            make.size.equalTo(CGSize(width: 46, height: 12))
         }
        
         

+ 87 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketNavView.swift

@@ -0,0 +1,87 @@
+//
+//  MarketNavView.swift
+//  Koala
+//
+//  Created by mac on 2023/9/8.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import Foundation
+import UIKit
+
+class MarketNavView: BaseView
+{
+    
+    lazy var segmentedControl:HMSegmentedControl = {
+        let segmentedControl:HMSegmentedControl = HMSegmentedControl.init(frame: CGRect(x: 10, y:StatusBarHeight, width:SCREEN_WIDTH-98, height: 44))
+    
+        segmentedControl.backgroundColor = .clear
+        segmentedControl.selectionIndicatorHeight = 2
+        segmentedControl.segmentWidthStyle = .dynamic
+        segmentedControl.selectionIndicatorLocation = .down
+        segmentedControl.selectionIndicatorColor = .clear
+        segmentedControl.segmentEdgeInset = UIEdgeInsets.init(top: 0, left: 10, bottom: 0, right: 10)
+        segmentedControl.sectionTitles = [switchLanguage("自选"),switchLanguage("市场"),switchLanguage("个股期权")]
+        return segmentedControl
+    }()
+    
+    lazy var searchBtn : UIButton = {
+        
+        let  v = UIButton(type: .custom)
+        
+        v.setImage(UIImage(named: "Infomation_search"), for: .normal)
+        
+        return v
+    }()
+    
+    lazy var chatBtn : UIButton = {
+        
+        let v = UIButton(type: .custom)
+        v.setImage(UIImage(named: "Infomation_chat"), for: .normal)
+        
+        return v
+    }()
+    
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        self.mySwitchSkin()
+        self.mySwitchLanguage()
+        backgroundColor = ALLBackGroundColor
+        
+        self.addSubview(segmentedControl)
+       
+        self.addSubview(chatBtn)
+        
+      
+        
+        chatBtn.snp.makeConstraints { make in
+            make.right.equalTo(self.snp.right)
+            make.bottom.equalTo(self.snp.bottom)
+            make.size.equalTo(CGSizeMake(44, 44))
+        }
+        
+        self.addSubview(searchBtn)
+        searchBtn.snp.makeConstraints { make in
+            make.right.equalTo(chatBtn.snp.left)
+            make.centerY.equalTo(chatBtn)
+            make.size.equalTo(CGSizeMake(44, 44))
+        }
+        
+        
+    }
+    
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    override func mySwitchSkin() {
+        segmentedControl.titleTextAttributes = [NSAttributedString.Key.foregroundColor : TitleTextColor,NSAttributedString.Key.font:_PFSR(18)]
+        segmentedControl.selectedTitleTextAttributes = [NSAttributedString.Key.foregroundColor : TitleTextColor,NSAttributedString.Key.font:_PFSM(20)]
+    }
+    
+    override func mySwitchLanguage() {
+        self.segmentedControl.sectionTitles = [switchLanguage("自选"),switchLanguage("市场"),switchLanguage("个股期权")]
+    }
+    
+}

+ 99 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketOptionsListCell.swift

@@ -0,0 +1,99 @@
+//
+//  MarketOptionsListCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/11.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MarketOptionsListCell: BaseTableViewCell {
+    @IBOutlet weak var nameLab: UILabel!
+    @IBOutlet weak var markBtn: UIButton!
+    @IBOutlet weak var numberLab: UILabel!
+    
+    @IBOutlet weak var changeLab: UILabel!
+    
+    @IBOutlet weak var meanLab: UILabel!
+    
+    @IBOutlet weak var virtualLab: UILabel!
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        
+        self.nameLab.setTextFont(.PFSM, 15)
+        
+        self.markBtn.setTextFont(.PFSR, 12)
+        self.markBtn.contentEdgeInsets = UIEdgeInsets(top: 0, left: 4, bottom: 0, right: 4)
+        self.markBtn .setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 2)
+        
+        self.numberLab.setTextFont(.PFSR, 12)
+        
+        self.changeLab.setTextFont(.PFSR, 14)
+        
+        self.meanLab.setTextFont(.PFSR, 14)
+        
+        self.virtualLab.setTextFont(.PFSR, 14)
+        
+    }
+    
+    override func mySwitchColor() {
+        self.backgroundColor = ALLBackGroundColor
+        self.nameLab.textColor = TitleTextColor
+      
+        self.numberLab.textColor = LightTextColor
+        
+        self.meanLab.textColor = MidTextColor
+        
+        self.virtualLab.textColor = MidTextColor
+    }
+    
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    func updateCellWith(VM:MarketViewModel,model:OptionsListModel) -> Void {
+        self.mySwitchColor()
+        self.nameLab.text = model.symbolData.title
+        self.markBtn.setTitle(model.symbolData.market, for: .normal)
+        self.numberLab.text = model.code
+        
+        
+        let dict = model.toJSON()
+        let key:String = VM.getOptionsTimer()
+        
+        if let pricelist:String = dict?[key] as? String{
+            
+            let arr = pricelist.replacingOccurrences(of: " ", with: "").components(separatedBy: ",")
+            if arr.count == 2{
+                self.meanLab.text = precisionString(with: String(format: "%@", arr.first!), precision: "2") + "%"
+                self.virtualLab.text = precisionString(with:String(format: "%@",arr.last!) , precision: "2") + "%"
+            }else{
+                self.meanLab.text = "0.00%"
+                self.virtualLab.text = "0.00%"
+            }
+        }
+        
+        if model.symbolData.market == "HK"{
+            self.markBtn.backgroundColor = _color("#EDF6FF&#EDF6FF")
+            self.markBtn.setTitleColor(_color("#1989FF&#1989FF"), for: .normal)
+        }else{
+            self.markBtn.backgroundColor = _color("#FFF1F1&#FFF1F1")
+            self.markBtn.setTitleColor(_color("#EA4A45&#EA4A45"), for: .normal)
+        }
+        
+        self.updateNewPrice(model: model.symbolData)
+        
+    }
+    
+    func updateNewPrice(model:KSymbolModel) -> Void {
+       
+        self.changeLab.text = precisionString(with: model.increase, precision: "2") + "%"
+        self.changeLab.textColor = exchangeColorAndImage(increase: conerData(model.increase as Any, .MyFloat).1!).0
+    }
+    
+}

+ 105 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketOptionsListCell.xib

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.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"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="100" id="KGk-i7-Jjw" customClass="MarketOptionsListCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="600" height="100"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="600" height="100"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="5jM-Io-JcT">
+                        <rect key="frame" x="20" y="30.000000000000004" width="240" height="40.333333333333343"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GeQ-TH-FPJ">
+                                <rect key="frame" x="0.0" y="0.0" width="240" height="20.333333333333332"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9B2-jZ-6Wp">
+                                <rect key="frame" x="0.0" y="24.333333333333336" width="240" height="16"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2eA-Th-nTN">
+                                        <rect key="frame" x="0.0" y="0.0" width="30" height="16"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sIB-7e-Moq">
+                                        <rect key="frame" x="35" y="0.0" width="41.333333333333343" height="16"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="sIB-7e-Moq" secondAttribute="trailing" id="46q-Wd-FLL"/>
+                                    <constraint firstItem="sIB-7e-Moq" firstAttribute="top" secondItem="9B2-jZ-6Wp" secondAttribute="top" id="Dys-7N-n3E"/>
+                                    <constraint firstAttribute="height" constant="16" id="QbR-48-c2s"/>
+                                    <constraint firstItem="2eA-Th-nTN" firstAttribute="leading" secondItem="9B2-jZ-6Wp" secondAttribute="leading" id="YV6-vR-sSe"/>
+                                    <constraint firstItem="2eA-Th-nTN" firstAttribute="top" secondItem="9B2-jZ-6Wp" secondAttribute="top" id="fpY-by-O1S"/>
+                                    <constraint firstAttribute="bottom" secondItem="2eA-Th-nTN" secondAttribute="bottom" id="jXM-em-bPy"/>
+                                    <constraint firstItem="sIB-7e-Moq" firstAttribute="leading" secondItem="2eA-Th-nTN" secondAttribute="trailing" constant="5" id="sCK-5Y-ph7"/>
+                                    <constraint firstAttribute="bottom" secondItem="sIB-7e-Moq" secondAttribute="bottom" id="zeK-jw-llk"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HY3-II-ISV">
+                        <rect key="frame" x="500" y="40" width="80" height="20.333333333333329"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="80" id="J7O-Kg-jy5"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="prB-iA-Tcm">
+                        <rect key="frame" x="420" y="40" width="80" height="20.333333333333329"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="80" id="Lxd-Yi-rHZ"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mbs-vo-DGN">
+                        <rect key="frame" x="378.66666666666669" y="40" width="41.333333333333314" height="20.333333333333329"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="mbs-vo-DGN" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="1tF-ax-L0K"/>
+                    <constraint firstItem="prB-iA-Tcm" firstAttribute="leading" secondItem="mbs-vo-DGN" secondAttribute="trailing" id="6e3-sa-KQk"/>
+                    <constraint firstItem="HY3-II-ISV" firstAttribute="leading" secondItem="prB-iA-Tcm" secondAttribute="trailing" id="DRw-5p-WV5"/>
+                    <constraint firstItem="5jM-Io-JcT" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="PhV-YK-xac"/>
+                    <constraint firstItem="HY3-II-ISV" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="fXh-GX-qcE"/>
+                    <constraint firstAttribute="trailing" secondItem="HY3-II-ISV" secondAttribute="trailing" constant="20" id="k63-h7-fd2"/>
+                    <constraint firstItem="prB-iA-Tcm" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="n9L-hY-eXK"/>
+                    <constraint firstItem="5jM-Io-JcT" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="rYJ-Ei-AMY"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="changeLab" destination="mbs-vo-DGN" id="Tlo-gK-WAL"/>
+                <outlet property="markBtn" destination="2eA-Th-nTN" id="Sn2-Sj-rtC"/>
+                <outlet property="meanLab" destination="prB-iA-Tcm" id="aqV-xm-03b"/>
+                <outlet property="nameLab" destination="GeQ-TH-FPJ" id="1Om-mh-yNT"/>
+                <outlet property="numberLab" destination="sIB-7e-Moq" id="rSp-N7-NWL"/>
+                <outlet property="virtualLab" destination="HY3-II-ISV" id="PjE-si-Y6F"/>
+            </connections>
+            <point key="canvasLocation" x="352.67175572519085" y="27.464788732394368"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 0 - 0
Koala/Koala/Modular/Market/V/MarketPopView.swift → Koala/Koala/Modular/Market/V/MarketView/MarketPopView.swift


+ 291 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketRecommendView.swift

@@ -0,0 +1,291 @@
+//
+//  MarketRecommendView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/9.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MarketRecommendView: BaseView {
+    @IBOutlet weak var topBgView: UIView!
+    @IBOutlet weak var imgView: UIImageView!
+    @IBOutlet weak var hintLab: UILabel!
+    @IBOutlet weak var searchBtn: UIButton!
+    
+    @IBOutlet weak var titleLab: UILabel!
+    @IBOutlet weak var collectionView: UICollectionView!
+    
+    @IBOutlet weak var addBtn: UIButton!
+   
+    var clickAddBtnBlock: ((_ symbols: String) -> ())?
+    
+    var clickSearchBtnBlock: (() -> ())?
+    
+    var symbols:String = ""
+    
+    lazy var listData:[KSymbolModel] = {
+        let arr:[KSymbolModel] = [KSymbolModel]()
+        return arr
+    }()
+    
+    var bgView: UIView!
+    
+    
+    func loadFromNib() -> UIView {
+        return Bundle.main.loadNibNamed("MarketRecommendView", owner: self, options: nil)?.first as! UIView
+    }
+
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        bgView = loadFromNib()
+        addSubview(bgView)
+        bgView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        
+        self.hintLab.setTextFont(.PFSR, 12)
+        self.hintLab.numberOfLines = 0
+        
+        self.searchBtn.setTextFont(.PFSR, 10)
+        
+        self.searchBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 15)
+        
+        self.topBgView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 8)
+        
+        self.titleLab.setTextFont(.PFSM, 18)
+        
+        self.addBtn.setTextFont(.PFSR, 14)
+        self.addBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 8)
+        
+        let layout = UICollectionViewFlowLayout.init()
+        layout.scrollDirection = UICollectionView.ScrollDirection.horizontal
+        layout.minimumInteritemSpacing = 10
+        layout.minimumLineSpacing = 10
+        collectionView.setCollectionViewLayout(layout, animated: true)
+        collectionView.delegate = self
+        collectionView.dataSource = self
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        collectionView.backgroundColor = UIColor.clear
+        collectionView.base_registerCell(cellClass: MarketRecommendCell.self)
+        
+        
+        self.mySwitchLanguage()
+        self.mySwitchSkin()
+       
+        self.addBtn.addTarget(self, action: #selector(clickAddBtnAction), for: .touchUpInside)
+        
+        self.searchBtn.addTarget(self, action: #selector(clickSearchBtnAction), for: .touchUpInside)
+        
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+    }
+    
+    override func mySwitchLanguage() {
+        self.hintLab.text = switchLanguage("添加感兴趣的品种,查看实时行情")
+        self.searchBtn.setTitle(switchLanguage("+添加品种"), for: .normal)
+        
+        self.titleLab.text = switchLanguage("推荐股票")
+        
+        self.addBtn.setTitle(switchLanguage("一键添加自选"), for: .normal)
+        
+    }
+    
+    override func mySwitchSkin() {
+        self.bgView.backgroundColor = ALLBackGroundColor;
+        self.topBgView.backgroundColor = _color("#FFF1F1&#FFF1F1")
+        self.imgView.image = _image("Market_W_Recommend_Hint&Market_W_Recommend_Hint")
+        
+        self.hintLab.textColor = TitleTextColor
+        self.searchBtn.setTitleColor(WhiteTextColor, for: .normal)
+        self.searchBtn.backgroundColor = MainBackGroundColor
+        
+        self.titleLab.textColor = TitleTextColor
+        
+        self.addBtn.backgroundColor = MainBackGroundColor
+        self.addBtn.setTitleColor(WhiteTextColor, for: .normal)
+    }
+    
+    func updateRecommendData(list:[KSymbolModel]) -> Void {
+        self.listData.removeAll()
+        self.listData = list
+        self.collectionView.reloadData()
+    }
+    
+    func updateSocketRecommendData(list:[KSymbolModel]) -> Void {
+        for (i,model) in list.enumerated() {
+            if let cell:MarketRecommendCell = self.collectionView.cellForItem(at: IndexPath(row: i, section: 0)) as? MarketRecommendCell{
+                cell.updateCellChangeWith(model: model)
+            }
+        }
+    }
+    
+    
+    @objc func clickSearchBtnAction(){
+        self.clickSearchBtnBlock?()
+    }
+
+    @objc func clickAddBtnAction(){
+        self.symbols = ""
+        for model in self.listData{
+            if model.isSelect {
+                if self.symbols.length == 0 {
+                    self.symbols = model.symbol
+                }else{
+                    self.symbols = self.symbols + "," + model.symbol
+                }
+               
+            }
+        }
+    
+        if self.symbols.length == 0 {
+            ProgressHUD.showInfo(status: switchLanguage("请求勾选股票"))
+            return
+        }
+        
+        self.clickAddBtnBlock?(self.symbols)
+    }
+
+}
+
+extension MarketRecommendView : UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource{
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return self.listData.count
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = collectionView.base_dequeueReusableCell(indexPath: indexPath) as MarketRecommendCell
+         let model:KSymbolModel = self.listData[indexPath.row]
+        cell.updateCellDataWith(model: model)
+        return cell
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width: (SCREEN_WIDTH-50)/2, height: (collectionView.frame.height-30)/4)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        let model = self.listData[indexPath.row];
+        model.isSelect = !model.isSelect
+        self.collectionView.reloadData()
+        
+    }
+
+}
+
+
+class MarketRecommendCell: UICollectionViewCell {
+   
+    lazy var titleLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSM, 14)
+        lab.textAlignment = .left
+        return lab
+    }()
+    
+    lazy var imgView:UIImageView = {
+        let view:UIImageView = UIImageView.init()
+        return view
+    }()
+    
+    lazy var numberLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSR, 12)
+        lab.textAlignment = .left
+        return lab
+    }()
+    
+    lazy var changeLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSM, 14)
+        lab.textAlignment = .right
+        return lab
+    }()
+    
+    lazy var bgView:UIView = {
+        let view:UIView = UIView.init()
+        view.addSubview(self.titleLab)
+        view.addSubview(self.imgView)
+        view.addSubview(self.numberLab)
+        view.addSubview(self.changeLab)
+        
+        self.titleLab.snp.makeConstraints { make in
+            make.left.top.equalTo(10)
+        }
+        
+        self.imgView.snp.makeConstraints { make in
+            make.top.equalTo(10)
+            make.right.equalTo(-10)
+            make.size.equalTo(CGSize.init(width: 15, height: 15))
+        }
+        
+        self.numberLab.snp.makeConstraints { make in
+            make.left.equalTo(10)
+            make.bottom.equalTo(-10)
+        }
+        
+        self.changeLab.snp.makeConstraints { make in
+            make.right.equalTo(-10)
+            make.bottom.equalTo(-10)
+        }
+        
+        
+        return view
+    }()
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        contentView.addSubview(bgView)
+        self.backgroundColor = .clear
+        self.bgView.setViewLayerBorderColor(myColor: ViewBorderColor, borderWidth: 1, maskBounds: 4)
+        self.bgView.layer.masksToBounds = true
+    }
+    
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        self.bgView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        
+    }
+    
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    func mySwitchSkin() {
+        self.bgView.setViewLayerBorderColor(myColor: ViewBorderColor, borderWidth: 1, maskBounds: 4)
+        self.titleLab.textColor = TitleTextColor
+        self.numberLab.textColor = LightTextColor
+    }
+
+    func updateCellDataWith(model:KSymbolModel) -> Void {
+        
+        self.mySwitchSkin()
+        
+        self.titleLab.text = model.title
+        
+        self.numberLab.text = model.symbol
+        
+        self.updateCellChangeWith(model: model)
+        if model.isSelect{
+            self.imgView.image = _image("Market_W_Select&Market_W_Select")
+        }else{
+            self.imgView.image = _image("Market_W_unSelect&Market_W_unSelect")
+        }
+    }
+    
+    func updateCellChangeWith(model:KSymbolModel) -> Void {
+        self.changeLab.text = precisionString(with: model.increase, precision: "2") + "%"
+        self.changeLab.textColor = exchangeColorAndImage(increase: conerData(model.increase as Any, .MyFloat).1!).0
+    }
+  
+
+}
+
+

+ 147 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketRecommendView.xib

@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <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" customClass="MarketRecommendView" customModule="Koala" customModuleProvider="target">
+            <connections>
+                <outlet property="addBtn" destination="V3j-Gx-Jn2" id="OaW-Ie-UEC"/>
+                <outlet property="collectionView" destination="RNw-Jq-8nF" id="vxj-kg-gbH"/>
+                <outlet property="hintLab" destination="UlZ-y3-5Xe" id="G6E-u5-zr9"/>
+                <outlet property="imgView" destination="qB7-k3-jVB" id="OuW-uL-zBo"/>
+                <outlet property="searchBtn" destination="SKa-Nz-gVV" id="t4p-EW-ElR"/>
+                <outlet property="titleLab" destination="Ql7-hF-6wq" id="pCK-Y8-SGN"/>
+                <outlet property="topBgView" destination="I3U-iK-0kg" id="cTH-VG-94u"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="383" height="507"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="ZVg-nM-9Vk">
+                    <rect key="frame" x="20" y="10" width="343" height="470"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I3U-iK-0kg">
+                            <rect key="frame" x="0.0" y="0.0" width="343" height="100"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="qB7-k3-jVB">
+                                    <rect key="frame" x="9.9999999999999929" y="10" width="117.33333333333331" height="80"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" secondItem="qB7-k3-jVB" secondAttribute="height" multiplier="346:236" id="0mU-0r-hRr"/>
+                                    </constraints>
+                                </imageView>
+                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="fKJ-KJ-foj">
+                                    <rect key="frame" x="137.33333333333337" y="20.000000000000004" width="195.66666666666663" height="60.333333333333343"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UlZ-y3-5Xe">
+                                            <rect key="frame" x="0.0" y="0.0" width="195.66666666666666" height="20.333333333333332"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                            <nil key="textColor"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8YI-NY-Rf3">
+                                            <rect key="frame" x="0.0" y="30.333333333333336" width="195.66666666666666" height="30"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SKa-Nz-gVV">
+                                                    <rect key="frame" x="0.0" y="0.0" width="80" height="30"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="30" id="4rn-JI-CuQ"/>
+                                                        <constraint firstAttribute="width" constant="80" id="Hal-zn-gcF"/>
+                                                    </constraints>
+                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                </button>
+                                            </subviews>
+                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <constraints>
+                                                <constraint firstItem="SKa-Nz-gVV" firstAttribute="top" secondItem="8YI-NY-Rf3" secondAttribute="top" id="Txn-bW-673"/>
+                                                <constraint firstItem="SKa-Nz-gVV" firstAttribute="leading" secondItem="8YI-NY-Rf3" secondAttribute="leading" id="ioY-zW-3HW"/>
+                                                <constraint firstAttribute="bottom" secondItem="SKa-Nz-gVV" secondAttribute="bottom" id="j1h-vd-Zu5"/>
+                                            </constraints>
+                                        </view>
+                                    </subviews>
+                                </stackView>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="qB7-k3-jVB" firstAttribute="leading" secondItem="I3U-iK-0kg" secondAttribute="leading" constant="10" id="GGV-un-NgW"/>
+                                <constraint firstAttribute="bottom" secondItem="qB7-k3-jVB" secondAttribute="bottom" constant="10" id="dNl-jz-Zm9"/>
+                                <constraint firstAttribute="height" constant="100" id="eVe-Zs-c94"/>
+                                <constraint firstItem="fKJ-KJ-foj" firstAttribute="centerY" secondItem="I3U-iK-0kg" secondAttribute="centerY" id="qHF-HE-mvr"/>
+                                <constraint firstAttribute="trailing" secondItem="fKJ-KJ-foj" secondAttribute="trailing" constant="10" id="qbw-hM-Zab"/>
+                                <constraint firstItem="fKJ-KJ-foj" firstAttribute="leading" secondItem="qB7-k3-jVB" secondAttribute="trailing" constant="10" id="viV-kA-7mT"/>
+                                <constraint firstItem="qB7-k3-jVB" firstAttribute="top" secondItem="I3U-iK-0kg" secondAttribute="top" constant="10" id="wC2-Vz-yPQ"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Toq-Bf-2BY">
+                            <rect key="frame" x="0.0" y="100" width="343" height="50"/>
+                            <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ql7-hF-6wq">
+                                    <rect key="frame" x="151" y="14.999999999999998" width="41.333333333333343" height="20.333333333333329"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <nil key="textColor"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="50" id="JRX-aG-Kea"/>
+                                <constraint firstItem="Ql7-hF-6wq" firstAttribute="centerX" secondItem="Toq-Bf-2BY" secondAttribute="centerX" id="rEM-tN-qDN"/>
+                                <constraint firstItem="Ql7-hF-6wq" firstAttribute="centerY" secondItem="Toq-Bf-2BY" secondAttribute="centerY" id="rut-S0-Agm"/>
+                            </constraints>
+                        </view>
+                        <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="RNw-Jq-8nF">
+                            <rect key="frame" x="0.0" y="150" width="343" height="270"/>
+                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="270" id="8Pr-Un-LPv"/>
+                            </constraints>
+                            <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="yPa-9z-r5c">
+                                <size key="itemSize" width="128" height="128"/>
+                                <size key="headerReferenceSize" width="0.0" height="0.0"/>
+                                <size key="footerReferenceSize" width="0.0" height="0.0"/>
+                                <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                            </collectionViewFlowLayout>
+                        </collectionView>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c3j-Bk-LkI">
+                            <rect key="frame" x="0.0" y="420" width="343" height="50"/>
+                            <subviews>
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V3j-Gx-Jn2">
+                                    <rect key="frame" x="0.0" y="10" width="343" height="40"/>
+                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    <state key="normal" title="Button"/>
+                                </button>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="V3j-Gx-Jn2" secondAttribute="trailing" id="5pL-bk-Odw"/>
+                                <constraint firstItem="V3j-Gx-Jn2" firstAttribute="top" secondItem="c3j-Bk-LkI" secondAttribute="top" constant="10" id="FjC-Hu-Wzo"/>
+                                <constraint firstAttribute="height" constant="50" id="J6i-Sd-QbL"/>
+                                <constraint firstAttribute="bottom" secondItem="V3j-Gx-Jn2" secondAttribute="bottom" id="k0f-0d-tvg"/>
+                                <constraint firstItem="V3j-Gx-Jn2" firstAttribute="leading" secondItem="c3j-Bk-LkI" secondAttribute="leading" id="lnf-st-JaU"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                </stackView>
+            </subviews>
+            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+            <constraints>
+                <constraint firstItem="ZVg-nM-9Vk" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="XG1-pa-h6g"/>
+                <constraint firstAttribute="trailing" secondItem="ZVg-nM-9Vk" secondAttribute="trailing" constant="20" id="od1-Oz-hLD"/>
+                <constraint firstItem="ZVg-nM-9Vk" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="p6A-ry-MbJ"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="31.297709923664122" y="139.08450704225353"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 447 - 0
Koala/Koala/Modular/Market/V/MarketView/MarketView.swift

@@ -0,0 +1,447 @@
+//
+//  MarketView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/1/14.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+import MJRefresh
+class MarketView: BaseView {
+    var VM: MarketViewModel?
+    
+    lazy var navView : MarketNavView = {
+        
+        let v = MarketNavView(frame: .zero)
+        v.segmentedControl.selectedSegmentIndex = UInt(self.VM!.topIndex)
+        v.segmentedControl.indexChangeBlock = {[weak self](index) in
+            if index == 0 && !OperationalUserInfoData.getLogin(){
+                v.segmentedControl.selectedSegmentIndex = UInt(self!.VM!.topIndex)
+            }else{
+                if index == 0 {
+                    self?.recommendView.isHidden = self!.VM!.collectionSymbolList.count > 0
+                    self?.VM?.index = -2
+                    
+                }
+                else if index == 1{
+                    self?.VM?.index = 0
+                }
+                else{
+                    self?.VM?.optionsIndex = 0
+                }
+                
+                if index != 0 {
+                    self?.recommendView.isHidden = true
+                }
+                self!.VM!.screenSymbolListAction()
+                self?.VM?.topIndex = Int(index)
+                self?.headerView.updateLayer(index: Int(index));
+                if (index == 0){
+                    self?.headerView.frame = CGRect(x: 0, y:TopHeight, width: SCREEN_WIDTH, height: 100-44)
+                }else if index == 1{
+                    self?.headerView.frame = CGRect(x: 0, y:TopHeight, width: SCREEN_WIDTH, height: 100)
+                }else{
+                    self?.headerView.frame = CGRect(x: 0, y:TopHeight, width: SCREEN_WIDTH, height: 144)
+                }
+            }
+        }
+        return v
+    }()
+    
+    
+    lazy var searchView:BaseSearchView = {
+        let view:BaseSearchView = BaseSearchView()
+        view.textFieldBlock = {[weak self] text in
+            self?.VM?.screenText = text
+        }
+        return view
+    }()
+    
+    lazy var searchBgView:UIView = {
+        let view:UIView = UIView()
+        view.addSubview(self.searchView)
+        self.searchView.snp.makeConstraints { make in
+            make.top.equalTo(5)
+            make.left.equalTo(15)
+            make.right.equalTo(-15)
+            make.bottom.equalTo(-5)
+        }
+        return view
+    }()
+    
+    lazy var headerView:MarketHeaderView = {
+        let view = MarketHeaderView.init(frame: CGRect(x: 0, y:TopHeight, width: SCREEN_WIDTH, height: 100))
+        
+        view.segmentedControl.indexChangeBlock = {[weak self](index) in
+            self?.VM?.index = Int(index)
+            
+        }
+        
+        view.segmented2Control.indexChangeBlock = {[weak self](index) in
+            self?.VM?.optionsIndex = Int(index)
+        }
+        
+        view.clickTimerBlock = { index in
+            self.VM?.optionsTimerIndex = index
+            self.reloadTable()
+        }
+        
+        view.clickLeftBtnBlock = {
+            self.VM?.increaseSort = 0
+            if self.VM?.symbolSort == 0{
+                self.VM?.symbolSort = 1
+            }
+            else if self.VM?.symbolSort == 1{
+                self.VM?.symbolSort = 2
+            }
+            else if self.VM?.symbolSort == 2{
+                self.VM?.symbolSort = 0
+            }
+        }
+        
+        view.clickRightBtnBlock = {
+            self.VM?.symbolSort = 0
+            if self.VM?.increaseSort == 0{
+                self.VM?.increaseSort = 1
+            }
+            else if self.VM?.increaseSort == 1{
+                self.VM?.increaseSort = 2
+            }
+            else if self.VM?.increaseSort == 2{
+                self.VM?.increaseSort = 0
+            }
+        }
+        
+        return view
+    }()
+    
+    
+    lazy var recommendView:MarketRecommendView = {
+        
+        let view = MarketRecommendView.init(frame: CGRect(x: 0, y:TopHeight, width: SCREEN_WIDTH, height: SCREEN_HEIGHT))
+        view.isHidden = true
+        view.clickSearchBtnBlock = {
+            
+        }
+        
+        view.clickAddBtnBlock = { [weak self] symbols in
+            self?.VM?.netInsertProductUser(symbol: symbols)
+        }
+        return view
+    }()
+    
+    lazy var tableView: BaseTableView = { [weak self] in
+        let tableView = BaseTableView.init(frame: .zero, style: .plain)
+        tableView.separatorStyle = .singleLine
+        tableView.delegate = self
+        tableView.dataSource = self
+        tableView.backgroundColor = .clear
+        tableView.tableHeaderView = UIView()
+        tableView.tableFooterView = UIView()
+        tableView.showsHorizontalScrollIndicator = false
+        tableView.showsVerticalScrollIndicator = false
+        
+        tableView.register(UINib.init(nibName: "MarketOptionsListCell", bundle: nil), forCellReuseIdentifier: "MarketOptionsListCell")
+        
+        tableView.register(UINib.init(nibName: "MarketListCell", bundle: nil), forCellReuseIdentifier: "MarketListCell")
+        
+        if #available(iOS 11, *){
+            tableView.contentInsetAdjustmentBehavior = .never
+        }
+        
+        tableView.ly_emptyView = self!.showEmptyView()
+        
+        tableView.mj_header = MJRefreshHeader(refreshingBlock: { [weak self] in
+            if self?.VM?.topIndex == 0 {
+                self?.VM?.netUserList()
+            }else if self?.VM?.topIndex == 1{
+                self?.VM?.netSymbolList(isUp: false)
+            }
+            else {
+                self?.VM?.netOptionProductListGroup(isUp: false)
+            }
+           
+        })
+        tableView.mj_footer = MJRefreshAutoFooter.init(refreshingBlock: { [weak self] in
+            if self?.VM?.topIndex == 0 {
+                self?.VM?.netUserList()
+            }else if self?.VM?.topIndex == 1{
+                self?.VM?.netSymbolList(isUp: true)
+            }
+            else {
+                self?.VM?.netOptionProductListGroup(isUp: true)
+            }
+            
+        })
+        
+        return tableView
+    }()
+    
+    lazy var menuBtn : UIButton = {
+        let v = UIButton(type: .custom)
+        v.setImage(UIImage(named: "market_menu"), for: .normal)
+        
+        return v
+    }()
+
+    
+    override func subView() {
+        self.backgroundColor = .white //ALLBackGroundColor
+        
+        self.headerView.segmented2Control.sectionTitles = self.VM!.getOptionsMarketTitleList()
+        self.headerView.updateOptionsTimer(list: self.VM!.getOptionsTimerList())
+        self.addSubview(navView)
+        self.addSubview(headerView)
+        self.addSubview(tableView)
+        
+        self.addSubview(recommendView)
+        
+        mySwitchLanguage()
+        mySwitchSkin()
+    }
+    
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        
+        self.navView.snp.makeConstraints { make in
+            make.top.left.right.equalTo(self)
+            make.height.equalTo(TopHeight)
+        }
+        
+        
+        tableView.snp.makeConstraints { make in
+            make.bottom.right.left.equalToSuperview()
+            make.top.equalTo(self.headerView.snp.bottom)
+        }
+    }
+    
+    override func setViewModel(viewmodel: AnyObject) {
+        guard viewmodel is MarketViewModel else {
+            return
+        }
+        self.VM = viewmodel as? MarketViewModel
+        super.setViewModel(viewmodel: viewmodel)
+       
+    }
+    
+    override func mySwitchLanguage() {
+      
+        self.headerView.mySwitchLanguage()
+        self.navView.mySwitchLanguage()
+        
+    }
+    
+    override func mySwitchSkin() {
+        self.tableView.backgroundColor = .clear
+        self.backgroundColor = ALLBackGroundColor
+        
+        self.searchBgView.backgroundColor = ALLBackGroundColor
+        self.searchView.textField.backgroundColor = InputBackGroundColor
+        self.searchView.mySwitchSkin()
+        
+        self.navView.mySwitchSkin()
+        self.headerView.mySwitchSkin()
+        
+        self.tableView.separatorColor = ViewBorderColor
+        self.tableView.separatorInset = UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 20)
+    
+        
+      
+    }
+    
+
+    override func blindModel() {
+        VM?.groupListAction.values.observeValues({[weak self] (success) in
+            guard let self = self else { return }
+            if success {
+                var nameList = [String]()
+                for model in self.VM!.productGroupList {
+                    if conerData(model.id, .MyInt).0! < 1{
+                        nameList.append(model.title)
+                    }else{
+                        nameList.append(model.title)
+                    }
+                }
+                self.headerView.segmentedControl.sectionTitles = nameList
+            }
+        })
+        
+        VM?.userListAction.values.observeValues({[weak self] (success) in
+            guard let self = self else{return}
+            DispatchQueue.main.async {
+                self.tableView.mj_header!.endRefreshing()
+                self.tableView.mj_footer!.endRefreshing()
+                if self.VM?.topIndex == 0 {
+                    if self.VM!.collectionSymbolList.count > 0{
+                        self.recommendView.isHidden = true
+                    }else{
+                        self.recommendView.isHidden = false;
+                    }
+                }
+                
+                self.reloadTable()
+            }
+            
+        })
+        
+        VM?.recommendSymbolListAction.values.observeValues({[weak self] (success) in
+            guard let self = self else{return}
+            self.recommendView.updateRecommendData(list: self.VM!.recommendList)
+            
+        })
+        
+       
+        VM?.symbolListAction.values.observeValues({[weak self] (success) in
+            guard let self = self else{return}
+            DispatchQueue.main.async {
+                self.tableView.reloadData()
+                self.tableView.mj_header!.endRefreshing()
+                self.tableView.mj_footer!.endRefreshing()
+                if success {
+                    self.tableView.mj_footer!.endRefreshingWithNoMoreData()
+                }
+            }
+        })
+        
+        VM?.optionProductListGroupAction.values.observeValues({[weak self] (success) in
+            guard let self = self else{return}
+            DispatchQueue.main.async {
+                self.tableView.reloadData()
+                self.tableView.mj_header!.endRefreshing()
+                self.tableView.mj_footer!.endRefreshing()
+                if success {
+                    self.tableView.mj_footer!.endRefreshingWithNoMoreData()
+                }
+            }
+        })
+        
+        VM?.insertProductUserAction.values.observeValues({[weak self] (success) in
+            guard let self = self else { return }
+            if success {
+                self.VM?.netUserList()
+            }
+        })
+        
+        VM?.deleteProductUserAction.values.observeValues({[weak self] (success) in
+            guard let self = self else { return }
+            if success {
+                self.reloadTable()
+            }
+        })
+        
+        VM?.signalScreen.observeValues({ [weak self] (success) in
+            guard let self = self else { return }
+            if success {
+                self.reloadTable()
+            }
+        })
+        
+        VM?.signalSymbol.observeValues({ [weak self] (isSocket) in
+            guard let self = self else { return }
+            if isSocket {
+                self.updateSocketCellData()
+            }
+        })
+        
+        
+    }
+    
+    func updateSocketCellData() -> Void {
+        for (i,model) in self.VM!.screenSymbolList.enumerated() {
+            if let cell:MarketListCell = self.tableView.cellForRow(at: IndexPath(row: i, section: 0)) as? MarketListCell{
+                cell.updateNewPrice(model: model)
+            }
+        }
+        
+        self.recommendView.updateSocketRecommendData(list: self.VM!.recommendList)
+        
+        
+    }
+    
+    func reloadTable() {
+        DispatchQueue.main.async {
+//            self.tableView.mj_header!.endRefreshing()
+            self.tableView.reloadData()
+        }
+    }
+    
+    
+    
+}
+
+//代理
+extension MarketView:UITableViewDelegate,UITableViewDataSource{
+   
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        if (self.VM?.topIndex == 2){
+            return self.VM?.screenOptionList.count ?? 0
+        }else{
+            return self.VM?.screenSymbolList.count ?? 0
+        }
+       
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        if (self.VM?.topIndex == 2){
+            let cell:MarketOptionsListCell = tableView.dequeueReusableCell(withIdentifier: "MarketOptionsListCell") as! MarketOptionsListCell
+          
+            guard (self.VM?.screenOptionList.count)! > indexPath.row else {
+                return cell
+            }
+          
+            let model:OptionsListModel = (self.VM?.screenOptionList[indexPath.row])!;
+            cell.updateCellWith(VM: self.VM!, model: model)
+            return cell
+        }else{
+            let cell:MarketListCell = tableView.dequeueReusableCell(withIdentifier: "MarketListCell") as! MarketListCell
+          
+            guard (self.VM?.screenSymbolList.count)! > indexPath.row else {
+                return cell
+            }
+          
+            let model:KSymbolModel = (self.VM?.screenSymbolList[indexPath.row])!;
+            cell.updateCellWith(model: model)
+           
+            return cell
+        }
+       
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return 60
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0
+    }
+    
+    
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        let model = self.VM?.screenSymbolList[indexPath.row]
+
+        let vc = MarketDetailViewController()
+        vc.symbolModel = model!
+        currentVc()?.navigationController?.pushViewController(vc, animated: true)
+        
+        
+    }
+    
+}
+
+
+
+

+ 269 - 0
Koala/Koala/Modular/Market/VC/MarketDetailViewController.swift

@@ -0,0 +1,269 @@
+//
+//  MarketDetailViewController.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MarketDetailViewController: BaseViewController {
+    
+    var symbolModel:KSymbolModel = KSymbolModel()
+    
+    var auoteViewModel:MDAuoteViewModel = MDAuoteViewModel()
+    var financeViewModel:MDFinanceViewModel = MDFinanceViewModel()
+    var profileViewModel:MDProfileViewModel = MDProfileViewModel()
+    var newsViewModel:MDNewsViewModel = MDNewsViewModel()
+    var announcementViewModel:MDAnnouncementViewModel = MDAnnouncementViewModel()
+    var optionsViewModel:MDOptionsViewModel = MDOptionsViewModel()
+    
+    
+    lazy var auoteView: MDAuoteView = {
+        let view = MDAuoteView.init(type: .ViewModel(ViewModel: self.auoteViewModel))
+        return view
+    }()
+    
+    lazy var financeView:MDFinanceView = {
+        let view = MDFinanceView.init(type: .ViewModel(ViewModel: self.financeViewModel))
+        return view
+    }()
+    
+    lazy var profileView: MDProfileView = {
+        let view = MDProfileView.init(type: .ViewModel(ViewModel: self.profileViewModel))
+        return view
+    }()
+    
+    lazy var newsView: MDNewsView = {
+        let view = MDNewsView.init(type: .ViewModel(ViewModel: self.newsViewModel))
+        return view
+    }()
+    
+    lazy var announcementView: MDAnnouncementView = {
+        let view = MDAnnouncementView.init(type: .ViewModel(ViewModel: self.announcementViewModel))
+        return view
+    }()
+    
+    lazy var optionsView: MDOptionsView = {
+        let view = MDOptionsView.init(type: .ViewModel(ViewModel: self.optionsViewModel))
+        return view
+    }()
+    
+    lazy var scrollView: UIScrollView = {
+        let scrollView = UIScrollView()
+        scrollView.contentSize = CGSize(width: SCREEN_WIDTH * 6, height: SCREEN_HEIGHT-44)
+        scrollView.isPagingEnabled = true
+        scrollView.delegate = self
+        scrollView.showsVerticalScrollIndicator = false
+        scrollView.showsHorizontalScrollIndicator = false
+        scrollView.isScrollEnabled = false
+        scrollView.addSubview(auoteView)
+        scrollView.addSubview(financeView)
+        scrollView.addSubview(profileView)
+        scrollView.addSubview(newsView)
+        scrollView.addSubview(announcementView)
+        scrollView.addSubview(optionsView)
+        
+        
+        auoteView.snp.makeConstraints { make in
+            make.left.top.equalToSuperview()
+            make.height.equalTo(SCREEN_HEIGHT-TopHeight-44)
+            make.width.equalTo(SCREEN_WIDTH)
+        }
+        
+        financeView.snp.makeConstraints { make in
+            make.left.equalTo(auoteView.snp.right)
+            make.top.equalToSuperview()
+            make.height.equalTo(SCREEN_HEIGHT-TopHeight-44)
+            make.width.equalTo(SCREEN_WIDTH)
+        }
+        
+        profileView.snp.makeConstraints { make in
+            make.left.equalTo(financeView.snp.right)
+            make.top.equalToSuperview()
+            make.height.equalTo(SCREEN_HEIGHT-TopHeight-44)
+            make.width.equalTo(SCREEN_WIDTH)
+        }
+        
+        newsView.snp.makeConstraints { make in
+            make.left.equalTo(profileView.snp.right)
+            make.top.equalToSuperview()
+            make.height.equalTo(SCREEN_HEIGHT-TopHeight-44)
+            make.width.equalTo(SCREEN_WIDTH)
+        }
+        
+        announcementView.snp.makeConstraints { make in
+            make.left.equalTo(newsView.snp.right)
+            make.right.top.equalToSuperview()
+            make.height.equalTo(SCREEN_HEIGHT-TopHeight-44)
+            make.width.equalTo(SCREEN_WIDTH)
+        }
+        
+        optionsView.snp.makeConstraints { make in
+            make.left.equalTo(announcementView.snp.right)
+            make.right.top.equalToSuperview()
+            make.height.equalTo(SCREEN_HEIGHT-TopHeight-44)
+            make.width.equalTo(SCREEN_WIDTH)
+        }
+        
+        return scrollView
+    }()
+    
+    lazy var segmentedControl:HMSegmentedControl = {
+        let segmentedControl:HMSegmentedControl = HMSegmentedControl.init(frame: CGRect(x:10, y: TopHeight+4, width: SCREEN_WIDTH-54, height:36))
+        segmentedControl.selectedSegmentIndex = 0
+        segmentedControl.backgroundColor = .clear
+        segmentedControl.titleTextAttributes = [NSAttributedString.Key.foregroundColor : MidTextColor,NSAttributedString.Key.font:_PFSR(16)]
+        segmentedControl.selectedTitleTextAttributes = [NSAttributedString.Key.foregroundColor : MainBackGroundColor,NSAttributedString.Key.font:_PFSM(18)]
+        segmentedControl.selectionIndicatorColor = MainBackGroundColor
+        segmentedControl.selectionIndicatorHeight = 2
+        segmentedControl.segmentWidthStyle = .dynamic
+        segmentedControl.selectionStyle = .textWidthStripe
+        segmentedControl.selectionIndicatorLocation = .down
+        segmentedControl.segmentEdgeInset = UIEdgeInsets.init(top: 0, left: 10, bottom: 0, right: 10)
+        segmentedControl.indexChangeBlock = {[weak self](index) in
+            guard let self = self else{return}
+            self.scrollView.setContentOffset(CGPoint(x:SCREEN_WIDTH*CGFloat(index), y:0), animated: true)
+            self.reloadTable(index: Int(index))
+            
+        }
+        segmentedControl.sectionTitles = [switchLanguage("报价"),switchLanguage("财务"),switchLanguage("简况"),switchLanguage("新闻"),switchLanguage("公告"),switchLanguage("个股期股")]
+        return segmentedControl
+    }()
+    
+    lazy var menuBtn:UIButton = {
+        let btn:UIButton = UIButton.init(type: .custom)
+        btn.frame = CGRect(x: SCREEN_WIDTH-44, y: TopHeight, width: 44, height: 44)
+        btn.setImage(_image("market_menu&market_menu"), for: .normal)
+        return btn
+    }()
+    
+    
+    lazy var navView:MarketDetailNavView = {
+        let view:MarketDetailNavView = MarketDetailNavView.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: TopHeight))
+        
+        view.shareBlock = {
+            
+        }
+        view.collectionBlock = {[weak self] in
+            if self!.symbolModel.isCollection {
+                self?.netDeleteProductUser()
+            }else{
+                self?.netInsertProductUser()
+            }
+            
+        }
+        return view
+        
+    }()
+    
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        self.myNavigationBar.isHidden = true
+        OperationalSymbolSocketManager.shared().checkSymbolLinkStatus()
+       
+    }
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+
+        self.view.addSubview(navView)
+        self.view.addSubview(segmentedControl)
+        self.view.addSubview(menuBtn)
+        self.view.addSubview(scrollView)
+        
+        self.navView.updateDataWith(model: self.symbolModel)
+        
+        self.auoteViewModel.symbolModel = self.symbolModel
+        self.reloadTable(index: 0)
+        
+        // Do any additional setup after loading the view.
+    }
+    
+    override func updateViewConstraints() {
+        super.updateViewConstraints()
+        self.scrollView.snp.makeConstraints { make in
+            make.left.bottom.right.equalToSuperview()
+            make.top.equalTo(TopHeight+44)
+        }
+    }
+    
+    
+    override func blindModel() {
+        
+        
+    }
+    
+    func reloadTable(index:Int) -> Void {
+        if index == 0 {
+            self.auoteView.VM?.netGetPriceList()
+            self.auoteView.reloadTable()
+        }
+        else if index == 1 {
+            
+        }
+        else if index == 2 {
+           
+        }
+        else if index == 3{
+            
+        }
+    }
+    
+
+   
+
+}
+
+extension MarketDetailViewController{
+    func netInsertProductUser() -> Void {
+        ProgressHUD.showLoading()
+        let parame:[String:Any] = ["symbol":self.symbolModel.symbol]
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForInsertProductUser ,parameters: parame, success: { (code, result) in
+            ProgressHUD.showSuccess(status: switchLanguage("收藏成功"))
+            self.symbolModel.isCollection = true
+            self.navView.updateCollection(isCollection: true)
+        }) { (code, result) in
+            ProgressHUD.showError(status: result as! String)
+        }
+    }
+    
+    func netDeleteProductUser() -> Void {
+        let parame:[String:Any] = ["symbol":self.symbolModel.symbol]
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForDeleteProductUser,parameters: parame, success: { (code, result) in
+            ProgressHUD.showSuccess(status: switchLanguage("取消成功"))
+            self.symbolModel.isCollection = false
+            self.navView.updateCollection(isCollection: false)
+        }) { (code, result) in
+            ProgressHUD.showError(status: result as! String)
+          
+        }
+    }
+    
+    
+    
+}
+
+extension MarketDetailViewController:UIScrollViewDelegate {
+    
+    func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
+        let pageWidth = scrollView.frame.size.width
+        let page = scrollView.contentOffset.x / pageWidth
+        self.segmentedControl.setSelectedSegmentIndex(UInt(page), animated: true)
+        self.reloadTable(index: Int(page))
+        if page == 0 {
+           
+        }else if page == 1{
+          
+        }
+        else if page == 2{
+           
+        }
+        else if page == 3 {
+           
+        }
+    }
+    
+}
+

+ 13 - 6
Koala/Koala/Modular/Market/VC/MarketViewController.swift

@@ -26,17 +26,25 @@ class MarketViewController: BaseViewController {
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
         self.myNavigationBar.isHidden = true
-        if self.marketView.segmentedControl.selectedSegmentIndex == 0 && !OperationalUserInfoData.getLogin(){
-            self.marketView.segmentedControl.selectedSegmentIndex = 1
-            self.viewModel.index = 1
+        
+        if self.marketView.navView.segmentedControl.selectedSegmentIndex == 0 && !OperationalUserInfoData.getLogin(){
+            self.marketView.navView.segmentedControl.selectedSegmentIndex = 1
+            self.marketView.headerView.segmentedControl.selectedSegmentIndex = 0
+            self.viewModel.index = 0
         }
         
         if MarketIndex >= 0 {
-            self.marketView.segmentedControl.selectedSegmentIndex = UInt(MarketIndex)
+            self.marketView.navView.segmentedControl.selectedSegmentIndex = UInt(MarketIndex)
             self.viewModel.index = MarketIndex
             MarketIndex = -1
         }
         
+        self.viewModel.netRecommendSymbolList()
+        
+        if OperationalUserInfoData.getLogin(){
+            self.viewModel.netUserList()
+        }
+        
         self.viewModel.netUserList()
         OperationalSymbolSocketManager.shared().checkSymbolLinkStatus()
         OperationalNetworkData.gettExchangeRateComplete { rateModel in
@@ -47,9 +55,8 @@ class MarketViewController: BaseViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
         self.myNavigationBar.isHidden = true
-        
         self.viewModel.netGroupList()
-        self.viewModel.netSymbolList()
+        self.viewModel.netSymbolList(isUp: false)
         
     }
     

+ 13 - 0
Koala/Koala/Modular/Market/VM/MDAnnouncementViewModel.swift

@@ -0,0 +1,13 @@
+//
+//  MDAnnouncementViewModel.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDAnnouncementViewModel: BaseViewModel {
+
+}

+ 175 - 0
Koala/Koala/Modular/Market/VM/MDAuoteViewModel.swift

@@ -0,0 +1,175 @@
+//
+//  MDAuoteViewModel.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+import ReactiveCocoa
+import ReactiveSwift
+
+class MDAuoteViewModel: BaseViewModel {
+    var symbolModel:KSymbolModel = KSymbolModel()
+    var period:String = KLinePeriod.minuteNetStrFor(index: KLinePeriod.indexFor(kPeriod:KLinePeriod.getDefaultKLinePeriod())){//K线时间
+        didSet{
+            self.netGetPriceList()
+        }
+    }
+
+    lazy var priceList:[KSymbolKlineData] = {
+        let arr:[KSymbolKlineData] = [KSymbolKlineData]()
+        return arr
+    }()
+    
+    
+    let (signalPrice, observePrice) = Signal<Bool, Never>.pipe()
+    
+    var getPriceListAction: Action <(),(Bool),Never>!
+    
+    override func initialize() {
+        getPriceListAction = Action<(),(Bool),Never> {[weak self] _ in
+            return SignalProducer<(Bool),Never>{ observer, _ in
+                self?.requestGetPriceList(observer: observer)
+            }
+        }
+        
+    }
+    
+    override func webSocketdidReceive(nofi: NSNotification) {
+        self.webSocketdidReceiveDataTreating(nofi: nofi)
+    }
+}
+
+extension MDAuoteViewModel {
+    //获取行情数据
+    func netGetPriceList() {
+        getPriceListAction.apply().start()
+    }
+    //获取行情数据
+    func requestGetPriceList(observer: Signal< Bool, Never>.Observer) -> Void {
+        
+        let endDate:String = currentTimeStamp()
+        let p = conerData(period, .MyCLong).3!
+        let startDate:String = String(format:"%ld",conerData(currentTimeStamp(), .MyCLong).3! - 200*p*60)
+      
+        let param = [
+            "symbol":self.symbolModel.symbol,
+            "type":period,
+//            "startTime":startDate+"000",
+            "count" : "100",
+            "endTime":endDate+"000"
+        ]
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForGetPriceList,parameters:param , success: { (code, result) in
+            ProgressHUD.hideHud()
+            if let list:[NSDictionary] = result as? [NSDictionary] {
+                self.priceList.removeAll()
+                KLinePeriod.setDefaultKLinePeriod(KLinePeriod.kPeriodFor(index: KLinePeriod.indexForNetPeriods(period: self.period))!)
+                for dic in list {
+                    let model = KSymbolKlineData.deserialize(from: dic)!
+                    model.datetime = decimalNumber(A: model.datetime, B: "1000", type: .Divid)
+                    self.priceList.append(model)
+                }
+                observer.send(value: true)
+            }else{
+                observer.send(value: false)
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
+            }
+            observer.sendCompleted()
+        }) { (code, result) in
+            ProgressHUD.showError(status: result as! String)
+            observer.send(value: false)
+            observer.sendCompleted()
+        }
+    }
+    
+   
+}
+
+extension MDAuoteViewModel{
+    //socket数据处理
+    @objc func webSocketdidReceiveDataTreating(nofi: NSNotification) {
+        if let dict:NSDictionary = nofi.object as? NSDictionary {
+            guard let type = dict["type"] as? Int else {
+                return
+            }
+            if type == 0 {
+                if let currentSocket = dict.object(forKey: "currentSocket") as? NSDictionary {
+                    var isReload = false
+                    guard let symbol = currentSocket["symbol"] as? String else{
+                        return
+                    }
+                    if symbol == self.symbolModel.symbol {
+                        guard let _ = currentSocket["time"] as? Int64 else{
+                            return
+                        }
+                        var datetime = conerData("\(currentSocket["time"] ?? 0)", .MyCLong).3!
+                        
+                        datetime = datetime / 1000
+                        var period = KLinePeriod.minuteFor(kPeriod: KLinePeriod.getDefaultKLinePeriod())
+                        period = period * 60
+                    
+                        let newPrice = String(format:"%@",currentSocket["ask"] as! CVarArg)
+                        let model:KSymbolKlineData = KSymbolKlineData()
+                        
+                        isReload = true
+                        if let firstModel = self.priceList.first {
+                            
+                            let firstTime = conerData(firstModel.datetime as Any, .MyCLong).3! + period
+                            
+                            if firstTime >= datetime {
+                                firstModel.close = newPrice
+                                if conerData(firstModel.low, .MyDouble).2! >  conerData(newPrice, .MyDouble).2!{
+                                    firstModel.low = newPrice
+                                }
+                                if conerData(firstModel.high, .MyDouble).2! < conerData(newPrice, .MyDouble).2!{
+                                    firstModel.high = newPrice
+                                }
+                            }else{
+                               
+                                model.datetime = "\(datetime + period)"
+                                model.open = newPrice
+                                model.close = newPrice
+                                model.high = newPrice
+                                model.low = newPrice
+                            
+                                self.priceList.insert(model, at: 0)
+                            }
+                        }else{
+                            model.datetime = "\(datetime)"
+                            model.open = newPrice
+                            model.close = newPrice
+                            model.high = newPrice
+                            model.low = newPrice
+                           
+                            self.priceList.insert(model, at: 0)
+                        }
+                        
+                    }
+                    
+                    if isReload {
+                        if let firstModel = self.priceList.first {
+                            if conerData(firstModel.low, .MyDouble).2! <  conerData(self.symbolModel.low, .MyDouble).2!{
+                                self.symbolModel.low = firstModel.low
+                            }
+                            if conerData(firstModel.high, .MyDouble).2! > conerData(self.symbolModel.high, .MyDouble).2!{
+                                self.symbolModel.high = firstModel.high
+                            }
+                            self.symbolModel.newPrice = firstModel.close
+                            
+                            let np = conerData(self.symbolModel.newPrice, .MyDouble).2! + conerData( self.symbolModel.open, .MyDouble).2!
+                            self.symbolModel.increase = "\(np/conerData(self.symbolModel.open, .MyDouble).2! * 100)"
+                        }
+                        self.observePrice.send(value: true)
+                    }
+                    
+                }
+            }
+            
+        }
+    }
+    
+}
+

+ 13 - 0
Koala/Koala/Modular/Market/VM/MDFinanceViewModel.swift

@@ -0,0 +1,13 @@
+//
+//  MDFinanceViewModel.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDFinanceViewModel: BaseViewModel {
+
+}

+ 13 - 0
Koala/Koala/Modular/Market/VM/MDNewsViewModel.swift

@@ -0,0 +1,13 @@
+//
+//  MDNewsViewModel.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDNewsViewModel: BaseViewModel {
+
+}

+ 13 - 0
Koala/Koala/Modular/Market/VM/MDOptionsViewModel.swift

@@ -0,0 +1,13 @@
+//
+//  MDOptionsViewModel.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsViewModel: BaseViewModel {
+
+}

+ 13 - 0
Koala/Koala/Modular/Market/VM/MDProfileViewModel.swift

@@ -0,0 +1,13 @@
+//
+//  MDProfileViewModel.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/12.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDProfileViewModel: BaseViewModel {
+
+}

+ 539 - 163
Koala/Koala/Modular/Market/VM/MarketViewModel.swift

@@ -10,6 +10,11 @@ import UIKit
 import ReactiveCocoa
 import ReactiveSwift
 class MarketViewModel: BaseViewModel {
+    lazy var netParamList:[String] = {
+        let arr:[String] = ["09988.SZ","00700.SZ","00388.SZ","002230.SZ","AAPL.US","TSLA.US","NVDA.US","600519.SH","300750.SZ","002594.SZ","300059.SZ"];
+        return arr
+    }()
+    
     lazy var productGroupList:[MarketProductGroupModel] = {//交易对
         let arr:[MarketProductGroupModel] = [MarketProductGroupModel]()
         return arr
@@ -20,17 +25,36 @@ class MarketViewModel: BaseViewModel {
         return arr
     }()
     
+    lazy var collectionSymbolList:[KSymbolModel] = {//收藏
+        let arr:[KSymbolModel] = [KSymbolModel]()
+        return arr
+    }()
     
     lazy var symbolList:[KSymbolModel] = {//交易对
         let arr:[KSymbolModel] = [KSymbolModel]()
         return arr
     }()
     
+    lazy var recommendList:[KSymbolModel] = {//交易对
+        let arr:[KSymbolModel] = [KSymbolModel]()
+        return arr
+    }()
+    
     lazy var screenSymbolList:[KSymbolModel] = {//交易对
         let arr:[KSymbolModel] = [KSymbolModel]()
         return arr
     }()
     
+    lazy var optionList:[OptionsListModel] = {//期权
+        let arr:[OptionsListModel] = [OptionsListModel]()
+        return arr
+    }()
+    
+    lazy var screenOptionList:[OptionsListModel] = {//期权
+        let arr:[OptionsListModel] = [OptionsListModel]()
+        return arr
+    }()
+    
     var screenText:String = ""{
         didSet{
             self.screenSymbolListAction()
@@ -40,18 +64,49 @@ class MarketViewModel: BaseViewModel {
     var marketText : String = ""{
         
         didSet {
+            self.netSymbolList(isUp: false)
+        }
+        
+    }
+    
+    var optionMarket : String = ""{
+        
+        didSet {
+            self.netOptionProductListGroup(isUp: false)
+        }
+        
+    }
+    
+    var topIndex = 1{
+        didSet{
             
-//            netSymbolList
+        }
+    }
+    
+    var index:Int = 0{
+        didSet{
+            if index == -2 {
+                self.netUserList()
+            }
+            else if index >= 0{
+                self.marketText = getCode()
+            }else{
+                self.screenSymbolListAction()
+            }
             
-            self.netSymbolList()
-//            self.screenSymbolListAction()
         }
-        
     }
     
-    var index:Int = 1{
+    var optionsIndex = 0{
         didSet{
-            self.screenSymbolListAction()
+            let model = self.getOptionsMarketList()[optionsIndex]
+            self.optionMarket = model.market
+        }
+    }
+    
+    var optionsTimerIndex = 0{
+        didSet{
+            self.screenOptionListAction()
         }
     }
     
@@ -67,18 +122,53 @@ class MarketViewModel: BaseViewModel {
         }
     }
     
+
+    var optionsIncreaseSort:Int = 0{//0 后台 , 1 increase 升序,2 increase 降序
+        didSet{
+            self.screenOptionListAction()
+        }
+    }
+    
+    var optionsMeanSort:Int = 0{//0 后台 , 1 Mean 升序,2 Mean 降序
+        didSet{
+            self.screenOptionListAction()
+        }
+    }
+    
+    var optionsVirtualSort:Int = 0{//0 后台 , 1 Virtual 升序,2 Virtual 降序
+        didSet{
+            self.screenOptionListAction()
+        }
+    }
+    
+    var pageNum:Int = 1
+    
+    var optionPageNum:Int = 1
+    
+    
+    
     let (signalScreen, observeScreen) = Signal<Bool, Never>.pipe()
     let (signalSymbol, observeSymbol) = Signal<Bool, Never>.pipe()
     //netForInsertProductUser
-    //netForDeleteProductUser
+    //netForGetOptionProductListGroup
+    
+    var recommendSymbolListAction: Action <(),(Bool),Never>!
     var groupListAction: Action <(),(Bool),Never>!
     var userListAction: Action <(),(Bool),Never>!
-    var symbolListAction: Action <(),(Bool),Never>!
+    var symbolListAction: Action <(Bool),(Bool),Never>!
     var updateScribeAction: Action <(),(Bool),Never>!
     var insertProductUserAction: Action <(String),(Bool),Never>!
     var deleteProductUserAction: Action <(String),(Bool),Never>!
     
+    var optionProductListGroupAction: Action <(Bool),(Bool),Never>!
+    
     override func initialize() {
+        recommendSymbolListAction = Action<(),(Bool),Never> {[weak self] _ in
+            return SignalProducer<(Bool),Never>{ observer, _ in
+                self?.requestRecommendSymbolList(observer: observer)
+            }
+        }
+        
         groupListAction = Action<(),(Bool),Never> {[weak self] _ in
             return SignalProducer<(Bool),Never>{ observer, _ in
                 self?.requestGroupList(observer: observer)
@@ -91,9 +181,9 @@ class MarketViewModel: BaseViewModel {
             }
         }
         
-        symbolListAction = Action<(),(Bool),Never> {[weak self] _ in
+        symbolListAction = Action<(Bool),(Bool),Never> {[weak self] isUp in
             return SignalProducer<(Bool),Never>{ observer, _ in
-                self?.requestSymbolList(observer: observer)
+                self?.requestSymbolList(observer: observer,isUp:isUp)
             }
         }
         
@@ -114,6 +204,12 @@ class MarketViewModel: BaseViewModel {
                 self?.requestDeleteProductUser(observer: observer,symbol:symbol)
             }
         }
+        
+        optionProductListGroupAction = Action<(Bool),(Bool),Never> {[weak self] isUp in
+            return SignalProducer<(Bool),Never>{ observer, _ in
+                self?.requestOptionProductListGroup(observer: observer,isUp:isUp)
+            }
+        }
     }
     
     override func webSocketdidReceive(nofi: NSNotification) {
@@ -123,6 +219,47 @@ class MarketViewModel: BaseViewModel {
 
 extension MarketViewModel {
     
+    //获取推荐交易对
+    func netRecommendSymbolList() {
+        recommendSymbolListAction.apply().start()
+    }
+    //
+    func requestRecommendSymbolList(observer: Signal< Bool, Never>.Observer) -> Void {
+       
+        let parame:[String:Any] = [
+            "symbol":getJSONStringFromArray(array: self.netParamList as NSArray)
+        ]
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList,parameters: parame, success: { (code, result) in
+            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
+                self.recommendList.removeAll()
+                for dic in list {
+                    let model = KSymbolModel.deserialize(from: dic)
+                    model?.isSelect = true
+                    if model!.visible == 1{
+                        var ask = model!.ask
+                        if conerData(ask, .MyDouble).2! == 0{
+                            ask = model!.open
+                        }
+                        model?.newPrice = precisionString(with: ask, precision: model!.digits)
+                        let np = decimalNumber(A: model!.newPrice, B: model!.open, type: .Subtract, scale:model!.digits)
+                        let increase = (conerData(np, .MyDouble).2!/conerData(model!.open, .MyDouble).2!)*100
+                        model?.increase = String(format: "%.2f",increase)
+                        self.recommendList.append(model!)
+                    }
+                }
+                observer.send(value: true)
+            }else{
+                observer.send(value: false)
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
+            }
+            observer.sendCompleted()
+        }) { (code, result) in
+            ProgressHUD.showError(status: result as! String)
+            observer.send(value: false)
+            observer.sendCompleted()
+        }
+    }
+    
     //获取产品分组列表
     func netGroupList() {
         groupListAction.apply().start()
@@ -155,26 +292,65 @@ extension MarketViewModel {
     func netUserList() {
         if OperationalUserInfoData.getLogin(){
             userListAction.apply().start()
-        }else{
-            self.collectionList.removeAll()
-            for model in self.symbolList {
-                model.isCollection = false
-            }
-            self.screenSymbolListAction()
         }
     }
 
     func requestUserList(observer: Signal< Bool, Never>.Observer) -> Void {
-       
+        ProgressHUD.showLoading()
         NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForProductUserList, success: { (code, result) in
-            
+            ProgressHUD.hideHud()
             if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
                 self.collectionList.removeAll()
                 for dic in list {
                     self.collectionList.append((dic["symbol"] as? String) ?? "")
                 }
-                self.updateSymbolListCollection()
-                self.screenSymbolListAction()
+                if list.count > 0 {
+                    self.requestCollectionSymbolList(observer: observer)
+                }else{
+                    observer.send(value: true)
+                    observer.sendCompleted()
+                }
+               
+            }else{
+                observer.send(value: false)
+                observer.sendCompleted()
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
+            }
+           
+        }) { (code, result) in
+            ProgressHUD.showError(status: result as! String)
+            observer.send(value: false)
+            observer.sendCompleted()
+        }
+    }
+    
+    func requestCollectionSymbolList(observer: Signal< Bool, Never>.Observer) -> Void {
+        var list:[String] = [String]()
+        for symbol in self.collectionList{
+            list.append(symbol)
+        }
+        let parame:[String:Any] = [
+            "symbol":getJSONStringFromArray(array: list as NSArray)
+        ]
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList,parameters: parame, success: {[weak self] (code, result) in
+            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
+                self?.collectionSymbolList.removeAll()
+                for dic in list {
+                    let model = KSymbolModel.deserialize(from: dic)
+                    model?.isSelect = true
+                    if model!.visible == 1{
+                        var ask = model!.ask
+                        if conerData(ask, .MyDouble).2! == 0{
+                            ask = model!.open
+                        }
+                        model?.newPrice = precisionString(with: ask, precision: model!.digits)
+                        let np = decimalNumber(A: model!.newPrice, B: model!.open, type: .Subtract, scale:model!.digits)
+                        let increase = (conerData(np, .MyDouble).2!/conerData(model!.open, .MyDouble).2!)*100
+                        model?.increase = String(format: "%.2f",increase)
+                        self?.collectionSymbolList.append(model!)
+                    }
+                }
+                self?.screenSymbolListAction()
                 observer.send(value: true)
             }else{
                 observer.send(value: false)
@@ -188,71 +364,63 @@ extension MarketViewModel {
         }
     }
     
+    
     //获取交易对
-    func netSymbolList() {
-        symbolListAction.apply().start()
+    func netSymbolList(isUp:Bool) {
+        symbolListAction.apply(isUp).start()
     }
     //
-    func requestSymbolList(observer: Signal< Bool, Never>.Observer) -> Void {
-        //读取缓存
-        //        if getSymbolList().count > 0 {
-//            self.symbolList = getSymbolList()
-//            self.screenSymbolListAction()
-//            self.updateSymbolListCollection()
-//            observer.send(value: true)
-//            observer.sendCompleted()
-//            return
-//        }
-        ProgressHUD.showMessage(status:"")
-        
+    func requestSymbolList(observer: Signal< Bool, Never>.Observer,isUp:Bool) -> Void {
+        if !isUp{
+            self.pageNum = 1
+        }
         let param : [String : Any] = [
             
-            "pageNum" : "1",
+            "pageNum" : self.pageNum,
             "pageSize" : "30",
             "market" : self.marketText
         ]
-        
-        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList, parameters: param, success: { (code, result) in
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList, parameters: param, success: {[weak self](code, result) in
             
             ProgressHUD.hideHud()
             if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
-                self.symbolList.removeAll()
-                SaveData.shared().updateSymbolList(list: list as NSArray)
-                self.symbolList = getSymbolList()
-                self.screenSymbolListAction()
-                self.updateSymbolListCollection()
-                self.netUpdateSubscribes()
-                observer.send(value: true)
-                }else{
-                    observer.send(value: false)
-                    ProgressHUD.showError(status:DataTypeErrorPrompt)
+                if !isUp {
+                    self?.symbolList.removeAll()
                 }
-                    observer.sendCompleted()
-            }) { (code, result) in
-                ProgressHUD.showError(status: result as! String)
+                self?.pageNum += 1
+                for dic in list {
+                    let model = KSymbolModel.deserialize(from: dic)!
+                    if model.visible == 1{
+                        var ask = model.ask
+                        if conerData(ask, .MyDouble).2! == 0{
+                            ask = model.open
+                        }
+                        model.newPrice = precisionString(with: ask, precision: model.digits)
+                        let np = decimalNumber(A: model.newPrice, B: model.open, type: .Subtract, scale:model.digits)
+                        let increase = (conerData(np, .MyDouble).2!/conerData(model.open, .MyDouble).2!)*100
+                        model.increase = String(format: "%.2f",increase)
+                        self?.symbolList.append(model)
+                    }
+                }
+                self?.screenSymbolListAction()
+                self?.updateSymbolListCollection()
+                self?.netUpdateSubscribes()
+                
+                let isNoData:Bool = (list.count < 30) ? true : false
+                observer.send(value:isNoData)
+                
+            }else{
                 observer.send(value: false)
-                observer.sendCompleted()
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
             }
+            observer.sendCompleted()
+        }) { (code, result) in
+            ProgressHUD.showError(status: result as! String)
+            observer.send(value: false)
+            observer.sendCompleted()
+        }
         
-//        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList, success: { (code, result) in
-//            ProgressHUD.hideHud()
-//            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
-//                self.symbolList.removeAll()
-//                SaveData.shared().updateSymbolList(list: list as NSArray)
-//                self.symbolList = getSymbolList()
-//                self.screenSymbolListAction()
-//                self.updateSymbolListCollection()
-//                observer.send(value: true)
-//            }else{
-//                observer.send(value: false)
-//                ProgressHUD.showError(status:DataTypeErrorPrompt)
-//            }
-//            observer.sendCompleted()
-//        }) { (code, result) in
-//            ProgressHUD.showError(status: result as! String)
-//            observer.send(value: false)
-//            observer.sendCompleted()
-//        }
     }
     
     //添加收藏
@@ -266,7 +434,7 @@ extension MarketViewModel {
     }
     
     func requestInsertProductUser(observer: Signal< Bool, Never>.Observer,symbol:String) -> Void {
-       
+        ProgressHUD.showLoading()
         let parame:[String:Any] = ["symbol":symbol]
         NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForInsertProductUser ,parameters: parame, success: { (code, result) in
             ProgressHUD.showSuccess(status: switchLanguage("收藏成功"))
@@ -326,11 +494,17 @@ extension MarketViewModel {
     func requestUpdateSubscribeAction(observer: Signal< Bool, Never>.Observer) -> Void  {
         
         var symbols : [String] = []
-        
-        for model in self.screenSymbolList{
-            symbols.append(model.symbol)
+        if self.topIndex == 2 {
+            for model in self.screenOptionList{
+                symbols.append(model.code)
+            }
+        }else{
+            for model in self.screenSymbolList{
+                symbols.append(model.symbol)
+            }
         }
         
+        
         let param = [
          
             "symbols": symbols
@@ -338,14 +512,12 @@ extension MarketViewModel {
         
         print("symbols : \(param)")
         NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netUpdateSubscribe, parameters: param) { (code, result) in
-            print(code,result ?? "")
-            
+           
             observer.send(value: true)
             observer.sendCompleted()
             
         } failured: {  (code, result) in
-            print(code,result ?? "")
-            
+          
             ProgressHUD.showError(status: result as! String)
             observer.send(value: false)
             observer.sendCompleted()
@@ -354,6 +526,105 @@ extension MarketViewModel {
         
     }
     
+    //获取期权列表
+    func netOptionProductListGroup(isUp:Bool) {
+        optionProductListGroupAction.apply(isUp).start()
+    }
+    //
+    func requestOptionProductListGroup(observer: Signal< Bool, Never>.Observer,isUp:Bool) -> Void {
+        if !isUp{
+            self.optionPageNum = 1
+        }
+        let param : [String : Any] = [
+            "pageNum" : self.optionPageNum,
+            "pageSize" : "30",
+            "market" : self.optionMarket
+        ]
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForGetOptionProductListGroup, parameters: param, success: {[weak self](code, result) in
+            
+            ProgressHUD.hideHud()
+            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
+                if !isUp {
+                    self?.optionList.removeAll()
+                }
+                self?.optionPageNum += 1
+                for dic in list {
+                    let model = OptionsListModel.deserialize(from: dic)!
+                    self?.optionList.append(model)
+                }
+                
+               
+                if self!.optionList.count > 0 {
+                    let isNoData:Bool = (list.count < 30) ? true : false
+                    self?.requestOptionProductListGroupSymbol(observer: observer,isNoData: isNoData)
+                }else{
+                    observer.send(value:true)
+                    observer.sendCompleted()
+                }
+                
+            }else{
+                observer.send(value: false)
+                observer.sendCompleted()
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
+            }
+           
+        }) { (code, result) in
+            ProgressHUD.showError(status: result as! String)
+            observer.send(value: false)
+            observer.sendCompleted()
+        }
+        
+    }
+    
+   
+    func requestOptionProductListGroupSymbol(observer: Signal< Bool, Never>.Observer,isNoData:Bool) -> Void {
+        var list:[String] = [String]()
+        for model in self.optionList{
+            list.append(model.code)
+        }
+        let param:[String:Any] = [
+            "symbol":getJSONStringFromArray(array: list as NSArray)
+        ]
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList,parameters: param, success: {[weak self] (code, result) in
+            ProgressHUD.hideHud()
+            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
+                for dic in list {
+                    let model = KSymbolModel.deserialize(from: dic)
+                    var ask = model!.ask
+                    if conerData(ask, .MyDouble).2! == 0{
+                        ask = model!.open
+                    }
+                    model?.newPrice = precisionString(with: ask, precision: model!.digits)
+                    let np = decimalNumber(A: model!.newPrice, B: model!.open, type: .Subtract, scale:model!.digits)
+                    let increase = (conerData(np, .MyDouble).2!/conerData(model!.open, .MyDouble).2!)*100
+                    model?.increase = String(format: "%.2f",increase)
+                    
+                    for oModel in self!.optionList{
+                        if oModel.code == model!.symbol{
+                            oModel.symbolData = model!
+                            break
+                        }
+                    }
+                }
+                
+                self?.screenOptionListAction()
+                self?.netUpdateSubscribes()
+                observer.send(value: isNoData)
+            }else{
+                observer.send(value: false)
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
+            }
+            observer.sendCompleted()
+        }) { (code, result) in
+            ProgressHUD.showError(status: result as! String)
+            observer.send(value: false)
+            observer.sendCompleted()
+        }
+    }
+    
+    
 }
 
 extension MarketViewModel {
@@ -370,87 +641,33 @@ extension MarketViewModel {
     }
     
     func resetProductGroup() -> Void {
-        let collectModel = MarketProductGroupModel()
-        collectModel.id = "-2"
-        collectModel.title = switchLanguage("自选")
-        collectModel.code = "ZX"
-        self.productGroupList.insert(collectModel, at: 0)
-        
-//        let hotModel = MarketProductGroupModel()
-//        hotModel.id = "-1"
-//        hotModel.title = switchLanguage("热门")
-//        self.productGroupList.insert(hotModel, at: 1)
-//
+     
         let allModel = MarketProductGroupModel()
         allModel.id = "0"
         allModel.title = switchLanguage("全部")
-        allModel.code = "ALL"
-//        self.productGroupList.append(allModel)
-        self.productGroupList.insert(allModel, at: 1)
+        allModel.code = ""
+        self.productGroupList.insert(allModel, at: 0)
         self.screenSymbolListAction()
     }
     
     func screenSymbolListAction() -> Void {
         self.screenSymbolList.removeAll()
-        var groupList:[KSymbolModel] = [KSymbolModel]()
-        let group = self.getGroup()
-        let code = self.getCode()
-        if group == "-2" {
-            for model in self.symbolList {
-                for symbol in self.collectionList{
-                    if model.symbol == symbol{
-                        groupList.append(model)
-                        break
-                    }
-                }
-            }
-           
-        }
-        else if group == "-1"{
-            for model in self.symbolList {
-                if model.hot == 1 {
-                    groupList.append(model)
-                }
-            }
-        }
-        else if group == "0"{
-            groupList = self.symbolList
-        }else{
-            for model in self.symbolList {
-//                if group == model.groupid{
-//                    groupList.append(model)
-//                }
-
-                if code == model.market {
-                    groupList.append(model)
-                }
-//
-            }
-            
-            self.marketText = code
-            
-            
+        
+        if (index == -2){
+            self.screenSymbolList = self.collectionSymbolList
         }
-       
-        var textList:[KSymbolModel] = [KSymbolModel]()
-        if screenText.length == 0 {
-            textList = groupList
-        }else{
-            for model in groupList{
-                if model.title.uppercased().contains(screenText.uppercased()){
-                    textList.append(model)
-                }
-            }
+        else if (index >= 0){
+            self.screenSymbolList = self.symbolList
         }
         
         if symbolSort > 0 {
             if symbolSort == 1 {
-                textList.sort(by: {
+                self.screenSymbolList.sort(by: {
                     return $0.symbol > $1.symbol
                 })
             }
             else if symbolSort == 2{
-                textList.sort(by: {
+                self.screenSymbolList.sort(by: {
                     return $0.symbol < $1.symbol
                 })
             }
@@ -460,25 +677,48 @@ extension MarketViewModel {
         
         if increaseSort > 0 {
             if increaseSort == 1{
-               textList.sort { (model1, model2) -> Bool in
+                self.screenSymbolList.sort { (model1, model2) -> Bool in
                    return conerData(model1.increase as Any, .MyDouble).2! > conerData(model2.increase as Any, .MyDouble).2!
                }
            }
            else if increaseSort == 2 {
-               textList.sort { (model1, model2) -> Bool in
+               self.screenSymbolList.sort { (model1, model2) -> Bool in
                    return conerData(model1.increase as Any, .MyDouble).2! < conerData(model2.increase as Any, .MyDouble).2!
                }
            }
         }
         
+       
+        self.observeScreen.send(value: true)
+    }
+    
+    
+    func screenOptionListAction() -> Void {
+        self.screenOptionList.removeAll()
+            
+        for model in self.optionList{
+            self.screenOptionList.append(model)
+        }
         
-        self.screenSymbolList = textList
-        
-      
+        if optionsIncreaseSort > 0 {
+            if optionsIncreaseSort == 1{
+                self.screenOptionList.sort { (model1, model2) -> Bool in
+                   return conerData(model1.symbolData.increase as Any, .MyDouble).2! > conerData(model2.symbolData.increase as Any, .MyDouble).2!
+               }
+           }
+           else if optionsIncreaseSort == 2 {
+               self.screenOptionList.sort { (model1, model2) -> Bool in
+                   return conerData(model1.symbolData.increase as Any, .MyDouble).2! < conerData(model2.symbolData.increase as Any, .MyDouble).2!
+               }
+           }
+        }
         
+       
         self.observeScreen.send(value: true)
     }
     
+    
+    
     func getGroup() -> String {
         guard self.productGroupList.count > self.index else {
             return "0"
@@ -492,14 +732,94 @@ extension MarketViewModel {
         
         guard self.productGroupList.count > self.index else {
             
-            return "ZX"
+            return ""
             
         }
         
         let model  = self.productGroupList[self.index]
         return model.code
         
+    }
+
+    func getOptionsMarketTitleList() -> [String] {
+        var list:[String] = [String]()
+        for model in self.getOptionsMarketList(){
+            list.append(model.title)
+        }
+        return list
+    }
+    
+    func getOptionsMarketList() -> [OptionsMarketModel] {
+        let list = [
+            [
+                "market":"CN",
+                "title":switchLanguage("沪深"),
+            ],
+            [
+                "market":"US",
+                "title":switchLanguage("美股"),
+            ],
+            [
+                "market":"HK",
+                "title":switchLanguage("港股"),
+            ],
+        ]
         
+        var arr:[OptionsMarketModel] = [OptionsMarketModel]()
+        for dict in list {
+            let model = OptionsMarketModel.deserialize(from: dict)!
+            arr.append(model)
+        }
+        
+        return arr
+    }
+    
+    func getOptionsTimer() -> String {
+        let model = getOptionsTimerList()[self.optionsTimerIndex]
+        return model.timer
+    }
+    
+    func getOptionsTimerList() -> [OptionsTimerModel] {
+        let list = [
+            [
+                "timer":"price_1m_list",
+                "title":"1M",
+                "isSelect":true
+            ],
+            [
+                "timer":"price_2m_list",
+                "title":"2M",
+                "isSelect":false
+            ],
+            [
+                "timer":"price_3m_list",
+                "title":"3M",
+                "isSelect":false
+            ],
+            [
+                "timer":"price_4m_list",
+                "title":"4M",
+                "isSelect":false
+            ],
+            [
+                "timer":"price_5m_list",
+                "title":"5M",
+                "isSelect":false
+            ],
+            [
+                "timer":"price_6m_list",
+                "title":"6M",
+                "isSelect":false
+            ],
+        ]
+        
+        var arr:[OptionsTimerModel] = [OptionsTimerModel]()
+        for dict in list {
+            let model = OptionsTimerModel.deserialize(from: dict)!
+            arr.append(model)
+        }
+        
+        return arr
     }
     
     
@@ -515,26 +835,82 @@ extension MarketViewModel{
             if type == 0 {
                 if let currentSocket = dict.object(forKey: "currentSocket") as? NSDictionary {
                     var isReload = false
-                    for model in symbolList{
-                        guard let symbol = currentSocket["symbol"] as? String else{
-                            return
+                    
+                    guard let symbol = currentSocket["symbol"] as? String else{
+                        return
+                    }
+                    if self.topIndex == 0 {
+                        for model in collectionSymbolList{
+                           
+                            if model.symbol == symbol {
+                                model.newPrice = String(format:"%@",currentSocket["ask"] as! CVarArg)
+                                let np = conerData(model.newPrice, .MyDouble).1! - conerData(model.open, .MyDouble).1!
+                                let increase = (conerData("\(np)", .MyDouble).2!/conerData(model.open, .MyDouble).2!)*100
+                                model.increase = String(format: "%.2f",increase)
+                                for m in self.screenSymbolList{
+                                    if m.symbol == symbol{
+                                        m.newPrice = model.newPrice
+                                        m.increase = model.increase
+                                        isReload = true
+                                        break
+                                    }
+                                }
+                                break
+                            }
                         }
-                        if model.symbol == symbol {
-                            model.newPrice = String(format:"%@",currentSocket["ask"] as! CVarArg)
-                            let np = decimalNumber(A: model.newPrice, B: model.open, type: .Subtract, scale:model.digits)
-                            model.increase = decimalNumber(A: np, B: model.open, type: .Divid)
-                            model.increase = decimalNumber(A: model.increase, B: "100", type: .Multiply)
-                            for m in self.screenSymbolList{
-                                if m.symbol == symbol{
-                                    m.newPrice = model.newPrice
-                                    m.increase = model.increase
-                                    isReload = true
-                                    break
+                        
+                        for model in recommendList{
+                           
+                            if model.symbol == symbol {
+                                model.newPrice = String(format:"%@",currentSocket["ask"] as! CVarArg)
+                                let np = conerData(model.newPrice, .MyDouble).1! - conerData(model.open, .MyDouble).1!
+                                let increase = (conerData("\(np)", .MyDouble).2!/conerData(model.open, .MyDouble).2!)*100
+                                model.increase = String(format: "%.2f",increase)
+                                break
+                            }
+                        }
+                    }
+                    else if self.topIndex == 1{
+                        for model in symbolList{
+                            if model.symbol == symbol {
+                                model.newPrice = String(format:"%@",currentSocket["ask"] as! CVarArg)
+                                let np = conerData(model.newPrice, .MyDouble).1! - conerData(model.open, .MyDouble).1!
+                                let increase = (conerData("\(np)", .MyDouble).2!/conerData(model.open, .MyDouble).2!)*100
+                                model.increase = String(format: "%.2f",increase)
+                                for m in self.screenSymbolList{
+                                    if m.symbol == symbol{
+                                        m.newPrice = model.newPrice
+                                        m.increase = model.increase
+                                        isReload = true
+                                        break
+                                    }
                                 }
+                                break
+                            }
+                        }
+                    }
+                   
+                    else{
+                        for model in optionList{
+                            if model.symbolData.symbol == symbol {
+                                model.symbolData.newPrice = String(format:"%@",currentSocket["ask"] as! CVarArg)
+                                let np = conerData(model.symbolData.newPrice, .MyDouble).1! - conerData(model.symbolData.open, .MyDouble).1!
+                                let increase = (conerData("\(np)", .MyDouble).2!/conerData(model.symbolData.open, .MyDouble).2!)*100
+                                model.symbolData.increase = String(format: "%.2f",increase)
+                                for m in self.screenOptionList{
+                                    if m.symbolData.symbol == symbol{
+                                        m.symbolData.newPrice = model.symbolData.newPrice
+                                        m.symbolData.increase = model.symbolData.increase
+                                        isReload = true
+                                        break
+                                    }
+                                }
+                                break
                             }
-                            break
                         }
+                        
                     }
+                   
                     if isReload {
                         self.observeSymbol.send(value: true)
                     }

+ 1 - 1
Koala/Koala/Modular/MarketDetail/C/MarketMainDetailViewController.swift

@@ -44,7 +44,7 @@ class MarketMainDetailViewController: BaseViewController {
             make.top.left.right.equalTo(self.view)
             make.height.equalTo(NavigationViewHeight+StatusBarHeight)
         }
-        navView.titleLb.text = viewModel.symbolModel.title
+        //navView.titleLb.text = viewModel.symbolModel.title
         
         
         listContainerView.frame = CGRect(x: 0, y: NavigationViewHeight + StatusBarHeight + 50, width: view.bounds.size.width, height: view.bounds.size.height - 50 - NavigationViewHeight - StatusBarHeight )

+ 0 - 97
Koala/Koala/Modular/MarketDetail/V/MarketDetailNavView.swift

@@ -1,97 +0,0 @@
-//
-//  MarketDetailNavView.swift
-//  Koala
-//
-//  Created by mac on 2023/9/1.
-//  Copyright © 2023 刘千军. All rights reserved.
-//
-
-import Foundation
-import UIKit
-
-class MarketDetailNavView: BaseView
-{
-
-    lazy var titleLb : UILabel = {
-        
-        let v = UILabel()
-        v.textColor = .black
-        v.font = .boldSystemFont(ofSize: 22)
-        v.text = "特斯拉"
-        
-        return v
-    }()
-    
-    lazy var backBtn : UIButton = {
-        
-        let  v = UIButton(type: .custom)
-        
-        v.setImage(UIImage(named: "Base_W_Black"), for: .normal)
-        v.addTarget(self, action: #selector(backAction), for: .touchUpInside)
-        return v
-    }()
-    
-    @objc func backAction(){
-        
-        currentVc()?.navigationController?.popViewController(animated: true)
-        
-    }
-    
-    lazy var shareBtn : UIButton = {
-        
-        let  v = UIButton(type: .custom)
-        
-        v.setImage(UIImage(named: "Market_share"), for: .normal)
-        
-        return v
-    }()
-    
-    lazy var collectionBtn : UIButton = {
-        
-        let v = UIButton(type: .custom)
-        v.setImage(UIImage(named: "Market_collection"), for: .normal)
-        
-        return v
-    }()
-    
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-    
-        backgroundColor = .white
-        
-        
-        
-        self.addSubview(titleLb)
-        titleLb.snp.makeConstraints { make in
-            make.centerX.equalTo(self)
-            make.bottom.equalTo(self.snp.bottom).offset(-16)
-        }
-        
-        self.addSubview(collectionBtn)
-        collectionBtn.snp.makeConstraints { make in
-            make.right.equalTo(self.snp.right).offset(-15)
-            make.bottom.equalTo(self.snp.bottom).offset(-15)
-            make.size.equalTo(CGSizeMake(24, 24))
-        }
-        
-        self.addSubview(shareBtn)
-        shareBtn.snp.makeConstraints { make in
-            make.right.equalTo(collectionBtn.snp.left).offset(-14)
-            make.centerY.equalTo(collectionBtn)
-            make.size.equalTo(CGSizeMake(24, 24))
-        }
-        
-        self.addSubview(backBtn)
-        backBtn.snp.makeConstraints { make in
-            make.centerY.equalTo(collectionBtn)
-            make.left.equalTo(self.snp.left).offset(9)
-            make.size.equalTo(CGSize(width: 24, height: 24))
-        }
-
-    }
-    
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-}

+ 1 - 0
Koala/Koala/Modular/Public/Model/PublicModel.swift

@@ -86,6 +86,7 @@ class KSymbolModel: BaseModel {
     var newPrice:String = "0"
     var timeList:[KSymbolTimeModel] = [KSymbolTimeModel]()
     var isCollection:Bool = false
+    var isSelect:Bool = false
     
     var data:[KSymbolKlineData] = [KSymbolKlineData]()
 

+ 21 - 0
Koala/Koala/Other/Assets.xcassets/Market/Market_W_Recommend_Hint.imageset/Contents.json

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

BIN
Koala/Koala/Other/Assets.xcassets/Market/Market_W_Recommend_Hint.imageset/no-data.png


+ 21 - 0
Koala/Koala/Other/Assets.xcassets/Market/Market_W_Screen.imageset/Contents.json

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

BIN
Koala/Koala/Other/Assets.xcassets/Market/Market_W_Screen.imageset/filter1.png


+ 21 - 0
Koala/Koala/Other/Assets.xcassets/Market/Market_W_Select.imageset/Contents.json

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

BIN
Koala/Koala/Other/Assets.xcassets/Market/Market_W_Select.imageset/check1.png


+ 21 - 0
Koala/Koala/Other/Assets.xcassets/Market/Market_W_unSelect.imageset/Contents.json

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

BIN
Koala/Koala/Other/Assets.xcassets/Market/Market_W_unSelect.imageset/check.png


+ 23 - 0
Koala/Koala/Other/Assets.xcassets/Market/Market_unCollection.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "filename" : "路径备份 4.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "路径备份 4@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "路径备份 4@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Koala/Koala/Other/Assets.xcassets/Market/Market_unCollection.imageset/路径备份 4.png


BIN
Koala/Koala/Other/Assets.xcassets/Market/Market_unCollection.imageset/路径备份 4@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Market/Market_unCollection.imageset/路径备份 4@3x.png