1
0

2 Commitit 98c48f3e83 ... dd4342094c

Tekijä SHA1 Viesti Päivämäärä
  刘千军 dd4342094c Merge branch 'main' of http://git.ddse.io:3000/tomy/JD_iOS into main 11 kuukautta sitten
  刘千军 e522d270e9 个人期权下单 11 kuukautta sitten
100 muutettua tiedostoa jossa 2549 lisäystä ja 18 poistoa
  1. 56 0
      Koala/Koala.xcodeproj/project.pbxproj
  2. 2 0
      Koala/Koala/FX/NetClass/URLS.swift
  3. 20 0
      Koala/Koala/Modular/Market/M/MarketModel.swift
  4. 198 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsOrderCell.swift
  5. 253 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsOrderCell.xib
  6. 149 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPeriodCell.swift
  7. 157 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPeriodCell.xib
  8. 79 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPeriodListCell.swift
  9. 95 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPeriodListCell.xib
  10. 151 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPriceCell.swift
  11. 177 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPriceCell.xib
  12. 116 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPrincipalCell.swift
  13. 159 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPrincipalCell.xib
  14. 157 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsRateCell.swift
  15. 167 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsRateCell.xib
  16. 85 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsTimerCell.swift
  17. 108 0
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsTimerCell.xib
  18. 188 6
      Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsView.swift
  19. 22 11
      Koala/Koala/Modular/Market/VC/MarketDetailViewController.swift
  20. 205 1
      Koala/Koala/Modular/Market/VM/MDOptionsViewModel.swift
  21. 5 0
      Koala/Koala/Modular/Public/Model/PublicModel.swift
  22. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_BNB.imageset/invalidName.png
  23. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_BNB.imageset/invalidName@2x.png
  24. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_BNB.imageset/invalidName@3x.png
  25. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_BTC.imageset/invalidName.png
  26. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_BTC.imageset/invalidName@2x.png
  27. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_BTC.imageset/invalidName@3x.png
  28. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_ETH.imageset/invalidName.png
  29. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_ETH.imageset/invalidName@2x.png
  30. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_ETH.imageset/invalidName@3x.png
  31. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_TRX.imageset/invalidName.png
  32. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_TRX.imageset/invalidName@2x.png
  33. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_TRX.imageset/invalidName@3x.png
  34. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDC.imageset/invalidName.png
  35. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDC.imageset/invalidName@2x.png
  36. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDC.imageset/invalidName@3x.png
  37. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDT.imageset/invalidName.png
  38. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDT.imageset/invalidName@2x.png
  39. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDT.imageset/invalidName@3x.png
  40. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Code.imageset/组 2287.png
  41. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Code.imageset/组 2287@2x.png
  42. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Code.imageset/组 2287@3x.png
  43. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Copy.imageset/invalidName.png
  44. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Copy.imageset/invalidName@2x.png
  45. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Copy.imageset/invalidName@3x.png
  46. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deal.imageset/2.png
  47. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deal.imageset/2@2x.png
  48. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deal.imageset/2@3x.png
  49. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Delete.imageset/invalidName.png
  50. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Delete.imageset/invalidName@2x.png
  51. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Delete.imageset/invalidName@3x.png
  52. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Copy.imageset/69.png
  53. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Copy.imageset/69@2x.png
  54. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Copy.imageset/69@3x.png
  55. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Record.imageset/56.png
  56. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Record.imageset/56@2x.png
  57. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Record.imageset/56@3x.png
  58. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Exchange.imageset/10.png
  59. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Exchange.imageset/10@2x.png
  60. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Exchange.imageset/10@3x.png
  61. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Finance.imageset/28.png
  62. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Finance.imageset/28@2x.png
  63. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Finance.imageset/28@3x.png
  64. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Hide_Small.imageset/减去 565.png
  65. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Hide_Small.imageset/减去 565@2x.png
  66. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Hide_Small.imageset/减去 565@3x.png
  67. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_In.imageset/2.png
  68. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_In.imageset/2@2x.png
  69. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_In.imageset/2@3x.png
  70. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Out.imageset/2.png
  71. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Out.imageset/2@2x.png
  72. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Out.imageset/2@3x.png
  73. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Proxy.imageset/28.png
  74. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Proxy.imageset/28@2x.png
  75. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Proxy.imageset/28@3x.png
  76. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Record.imageset/17.png
  77. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Record.imageset/17@2x.png
  78. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Record.imageset/17@3x.png
  79. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Screen.imageset/39.png
  80. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Screen.imageset/39@2x.png
  81. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Screen.imageset/39@3x.png
  82. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Select.imageset/6.png
  83. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Select.imageset/6@2x.png
  84. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Select.imageset/6@3x.png
  85. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Set.imageset/invalidName.png
  86. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Set.imageset/invalidName@2x.png
  87. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Set.imageset/invalidName@3x.png
  88. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Show.imageset/invalidName.png
  89. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Show.imageset/invalidName@2x.png
  90. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Show.imageset/invalidName@3x.png
  91. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_UnHide_Small.imageset/矩形 8703.png
  92. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_UnHide_Small.imageset/矩形 8703@2x.png
  93. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_UnHide_Small.imageset/矩形 8703@3x.png
  94. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Wallet.imageset/2.png
  95. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Wallet.imageset/2@2x.png
  96. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Wallet.imageset/2@3x.png
  97. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_unSelect.imageset/invalidName.png
  98. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_unSelect.imageset/invalidName@2x.png
  99. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_unSelect.imageset/invalidName@3x.png
  100. BIN
      Koala/Koala/Other/Assets.xcassets/Assets/jd_check.imageset/check.png

+ 56 - 0
Koala/Koala.xcodeproj/project.pbxproj

@@ -514,6 +514,20 @@
 		6C584E46295C7BB800CE1D2C /* BaseTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C584E45295C7BB800CE1D2C /* BaseTabBarController.swift */; };
 		6C584E4A295CA3DA00CE1D2C /* ModifyNicknameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C584E48295CA3DA00CE1D2C /* ModifyNicknameViewController.swift */; };
 		6C584E4B295CA3DB00CE1D2C /* ModifyNicknameViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C584E49295CA3DA00CE1D2C /* ModifyNicknameViewController.xib */; };
+		6C66AB682AE165E2005C471D /* MDOptionsPeriodCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C66AB662AE165E2005C471D /* MDOptionsPeriodCell.swift */; };
+		6C66AB692AE165E2005C471D /* MDOptionsPeriodCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C66AB672AE165E2005C471D /* MDOptionsPeriodCell.xib */; };
+		6C66AB6E2AE187FE005C471D /* MDOptionsPeriodListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C66AB6C2AE187FE005C471D /* MDOptionsPeriodListCell.swift */; };
+		6C66AB6F2AE187FE005C471D /* MDOptionsPeriodListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C66AB6D2AE187FE005C471D /* MDOptionsPeriodListCell.xib */; };
+		6C66AB722AE3A3C4005C471D /* MDOptionsRateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C66AB702AE3A3C4005C471D /* MDOptionsRateCell.swift */; };
+		6C66AB732AE3A3C4005C471D /* MDOptionsRateCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C66AB712AE3A3C4005C471D /* MDOptionsRateCell.xib */; };
+		6C66AB762AE3C157005C471D /* MDOptionsPrincipalCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C66AB742AE3C157005C471D /* MDOptionsPrincipalCell.swift */; };
+		6C66AB772AE3C157005C471D /* MDOptionsPrincipalCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C66AB752AE3C157005C471D /* MDOptionsPrincipalCell.xib */; };
+		6C66AB7B2AE3DD81005C471D /* MDOptionsPriceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C66AB792AE3DD81005C471D /* MDOptionsPriceCell.swift */; };
+		6C66AB7C2AE3DD81005C471D /* MDOptionsPriceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C66AB7A2AE3DD81005C471D /* MDOptionsPriceCell.xib */; };
+		6C66AB7F2AE3ED85005C471D /* MDOptionsTimerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C66AB7D2AE3ED85005C471D /* MDOptionsTimerCell.swift */; };
+		6C66AB802AE3ED85005C471D /* MDOptionsTimerCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C66AB7E2AE3ED85005C471D /* MDOptionsTimerCell.xib */; };
+		6C66AB832AE3F15F005C471D /* MDOptionsOrderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C66AB812AE3F15F005C471D /* MDOptionsOrderCell.swift */; };
+		6C66AB842AE3F15F005C471D /* MDOptionsOrderCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C66AB822AE3F15F005C471D /* MDOptionsOrderCell.xib */; };
 		6C6B7DA3296AF77500067FA3 /* HomeHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C6B7DA2296AF77500067FA3 /* HomeHeaderView.xib */; };
 		6C6B7DA7296B06BB00067FA3 /* HomeInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C6B7DA5296B06BB00067FA3 /* HomeInfoCell.swift */; };
 		6C6B7DA8296B06BB00067FA3 /* HomeInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6C6B7DA6296B06BB00067FA3 /* HomeInfoCell.xib */; };
@@ -1354,6 +1368,20 @@
 		6C584E45295C7BB800CE1D2C /* BaseTabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseTabBarController.swift; sourceTree = "<group>"; };
 		6C584E48295CA3DA00CE1D2C /* ModifyNicknameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyNicknameViewController.swift; sourceTree = "<group>"; };
 		6C584E49295CA3DA00CE1D2C /* ModifyNicknameViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ModifyNicknameViewController.xib; sourceTree = "<group>"; };
+		6C66AB662AE165E2005C471D /* MDOptionsPeriodCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsPeriodCell.swift; sourceTree = "<group>"; };
+		6C66AB672AE165E2005C471D /* MDOptionsPeriodCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDOptionsPeriodCell.xib; sourceTree = "<group>"; };
+		6C66AB6C2AE187FE005C471D /* MDOptionsPeriodListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsPeriodListCell.swift; sourceTree = "<group>"; };
+		6C66AB6D2AE187FE005C471D /* MDOptionsPeriodListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDOptionsPeriodListCell.xib; sourceTree = "<group>"; };
+		6C66AB702AE3A3C4005C471D /* MDOptionsRateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsRateCell.swift; sourceTree = "<group>"; };
+		6C66AB712AE3A3C4005C471D /* MDOptionsRateCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDOptionsRateCell.xib; sourceTree = "<group>"; };
+		6C66AB742AE3C157005C471D /* MDOptionsPrincipalCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsPrincipalCell.swift; sourceTree = "<group>"; };
+		6C66AB752AE3C157005C471D /* MDOptionsPrincipalCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDOptionsPrincipalCell.xib; sourceTree = "<group>"; };
+		6C66AB792AE3DD81005C471D /* MDOptionsPriceCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsPriceCell.swift; sourceTree = "<group>"; };
+		6C66AB7A2AE3DD81005C471D /* MDOptionsPriceCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDOptionsPriceCell.xib; sourceTree = "<group>"; };
+		6C66AB7D2AE3ED85005C471D /* MDOptionsTimerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsTimerCell.swift; sourceTree = "<group>"; };
+		6C66AB7E2AE3ED85005C471D /* MDOptionsTimerCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDOptionsTimerCell.xib; sourceTree = "<group>"; };
+		6C66AB812AE3F15F005C471D /* MDOptionsOrderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDOptionsOrderCell.swift; sourceTree = "<group>"; };
+		6C66AB822AE3F15F005C471D /* MDOptionsOrderCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MDOptionsOrderCell.xib; sourceTree = "<group>"; };
 		6C6B7DA2296AF77500067FA3 /* HomeHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeHeaderView.xib; sourceTree = "<group>"; };
 		6C6B7DA5296B06BB00067FA3 /* HomeInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeInfoCell.swift; sourceTree = "<group>"; };
 		6C6B7DA6296B06BB00067FA3 /* HomeInfoCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeInfoCell.xib; sourceTree = "<group>"; };
@@ -3506,6 +3534,20 @@
 			isa = PBXGroup;
 			children = (
 				6CBB62DE2AD828C20045A4C9 /* MDOptionsView.swift */,
+				6C66AB662AE165E2005C471D /* MDOptionsPeriodCell.swift */,
+				6C66AB672AE165E2005C471D /* MDOptionsPeriodCell.xib */,
+				6C66AB6C2AE187FE005C471D /* MDOptionsPeriodListCell.swift */,
+				6C66AB6D2AE187FE005C471D /* MDOptionsPeriodListCell.xib */,
+				6C66AB702AE3A3C4005C471D /* MDOptionsRateCell.swift */,
+				6C66AB712AE3A3C4005C471D /* MDOptionsRateCell.xib */,
+				6C66AB742AE3C157005C471D /* MDOptionsPrincipalCell.swift */,
+				6C66AB752AE3C157005C471D /* MDOptionsPrincipalCell.xib */,
+				6C66AB792AE3DD81005C471D /* MDOptionsPriceCell.swift */,
+				6C66AB7A2AE3DD81005C471D /* MDOptionsPriceCell.xib */,
+				6C66AB7D2AE3ED85005C471D /* MDOptionsTimerCell.swift */,
+				6C66AB7E2AE3ED85005C471D /* MDOptionsTimerCell.xib */,
+				6C66AB812AE3F15F005C471D /* MDOptionsOrderCell.swift */,
+				6C66AB822AE3F15F005C471D /* MDOptionsOrderCell.xib */,
 			);
 			path = MDOptionsView;
 			sourceTree = "<group>";
@@ -3924,6 +3966,7 @@
 				6C7A1AE529F57859004CFBE3 /* PositionHistoryDatePopView.xib in Resources */,
 				6C4AFB2029A2249F00508EA7 /* PositionHistoryCell.xib in Resources */,
 				6CC802222993EB5900C36373 /* AssetsFinanceCell.xib in Resources */,
+				6C66AB772AE3C157005C471D /* MDOptionsPrincipalCell.xib in Resources */,
 				6C50AB692A0934EE00699557 /* AFiatDepositsVerifyViewController.xib in Resources */,
 				6C2FFCC3296182E3005B8180 /* FreezeAccountCell.xib in Resources */,
 				6CA7130C2956F2E30047F450 /* MineHeaderViewCell.xib in Resources */,
@@ -3972,6 +4015,7 @@
 				6C2EAD8029E3110800E03AF8 /* AInvestNowViewController.xib in Resources */,
 				6CC37FF32990FF270079FA5C /* AssetsTotalAccountListCell.xib in Resources */,
 				6C7A1AFB29FC1A26004CFBE3 /* PHistoryFooterView.xib in Resources */,
+				6C66AB842AE3F15F005C471D /* MDOptionsOrderCell.xib in Resources */,
 				6C4AFB3F29A7CB2C00508EA7 /* MessageCell.xib in Resources */,
 				6CC37FCB298EC1AD0079FA5C /* DealClosedPopView.xib in Resources */,
 				6CA7134929588B290047F450 /* RegisterCell.xib in Resources */,
@@ -4030,9 +4074,11 @@
 				6C00A880242D8FEB00CE9ADB /* Assets.xcassets in Resources */,
 				6CDC5B1729D081A700E60730 /* AssetsProxyHeaderView.xib in Resources */,
 				6C10F0F429DB08D900B79491 /* updateAPP110.png in Resources */,
+				6C66AB6F2AE187FE005C471D /* MDOptionsPeriodListCell.xib in Resources */,
 				6CC802282994067600C36373 /* AssetsProxyInfoCell.xib in Resources */,
 				6C10F11329E19A9400B79491 /* AssetsProxyTransferViewController.xib in Resources */,
 				6CA713072956ECD50047F450 /* MineHeaderView.xib in Resources */,
+				6C66AB802AE3ED85005C471D /* MDOptionsTimerCell.xib in Resources */,
 				6CBB633B2ADD7BD70045A4C9 /* MSHListCell.xib in Resources */,
 				6C50AB5A2A03E4FA00699557 /* DealSimplenessCell.xib in Resources */,
 				6C50AB652A08097D00699557 /* RevokeWithdrawCashPopView.xib in Resources */,
@@ -4079,6 +4125,7 @@
 				6C10F0EE29DB08D900B79491 /* updateAPP062.png in Resources */,
 				6C4AFB1829A1414C00508EA7 /* HoldModificationPopView.xib in Resources */,
 				6CC37FF7299210880079FA5C /* AssetsSavingsCell.xib in Resources */,
+				6C66AB692AE165E2005C471D /* MDOptionsPeriodCell.xib in Resources */,
 				6CDC5B0829CF17EC00E60730 /* AHistoryDetaisHeaderView.xib in Resources */,
 				6C35369529816138003BB632 /* DealNavView.xib in Resources */,
 				6C10F0D229DB08D900B79491 /* updateAPP032.png in Resources */,
@@ -4099,6 +4146,7 @@
 				6C10F0EF29DB08D900B79491 /* updateAPP048.png in Resources */,
 				6C86531E29BB706900A2E7FB /* AssetsFinanceListCell.xib in Resources */,
 				6C86530C29B4769000A2E7FB /* TDOrderHeaderView.xib in Resources */,
+				6C66AB7C2AE3DD81005C471D /* MDOptionsPriceCell.xib in Resources */,
 				6CD200BC29E8447C00F0966D /* AWalletRecordListCell.xib in Resources */,
 				6C2FFCC92961A79C005B8180 /* KTradingPasswordsPopView.xib in Resources */,
 				6C10F10F29E195E500B79491 /* AProxyCodePopView.xib in Resources */,
@@ -4112,6 +4160,7 @@
 				6C10F0ED29DB08D900B79491 /* updateAPP076.png in Resources */,
 				6C7A1ADA29F3D46F004CFBE3 /* APaymentMethodSelectViewController.xib in Resources */,
 				6C10F0E329DB08D900B79491 /* updateAPP118.png in Resources */,
+				6C66AB732AE3A3C4005C471D /* MDOptionsRateCell.xib in Resources */,
 				6CDC5AFB29CDFBFD00E60730 /* FlashHistoryRecordCell.xib in Resources */,
 				6C10F0D629DB08D900B79491 /* updateAPP042.png in Resources */,
 				6C00A9482432F1A500CE9ADB /* CodeScan.bundle in Resources */,
@@ -4279,6 +4328,7 @@
 				6C3717DE29AA52D8000DDD8B /* TalentDetailsView.swift in Sources */,
 				6C00A90B242D918D00CE9ADB /* OperationalSkinData.swift in Sources */,
 				6C2FFCAA29608447005B8180 /* AsunBasicAttributes.swift in Sources */,
+				6C66AB682AE165E2005C471D /* MDOptionsPeriodCell.swift in Sources */,
 				6C4AFB0029A0FF9B00508EA7 /* HoldView.swift in Sources */,
 				6C2FFCBA29618239005B8180 /* FreezeAccountViewController.swift in Sources */,
 				6CBB62D92AD828440045A4C9 /* MDProfileView.swift in Sources */,
@@ -4367,6 +4417,7 @@
 				6C35369129815FD7003BB632 /* DealViewModel.swift in Sources */,
 				6CBB63462ADEC1D40045A4C9 /* MDPIndustryCell.swift in Sources */,
 				6CDC5B0B29CFE63E00E60730 /* FiatDepositsRecordCell.swift in Sources */,
+				6C66AB832AE3F15F005C471D /* MDOptionsOrderCell.swift in Sources */,
 				6CC37FF6299210870079FA5C /* AssetsSavingsCell.swift in Sources */,
 				6C86530A29B4767000A2E7FB /* TDOrderHeaderView.swift in Sources */,
 				6C2FFCAC29608447005B8180 /* CodeView.swift in Sources */,
@@ -4506,6 +4557,7 @@
 				6CBB62D72AD828170045A4C9 /* MDFinanceView.swift in Sources */,
 				6C7F446A29556B2600DC6771 /* BaseViewModel.swift in Sources */,
 				04C2831C2AD69C3F00FC04AC /* JDMineUserInfoViewController.swift in Sources */,
+				6C66AB7B2AE3DD81005C471D /* MDOptionsPriceCell.swift in Sources */,
 				04CEE2722AB4311F00FAA760 /* JDTradeAccountModel.swift in Sources */,
 				6CA7133D29587BE10047F450 /* CountrySelectCell.swift in Sources */,
 				6CC37FDA298FAFE30079FA5C /* AssetsSavingsView.swift in Sources */,
@@ -4563,6 +4615,7 @@
 				6CC37FEE298FF87D0079FA5C /* AssetsModel.swift in Sources */,
 				6CC37FD8298FAFD00079FA5C /* AssetsTotalView.swift in Sources */,
 				041D4EFF2AC3FD6F008ABDF7 /* JDWorkOrderModel.swift in Sources */,
+				6C66AB6E2AE187FE005C471D /* MDOptionsPeriodListCell.swift in Sources */,
 				6C00A90E242D918D00CE9ADB /* ProjectPrivateMacro.swift in Sources */,
 				6C00A91E242D918D00CE9ADB /* BaseTableView.swift in Sources */,
 				04D38E6E2A9EE8A10047EF9C /* JXSegmentedIndicatorDoubleLineView.swift in Sources */,
@@ -4593,6 +4646,7 @@
 				04B46A912AD7D3BC00421177 /* JDMineModifyGenderViewController.swift in Sources */,
 				6CDC5B1A29D08CA600E60730 /* AssetsProxyListCell.swift in Sources */,
 				6C4AFAE9299E870400508EA7 /* AFiatWithdrawalsListCell.swift in Sources */,
+				6C66AB762AE3C157005C471D /* MDOptionsPrincipalCell.swift in Sources */,
 				6CDC5AEF29CC9C7600E60730 /* AFiatDepositsPayWayPopView.swift in Sources */,
 				04CEE2892AB9282C00FAA760 /* InformationMarketViewController.swift in Sources */,
 				04D38E7B2A9EE8A10047EF9C /* JXSegmentedTitleGradientItemModel.swift in Sources */,
@@ -4672,6 +4726,7 @@
 				6C00A8F4242D918D00CE9ADB /* ESTabBarItemMoreContentView.swift in Sources */,
 				6C00A913242D918D00CE9ADB /* ProjectPrivateMethod.swift in Sources */,
 				6C7A1AD929F3D46F004CFBE3 /* APaymentMethodSelectViewController.swift in Sources */,
+				6C66AB722AE3A3C4005C471D /* MDOptionsRateCell.swift in Sources */,
 				04D38EC92AB29F370047EF9C /* JDKLineBuySellListCell.swift in Sources */,
 				6C3717E029AA52EF000DDD8B /* TalentDetailsViewModel.swift in Sources */,
 				6CA7134829588B290047F450 /* RegisterCell.swift in Sources */,
@@ -4681,6 +4736,7 @@
 				6C0C499E295F2826000BFEEB /* BindAccountViewController.swift in Sources */,
 				6C4AFADC299D2B5E00508EA7 /* AFiatDepositsListCell.swift in Sources */,
 				04D38E5E2A9EE8A10047EF9C /* JXSegmentedBaseDataSource.swift in Sources */,
+				6C66AB7F2AE3ED85005C471D /* MDOptionsTimerCell.swift in Sources */,
 				6C031B1F2962C4DA0043BECF /* RealNameFileCell.swift in Sources */,
 				04282A3C2ADD049700CB4260 /* JDRegisterView.swift in Sources */,
 				6CD200B629E7099800F0966D /* ASavingsDetailsScreenPopView.swift in Sources */,

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

@@ -221,6 +221,8 @@ let netForGetPriceDepth = "Public/getPriceDepth"//深度
 
 let netForGetProductHotList = "Public/getProductHotList"//热门交易对
 
+let netForInsertOptionOrder = "insertOptionOrder"//下单申请
+
 
 
 /* ********************* 极度 **********************/

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

@@ -84,7 +84,11 @@ class OptionsListModel: BaseModel {
     var count_12m:Int = 0
     var count_3m:Int = 0
     var price_2m_list:String = ""
+    var price_4m_list:String = ""
+    var price_5m_list:String = ""
     var insert_datetime:String = ""
+    var rule_list:String = ""
+    var type_list:String = ""
     
     var symbolData:KSymbolModel = KSymbolModel()
 
@@ -288,4 +292,20 @@ class MDStructListModel: BaseModel {
 
 }
 
+class MDPeriodModel: BaseModel {
+    var timer:String = ""
+    var timerData:Int = 0
+    var averageRate:String = ""
+    var nominalRate:String = ""
+    var isAverageSelect:Bool = false
+    var isNominalSelect:Bool = false
+    var nominalStandard:String = ""
+    var averageStandard:String = ""
+    var nominalType:String = ""
+    var averageType:String = ""
+    var nominalRule:String = ""
+    var averageRule:String = ""
+    
+}
+
 

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

@@ -0,0 +1,198 @@
+//
+//  MDOptionsOrderCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/21.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsOrderCell: BaseTableViewCell {
+
+    @IBOutlet weak var imgView: UIImageView!
+    @IBOutlet weak var titleLab: UILabel!
+    
+    @IBOutlet weak var value1Lab: UILabel!
+    @IBOutlet weak var value2Lab: UILabel!
+    @IBOutlet weak var value3Lab: UILabel!
+    @IBOutlet weak var value4Lab: UILabel!
+    @IBOutlet weak var value5Lab: UILabel!
+    @IBOutlet weak var value6Lab: UILabel!
+    @IBOutlet weak var value7Lab: UILabel!
+    @IBOutlet weak var value8Lab: UILabel!
+    
+    @IBOutlet weak var usableBgView: UIView!
+    @IBOutlet weak var usableTitleLab: UILabel!
+    @IBOutlet weak var usableLab: UILabel!
+    
+    @IBOutlet weak var optionsBgView: UIView!
+    @IBOutlet weak var optionseTitleLab: UILabel!
+    @IBOutlet weak var optionsLab: UILabel!
+    
+    
+    
+    @IBOutlet weak var orderBtn: UIButton!
+    
+    var VM:MDOptionsViewModel = MDOptionsViewModel()
+    var completeBlock:(() -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ALLBackGroundColor
+        self.imgView.image = _image("Market_W_Order_Bg&Market_W_Order_Bg")
+        
+        self.titleLab.text = switchLanguage("您的购买计划")
+        self.titleLab.textColor = MainBackGroundColor
+        self.titleLab.setTextFont(.PFSM, 14)
+        
+        self.value1Lab.setTextFont(.PFSR, 10)
+        self.value1Lab.textColor = GrayTextColor
+      
+        
+        self.value2Lab.setTextFont(.PFSR, 10)
+        self.value2Lab.textColor = GrayTextColor
+        
+        self.value3Lab.setTextFont(.PFSR, 10)
+        self.value3Lab.textColor = GrayTextColor
+        
+        self.value4Lab.setTextFont(.PFSR, 10)
+        self.value4Lab.textColor = GrayTextColor
+        
+        self.value5Lab.setTextFont(.PFSR, 10)
+        self.value5Lab.textColor = GrayTextColor
+        
+        self.value6Lab.setTextFont(.PFSR, 10)
+        self.value6Lab.textColor = GrayTextColor
+        
+        self.value7Lab.setTextFont(.PFSR, 10)
+        self.value7Lab.textColor = GrayTextColor
+        
+        self.value8Lab.setTextFont(.PFSR, 10)
+        self.value8Lab.textColor = GrayTextColor
+        
+        
+        self.usableTitleLab.text = switchLanguage("USD钱包可用")
+        self.usableTitleLab.setTextFont(.PFSR, 14)
+        self.usableTitleLab.textColor = GrayTextColor
+        
+        self.usableLab.text = ""
+        self.usableLab.textColor = TitleTextColor
+        self.usableLab.setTextFont(.PFSM, 14)
+        
+        self.optionseTitleLab.text = switchLanguage("上限期权费")
+        self.optionseTitleLab.setTextFont(.PFSR, 14)
+        self.optionseTitleLab.textColor = GrayTextColor
+        
+        self.optionsLab.text = ""
+        self.optionsLab.textColor = MainBackGroundColor
+        self.optionsLab.setTextFont(.PFSM, 14)
+        
+        
+        self.orderBtn.backgroundColor = MainBackGroundColor
+        self.orderBtn.setTitle(switchLanguage("提交下单申请"), for: .normal)
+        self.orderBtn.setTitleColor(WhiteTextColor, for: .normal)
+        self.orderBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        self.orderBtn.setTextFont(.PFSR, 14)
+        self.orderBtn.addTarget(self, action: #selector(clickOrderBtnAction), for: .touchUpInside)
+        
+        
+    }
+    
+    
+    
+    
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    
+    func updateCellWith(vm:MDOptionsViewModel) -> Void {
+        self.VM = vm
+        
+        let model = vm.selectPeriodModel
+        
+        vm.cycle = model.timerData
+        var rate:CGFloat = 0
+        var rateName:String = ""
+     
+        if (model.isAverageSelect){
+            rate = conerData(model.averageRate, .MyCGFloat).4!/100
+            rateName = switchLanguage("平值")
+            vm.rule = model.averageRule
+            vm.type = model.averageType
+            vm.standard = model.averageStandard
+        }
+        if (model.isNominalSelect){
+            rate = conerData(model.nominalRate, .MyCGFloat).4!/100
+            rateName =  switchLanguage("虚值") + model.nominalStandard
+          
+            vm.rule = model.nominalRule
+            vm.type = model.nominalType
+            vm.standard = model.nominalStandard
+        }
+        
+        
+        self.updateLayer(lab: self.value1Lab, title: switchLanguage("期权标的"), value: vm.optionsListModel.title)
+        
+        self.updateLayer(lab: self.value2Lab, title: switchLanguage("时间周期"), value:model.timer)
+        
+        self.updateLayer(lab: self.value3Lab, title: switchLanguage("名义本金"), value:"$"+"\(vm.principal)"+switchLanguage("万"))
+        
+        self.updateLayer(lab: self.value4Lab, title: switchLanguage("预估期权费"), value:"$"+precisionString(with: "\(rate*vm.principal*10000)", precision: "2"))
+        
+        self.updateLayer(lab: self.value5Lab, title: switchLanguage("最大损失"), value:"$"+precisionString(with: "\((vm.capRates/100)*vm.principal*10000)", precision: "2"))
+        
+        
+       
+        self.updateLayer(lab: self.value6Lab, title: switchLanguage("踢出规则"), value:vm.rule)
+        
+        self.updateLayer(lab: self.value7Lab, title: switchLanguage("期权类型"), value:vm.type)
+        
+        self.updateLayer(lab: self.value8Lab, title: switchLanguage("期权结果"), value:rateName)
+        
+        
+        if OperationalUserInfoData.getLogin(){
+            self.usableBgView.isHidden = false
+            self.usableLab.text = vm.cashModel.balance + " USD"
+        }else{
+            self.usableBgView.isHidden = true
+        }
+        
+        if vm.capRates > 0 {
+            self.optionsBgView.isHidden = false
+            self.optionsLab.text = precisionString(with: "\((vm.capRates/100)*vm.principal*10000)", precision: "2") + " USD"
+        }else{
+            self.optionsBgView.isHidden = true
+        }
+        
+    }
+    
+    
+}
+
+
+extension MDOptionsOrderCell{
+    
+    @objc func clickOrderBtnAction(){
+        if OperationalUserInfoData.getLogin(){
+            self.VM.netInsertOptionOrder()
+        }else{
+            currentVc()?.navigationController?.pushViewController(LoginViewController(), animated: true)
+        }
+       
+    }
+    
+    func updateLayer(lab:UILabel,title:String,value:String) ->Void {
+        let text = title + "  " + value
+        let att = NSMutableAttributedString.init(string:text,attributes: [NSAttributedString.Key.foregroundColor: LightTextColor,NSAttributedString.Key.font:_PFSR(10)])
+        let range1 = (text as NSString).range(of: value)
+        att.addAttributes([NSAttributedString.Key.foregroundColor: WhiteTextColor,NSAttributedString.Key.font:_PFSR(12)], range: range1)
+        
+        lab.attributedText = att
+    }
+    
+}

+ 253 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsOrderCell.xib

@@ -0,0 +1,253 @@
+<?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="489" id="KGk-i7-Jjw" customClass="MDOptionsOrderCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="606" height="489"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="606" height="489"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="0ci-5Z-Pgb">
+                        <rect key="frame" x="20" y="10" width="566" height="449"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mzC-aC-pBG">
+                                <rect key="frame" x="0.0" y="0.0" width="566" height="276.33333333333331"/>
+                                <subviews>
+                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="B0v-Sn-cr5">
+                                        <rect key="frame" x="0.0" y="0.0" width="566" height="276.33333333333331"/>
+                                    </imageView>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qmi-fh-Ati">
+                                        <rect key="frame" x="262.33333333333331" y="18" width="41.333333333333314" height="20.333333333333329"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Hci-TR-nLn">
+                                        <rect key="frame" x="15" y="150" width="536" height="111.33333333333331"/>
+                                        <subviews>
+                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0QI-fr-qyQ">
+                                                <rect key="frame" x="0.0" y="0.0" width="536" 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="n9c-9t-jnB">
+                                                        <rect key="frame" x="0.0" y="0.0" width="268" 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="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a6p-9c-c4m">
+                                                        <rect key="frame" x="268" y="0.0" width="268" height="20.333333333333332"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="a6p-9c-c4m" firstAttribute="width" secondItem="n9c-9t-jnB" secondAttribute="width" id="GId-6F-CIa"/>
+                                                </constraints>
+                                            </stackView>
+                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Yr-XO-VlO">
+                                                <rect key="frame" x="0.0" y="30.333333333333343" width="536" 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="SNM-Xp-dZc">
+                                                        <rect key="frame" x="0.0" y="0.0" width="268" 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="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9lw-eD-T7Q">
+                                                        <rect key="frame" x="268" y="0.0" width="268" height="20.333333333333332"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="9lw-eD-T7Q" firstAttribute="width" secondItem="SNM-Xp-dZc" secondAttribute="width" id="eAa-bq-e1Q"/>
+                                                </constraints>
+                                            </stackView>
+                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="epf-Jo-DEd">
+                                                <rect key="frame" x="0.0" y="60.666666666666664" width="536" height="20.333333333333336"/>
+                                                <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="z7O-PP-XAV">
+                                                        <rect key="frame" x="0.0" y="0.0" width="268" 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="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wmf-G5-Q1d">
+                                                        <rect key="frame" x="268" y="0.0" width="268" height="20.333333333333332"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="Wmf-G5-Q1d" firstAttribute="width" secondItem="z7O-PP-XAV" secondAttribute="width" id="l6B-hs-cdw"/>
+                                                </constraints>
+                                            </stackView>
+                                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zYb-R1-VAb">
+                                                <rect key="frame" x="0.0" y="91" width="536" 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="znp-ry-mDx">
+                                                        <rect key="frame" x="0.0" y="0.0" width="268" 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="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hCd-rE-gdF">
+                                                        <rect key="frame" x="268" y="0.0" width="268" height="20.333333333333332"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="hCd-rE-gdF" firstAttribute="width" secondItem="znp-ry-mDx" secondAttribute="width" id="cHI-Ui-AnA"/>
+                                                </constraints>
+                                            </stackView>
+                                        </subviews>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="B0v-Sn-cr5" secondAttribute="trailing" id="5WU-ll-HRB"/>
+                                    <constraint firstItem="B0v-Sn-cr5" firstAttribute="top" secondItem="mzC-aC-pBG" secondAttribute="top" id="7Eo-eu-3d5"/>
+                                    <constraint firstAttribute="bottom" secondItem="Hci-TR-nLn" secondAttribute="bottom" constant="15" id="UTX-NW-pBs"/>
+                                    <constraint firstAttribute="trailing" secondItem="Hci-TR-nLn" secondAttribute="trailing" constant="15" id="Y6J-dt-zNX"/>
+                                    <constraint firstItem="qmi-fh-Ati" firstAttribute="top" secondItem="mzC-aC-pBG" secondAttribute="top" constant="18" id="az9-mu-oBG"/>
+                                    <constraint firstItem="B0v-Sn-cr5" firstAttribute="leading" secondItem="mzC-aC-pBG" secondAttribute="leading" id="dbK-cs-R8g"/>
+                                    <constraint firstItem="Hci-TR-nLn" firstAttribute="leading" secondItem="mzC-aC-pBG" secondAttribute="leading" constant="15" id="eWU-LZ-FZr"/>
+                                    <constraint firstItem="qmi-fh-Ati" firstAttribute="centerX" secondItem="mzC-aC-pBG" secondAttribute="centerX" id="liV-kA-2Tc"/>
+                                    <constraint firstAttribute="bottom" secondItem="B0v-Sn-cr5" secondAttribute="bottom" id="oDA-qJ-ls9"/>
+                                    <constraint firstAttribute="width" secondItem="mzC-aC-pBG" secondAttribute="height" multiplier="340:166" id="tQv-aL-Eil"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9iW-N7-ga6">
+                                <rect key="frame" x="0.0" y="286.33333333333331" width="566" height="30"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="epi-1w-QUV">
+                                        <rect key="frame" x="0.0" y="0.0" width="566" height="30"/>
+                                        <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="CpB-XE-o9s">
+                                                <rect key="frame" x="0.0" y="0.0" width="283" height="30"/>
+                                                <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="QGa-yy-0Mu">
+                                                <rect key="frame" x="283" y="0.0" width="283" height="30"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="QGa-yy-0Mu" firstAttribute="width" secondItem="CpB-XE-o9s" secondAttribute="width" id="xKj-w4-Vb7"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="epi-1w-QUV" secondAttribute="trailing" id="7qg-qM-v8p"/>
+                                    <constraint firstAttribute="height" constant="30" id="9eq-e4-0Qc"/>
+                                    <constraint firstItem="epi-1w-QUV" firstAttribute="top" secondItem="9iW-N7-ga6" secondAttribute="top" id="VHc-fk-Dh7"/>
+                                    <constraint firstItem="epi-1w-QUV" firstAttribute="leading" secondItem="9iW-N7-ga6" secondAttribute="leading" id="n8l-Jc-Ngt"/>
+                                    <constraint firstAttribute="bottom" secondItem="epi-1w-QUV" secondAttribute="bottom" id="xhm-iF-rZW"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Iu-Iu-HeP">
+                                <rect key="frame" x="0.0" y="326.33333333333331" width="566" height="30"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3t5-93-I9B">
+                                        <rect key="frame" x="0.0" y="0.0" width="566" height="30"/>
+                                        <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="1hp-K9-RRm">
+                                                <rect key="frame" x="0.0" y="0.0" width="283" height="30"/>
+                                                <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="V21-pK-UEA">
+                                                <rect key="frame" x="283" y="0.0" width="283" height="30"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="V21-pK-UEA" firstAttribute="width" secondItem="1hp-K9-RRm" secondAttribute="width" id="uMm-AL-paN"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="3t5-93-I9B" firstAttribute="leading" secondItem="0Iu-Iu-HeP" secondAttribute="leading" id="F0e-lr-zUh"/>
+                                    <constraint firstAttribute="trailing" secondItem="3t5-93-I9B" secondAttribute="trailing" id="UZL-G2-7Yk"/>
+                                    <constraint firstAttribute="bottom" secondItem="3t5-93-I9B" secondAttribute="bottom" id="XxJ-jG-Nde"/>
+                                    <constraint firstAttribute="height" constant="30" id="dVf-AW-NWe"/>
+                                    <constraint firstItem="3t5-93-I9B" firstAttribute="top" secondItem="0Iu-Iu-HeP" secondAttribute="top" id="i3N-vs-uku"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Igu-0J-6rc">
+                                <rect key="frame" x="0.0" y="366.33333333333331" width="566" height="82.666666666666686"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RP2-M9-PC1">
+                                        <rect key="frame" x="0.0" y="10" width="566" height="40"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="40" id="BRu-48-Wfc"/>
+                                        </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="RP2-M9-PC1" secondAttribute="bottom" constant="10" id="8aR-dD-sg2"/>
+                                    <constraint firstItem="RP2-M9-PC1" firstAttribute="top" secondItem="Igu-0J-6rc" secondAttribute="top" constant="10" id="IS7-cJ-mAj"/>
+                                    <constraint firstItem="RP2-M9-PC1" firstAttribute="leading" secondItem="Igu-0J-6rc" secondAttribute="leading" id="Ycv-lS-mlX"/>
+                                    <constraint firstAttribute="trailing" secondItem="RP2-M9-PC1" secondAttribute="trailing" id="tXP-2t-i7n"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="0ci-5Z-Pgb" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="93X-e9-yf5"/>
+                    <constraint firstAttribute="trailing" secondItem="0ci-5Z-Pgb" secondAttribute="trailing" constant="20" id="C3O-bc-NaP"/>
+                    <constraint firstItem="0ci-5Z-Pgb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="T9P-0l-sPz"/>
+                    <constraint firstAttribute="bottom" secondItem="0ci-5Z-Pgb" secondAttribute="bottom" constant="30" id="Ytu-9S-Sd9"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="imgView" destination="B0v-Sn-cr5" id="DWz-V1-2k1"/>
+                <outlet property="optionsBgView" destination="0Iu-Iu-HeP" id="uUA-fP-Ehr"/>
+                <outlet property="optionsLab" destination="V21-pK-UEA" id="m8F-Cl-Y89"/>
+                <outlet property="optionseTitleLab" destination="1hp-K9-RRm" id="VIn-CL-SO6"/>
+                <outlet property="orderBtn" destination="RP2-M9-PC1" id="VRF-UG-xLo"/>
+                <outlet property="titleLab" destination="qmi-fh-Ati" id="4ys-Vh-wuK"/>
+                <outlet property="usableBgView" destination="9iW-N7-ga6" id="VZc-NR-SEr"/>
+                <outlet property="usableLab" destination="QGa-yy-0Mu" id="5JG-cb-Zh9"/>
+                <outlet property="usableTitleLab" destination="CpB-XE-o9s" id="tlo-K1-z5z"/>
+                <outlet property="value1Lab" destination="n9c-9t-jnB" id="DMw-gx-4if"/>
+                <outlet property="value2Lab" destination="a6p-9c-c4m" id="p6G-2k-mXL"/>
+                <outlet property="value3Lab" destination="SNM-Xp-dZc" id="bcC-f4-TKE"/>
+                <outlet property="value4Lab" destination="9lw-eD-T7Q" id="MD3-Of-l9o"/>
+                <outlet property="value5Lab" destination="z7O-PP-XAV" id="ZoN-Qe-GRp"/>
+                <outlet property="value6Lab" destination="Wmf-G5-Q1d" id="3gM-Ev-fEq"/>
+                <outlet property="value7Lab" destination="znp-ry-mDx" id="HMg-aw-Auv"/>
+                <outlet property="value8Lab" destination="hCd-rE-gdF" id="oni-SN-Ilc"/>
+            </connections>
+            <point key="canvasLocation" x="224.42748091603053" y="147.53521126760563"/>
+        </tableViewCell>
+    </objects>
+</document>

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

@@ -0,0 +1,149 @@
+//
+//  MDOptionsPeriodCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/19.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsPeriodCell: BaseTableViewCell {
+    @IBOutlet weak var titleLab: UILabel!
+    @IBOutlet weak var hintImgView: UIImageView!
+    @IBOutlet weak var hintLab: UILabel!
+    @IBOutlet weak var hintBgView: UIView!
+    @IBOutlet weak var leftLab: UILabel!
+    @IBOutlet weak var centerLab: UILabel!
+    @IBOutlet weak var rightLab: UILabel!
+
+    @IBOutlet weak var tableView: UITableView!
+    
+    var VM:MDOptionsViewModel = MDOptionsViewModel()
+    
+    var completeBlock:(() -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+       
+        self.backgroundColor = ALLBackGroundColor
+        self.titleLab.text = switchLanguage("1、请选择时间周期与对应费率")
+        self.setTextFont(.PFSM, 18)
+        self.titleLab.textColor = TitleTextColor
+        
+        self.hintBgView.backgroundColor = ViewBorderColor
+        self.hintBgView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        
+        self.hintImgView.image = _image("Base_W_Hint&Base_W_Hint")
+        
+        self.hintLab.text = switchLanguage("105结构:标的上涨大于5%时开始产生内在价值")
+        self.hintLab.textColor = MidTextColor
+        self.hintLab.setTextFont(.PFSR, 12)
+        
+        self.leftLab.text = switchLanguage("时间周期")
+        self.leftLab.textColor = LightTextColor
+        self.leftLab.setTextFont(.PFSR, 14)
+        
+        self.centerLab.text = switchLanguage("平均费率")
+        self.centerLab.textColor = LightTextColor
+        self.centerLab.setTextFont(.PFSR, 14)
+        
+        self.rightLab.text = switchLanguage("虚值105费率")
+        self.rightLab.textColor = LightTextColor
+        self.rightLab.setTextFont(.PFSR, 14)
+        
+        
+        self.tableView.delegate = self
+        self.tableView.dataSource = self
+        tableView.separatorStyle = .none
+        tableView.separatorColor = ViewBorderColor
+        tableView.separatorInset = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10)
+        tableView.backgroundColor = ALLBackGroundColor
+        tableView.tableFooterView = UIView()
+        tableView.tableHeaderView = UIView()
+        tableView.showsVerticalScrollIndicator = false
+        tableView.showsVerticalScrollIndicator = false
+        tableView.register(UINib.init(nibName: "MDOptionsPeriodListCell", bundle: nil), forCellReuseIdentifier: "MDOptionsPeriodListCell")
+        
+        
+        
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    func updateCellWith(vm:MDOptionsViewModel) -> Void {
+        self.VM = vm
+        self.tableView.reloadData()
+    }
+    
+    func updateSelect(index:Int,type:Int) -> Void {
+        for (i,model) in self.VM.periodList.enumerated(){
+            model.isAverageSelect = false
+            model.isNominalSelect = false
+            if i == index {
+                if type == 1{
+                    model.isAverageSelect = true
+                }else{
+                    model.isNominalSelect = true
+                }
+                self.VM.selectPeriodModel = model
+            }
+           
+        }
+        
+        self.completeBlock?()
+    }
+}
+
+//代理
+extension MDOptionsPeriodCell: UITableViewDelegate,UITableViewDataSource{
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return self.VM.periodList.count
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell:MDOptionsPeriodListCell = tableView.dequeueReusableCell(withIdentifier: "MDOptionsPeriodListCell") as! MDOptionsPeriodListCell
+        let model = self.VM.periodList[indexPath.row]
+        cell.updateCellWith(model: model,index:indexPath.row)
+        cell.centerBlock = { index in
+            self.updateSelect(index: index, type: 1)
+        }
+        
+        cell.rightBlock = { index in
+            self.updateSelect(index: index, type: 2)
+        }
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return 45
+    }
+    
+    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) {
+       
+    }
+    
+}
+
+

+ 157 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPeriodCell.xib

@@ -0,0 +1,157 @@
+<?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="260" id="KGk-i7-Jjw" customClass="MDOptionsPeriodCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="457" height="260"/>
+            <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="457" height="260"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="plM-3e-qEG">
+                        <rect key="frame" x="0.0" y="0.0" width="457" height="260"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jpU-YO-Scz">
+                                <rect key="frame" x="0.0" y="0.0" width="457" height="40"/>
+                                <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="aKZ-aw-4Iq">
+                                        <rect key="frame" x="20.000000000000004" y="19.666666666666671" 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 firstItem="aKZ-aw-4Iq" firstAttribute="leading" secondItem="jpU-YO-Scz" secondAttribute="leading" constant="20" id="8qU-Mm-aBx"/>
+                                    <constraint firstAttribute="height" constant="40" id="O5j-Nu-P7v"/>
+                                    <constraint firstAttribute="bottom" secondItem="aKZ-aw-4Iq" secondAttribute="bottom" id="ziF-HH-P3O"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nW3-pu-7AS">
+                                <rect key="frame" x="0.0" y="40" width="457" height="80"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4DU-SJ-EQO">
+                                        <rect key="frame" x="20" y="10" width="417" height="30"/>
+                                        <subviews>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="5HC-f7-RT9">
+                                                <rect key="frame" x="0.0" y="0.0" width="30" height="30"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="30" id="Hk7-6p-6qM"/>
+                                                </constraints>
+                                            </imageView>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b7R-xJ-wQQ">
+                                                <rect key="frame" x="35" y="0.0" width="377" height="30"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                        </subviews>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                        <constraints>
+                                            <constraint firstAttribute="bottom" secondItem="b7R-xJ-wQQ" secondAttribute="bottom" id="9IA-IA-jCM"/>
+                                            <constraint firstAttribute="height" constant="30" id="FZQ-Qj-z59"/>
+                                            <constraint firstAttribute="bottom" secondItem="5HC-f7-RT9" secondAttribute="bottom" id="N4X-wf-JCd"/>
+                                            <constraint firstItem="5HC-f7-RT9" firstAttribute="leading" secondItem="4DU-SJ-EQO" secondAttribute="leading" id="Q0Q-af-WMK"/>
+                                            <constraint firstItem="b7R-xJ-wQQ" firstAttribute="leading" secondItem="5HC-f7-RT9" secondAttribute="trailing" constant="5" id="aC5-Kf-6cm"/>
+                                            <constraint firstAttribute="trailing" secondItem="b7R-xJ-wQQ" secondAttribute="trailing" constant="5" id="gBk-HY-Ib6"/>
+                                            <constraint firstItem="b7R-xJ-wQQ" firstAttribute="top" secondItem="4DU-SJ-EQO" secondAttribute="top" id="mES-sx-onl"/>
+                                            <constraint firstItem="5HC-f7-RT9" firstAttribute="top" secondItem="4DU-SJ-EQO" secondAttribute="top" id="reW-6m-h9a"/>
+                                        </constraints>
+                                    </view>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dMg-QM-PlD">
+                                        <rect key="frame" x="30" y="40" width="397" height="40"/>
+                                        <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="VAI-Jg-UOL">
+                                                <rect key="frame" x="0.0" y="0.0" width="132.33333333333334" height="40"/>
+                                                <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="yHv-84-nOv">
+                                                <rect key="frame" x="132.33333333333331" y="0.0" width="132.33333333333331" height="40"/>
+                                                <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="FXz-WR-JhE">
+                                                <rect key="frame" x="264.66666666666669" y="0.0" width="132.33333333333331" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="yHv-84-nOv" firstAttribute="width" secondItem="VAI-Jg-UOL" secondAttribute="width" id="KrD-tG-Vkt"/>
+                                            <constraint firstAttribute="height" constant="40" id="bwd-RF-Zmc"/>
+                                            <constraint firstItem="FXz-WR-JhE" firstAttribute="width" secondItem="VAI-Jg-UOL" secondAttribute="width" id="k4l-p8-Rct"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="4DU-SJ-EQO" firstAttribute="leading" secondItem="nW3-pu-7AS" secondAttribute="leading" constant="20" id="1yF-qN-0An"/>
+                                    <constraint firstItem="dMg-QM-PlD" firstAttribute="top" secondItem="4DU-SJ-EQO" secondAttribute="bottom" id="8uZ-te-cwh"/>
+                                    <constraint firstAttribute="bottom" secondItem="dMg-QM-PlD" secondAttribute="bottom" id="HYV-ci-UjH"/>
+                                    <constraint firstItem="dMg-QM-PlD" firstAttribute="leading" secondItem="nW3-pu-7AS" secondAttribute="leading" constant="30" id="aSd-lb-y3f"/>
+                                    <constraint firstAttribute="trailing" secondItem="4DU-SJ-EQO" secondAttribute="trailing" constant="20" id="eEz-4L-RXq"/>
+                                    <constraint firstItem="4DU-SJ-EQO" firstAttribute="top" secondItem="nW3-pu-7AS" secondAttribute="top" constant="10" id="t9t-bg-GAD"/>
+                                    <constraint firstAttribute="trailing" secondItem="dMg-QM-PlD" secondAttribute="trailing" constant="30" id="xYf-e4-yUu"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ucc-6d-CU2">
+                                <rect key="frame" x="0.0" y="120" width="457" height="140"/>
+                                <subviews>
+                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="257-8c-uT0">
+                                        <rect key="frame" x="20" y="0.0" width="417" height="130"/>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                    </tableView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="257-8c-uT0" secondAttribute="trailing" constant="20" id="440-uX-wk6"/>
+                                    <constraint firstAttribute="bottom" secondItem="257-8c-uT0" secondAttribute="bottom" constant="10" id="AhL-jL-Dey"/>
+                                    <constraint firstItem="257-8c-uT0" firstAttribute="leading" secondItem="Ucc-6d-CU2" secondAttribute="leading" constant="20" id="Fia-7z-6lk"/>
+                                    <constraint firstItem="257-8c-uT0" firstAttribute="top" secondItem="Ucc-6d-CU2" secondAttribute="top" id="n50-i9-8AZ"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="plM-3e-qEG" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="UWx-HA-Tar"/>
+                    <constraint firstAttribute="trailing" secondItem="plM-3e-qEG" secondAttribute="trailing" id="ZJG-Hy-rjb"/>
+                    <constraint firstItem="plM-3e-qEG" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="byp-Pd-OdM"/>
+                    <constraint firstAttribute="bottom" secondItem="plM-3e-qEG" secondAttribute="bottom" id="zo7-oB-SVe"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="centerLab" destination="yHv-84-nOv" id="3w6-bG-V6Q"/>
+                <outlet property="hintBgView" destination="4DU-SJ-EQO" id="gWe-lO-xII"/>
+                <outlet property="hintImgView" destination="5HC-f7-RT9" id="0cM-eT-CoG"/>
+                <outlet property="hintLab" destination="b7R-xJ-wQQ" id="c8Z-hY-jY5"/>
+                <outlet property="leftLab" destination="VAI-Jg-UOL" id="Bqc-Vs-bit"/>
+                <outlet property="rightLab" destination="FXz-WR-JhE" id="iyg-Hj-S0r"/>
+                <outlet property="tableView" destination="257-8c-uT0" id="wDt-Yn-zqN"/>
+                <outlet property="titleLab" destination="aKZ-aw-4Iq" id="yZx-ze-bGT"/>
+            </connections>
+            <point key="canvasLocation" x="306" y="99"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

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

@@ -0,0 +1,79 @@
+//
+//  MDOptionsPeriodListCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/19.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsPeriodListCell: BaseTableViewCell {
+    @IBOutlet weak var bgView: UIView!
+    @IBOutlet weak var leftLab: UILabel!
+    @IBOutlet weak var centerBtn: UIButton!
+    @IBOutlet weak var rightBtn: UIButton!
+    
+    var centerBlock:((_ index: NSInteger) -> ())?
+    var rightBlock:((_ index: NSInteger) -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = .clear
+        self.bgView.backgroundColor = ALLBackGroundColor
+        self.bgView.setViewLayerBorderColor(myColor: ViewBorderColor, borderWidth: 1, maskBounds:4)
+        
+        self.leftLab.textColor = TitleTextColor
+        self.leftLab.setTextFont(.PFSR, 14)
+        
+        self.centerBtn.setTextFont(.PFSR, 14)
+        self.centerBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.centerBtn.addTarget(self, action: #selector(clickCenterBtnAction(_ :)), for: .touchUpInside)
+        
+        self.rightBtn.setTextFont(.PFSR, 14)
+        self.rightBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.rightBtn.addTarget(self, action: #selector(clickRightBtnAction(_ :)), for: .touchUpInside)
+        
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    @objc func clickCenterBtnAction(_ sender:UIButton){
+        self.centerBlock?(sender.tag - 10000)
+    }
+    
+    @objc func clickRightBtnAction(_ sender:UIButton){
+        self.rightBlock?(sender.tag - 20000)
+    }
+    
+    func updateCellWith(model:MDPeriodModel,index:Int) -> Void {
+        self.centerBtn.tag = 10000 + index
+        self.rightBtn.tag = 20000 + index
+        
+        self.leftLab.text = model.timer
+        
+        self.centerBtn.setTitle(precisionString(with: model.averageRate, precision: "2")+"%", for: .normal)
+        if model.isAverageSelect{
+            self.centerBtn.setImage(_image("Market_W_Select&Market_W_Select"), for: .normal)
+        }else{
+            self.centerBtn.setImage(_image("Market_W_unSelect&Market_W_unSelect"), for: .normal)
+        }
+        
+        self.centerBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5)
+        
+        self.rightBtn.setTitle(precisionString(with: model.nominalRate, precision: "2")+"%", for: .normal)
+        if model.isNominalSelect{
+            self.rightBtn.setImage(_image("Market_W_Select&Market_W_Select"), for: .normal)
+        }else{
+            self.rightBtn.setImage(_image("Market_W_unSelect&Market_W_unSelect"), for: .normal)
+        }
+        
+        self.rightBtn.layoutButtonEdgeInsetStyle(type: .right, space: 5)
+        
+    }
+    
+}

+ 95 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPeriodListCell.xib

@@ -0,0 +1,95 @@
+<?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" id="KGk-i7-Jjw" customClass="MDOptionsPeriodListCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+            <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="320" height="44"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="q17-sH-vO1">
+                        <rect key="frame" x="0.0" y="2.6666666666666679" width="320" height="39"/>
+                        <subviews>
+                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yOe-ee-f3H">
+                                <rect key="frame" x="20" y="0.0" width="280" height="39"/>
+                                <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="E9W-63-XtY">
+                                        <rect key="frame" x="0.0" y="0.0" width="93.333333333333329" height="39"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u7I-D5-5na">
+                                        <rect key="frame" x="93.333333333333343" y="0.0" width="93.333333333333343" height="39"/>
+                                        <subviews>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pRU-nL-gOq">
+                                                <rect key="frame" x="33.333333333333329" y="0.0" width="30" height="39"/>
+                                                <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="pRU-nL-gOq" secondAttribute="bottom" id="0ZR-em-b8a"/>
+                                            <constraint firstItem="pRU-nL-gOq" firstAttribute="top" secondItem="u7I-D5-5na" secondAttribute="top" id="Ibb-vz-d9H"/>
+                                            <constraint firstAttribute="trailing" secondItem="pRU-nL-gOq" secondAttribute="trailing" constant="30" id="tcJ-qo-fvG"/>
+                                        </constraints>
+                                    </view>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Qc-Wa-Eil">
+                                        <rect key="frame" x="186.66666666666666" y="0.0" width="93.333333333333343" height="39"/>
+                                        <subviews>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dbe-II-PO1">
+                                                <rect key="frame" x="53.333333333333343" y="0.0" width="30" height="39"/>
+                                                <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="dbe-II-PO1" firstAttribute="top" secondItem="1Qc-Wa-Eil" secondAttribute="top" id="kgh-Z1-inn"/>
+                                            <constraint firstAttribute="bottom" secondItem="dbe-II-PO1" secondAttribute="bottom" id="oR8-Mj-9at"/>
+                                            <constraint firstAttribute="trailing" secondItem="dbe-II-PO1" secondAttribute="trailing" constant="10" id="uGa-y1-8xy"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstItem="u7I-D5-5na" firstAttribute="width" secondItem="E9W-63-XtY" secondAttribute="width" id="llW-fe-f1a"/>
+                                    <constraint firstItem="1Qc-Wa-Eil" firstAttribute="width" secondItem="E9W-63-XtY" secondAttribute="width" id="zQO-Yz-mds"/>
+                                </constraints>
+                            </stackView>
+                        </subviews>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstAttribute="bottom" secondItem="yOe-ee-f3H" secondAttribute="bottom" id="AfT-cA-oxr"/>
+                            <constraint firstAttribute="trailing" secondItem="yOe-ee-f3H" secondAttribute="trailing" constant="20" id="Ycz-p0-wPB"/>
+                            <constraint firstItem="yOe-ee-f3H" firstAttribute="leading" secondItem="q17-sH-vO1" secondAttribute="leading" constant="20" id="esb-1S-t1q"/>
+                            <constraint firstItem="yOe-ee-f3H" firstAttribute="top" secondItem="q17-sH-vO1" secondAttribute="top" id="nkK-Se-okY"/>
+                        </constraints>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="q17-sH-vO1" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="2.5" id="7YI-Sq-Zxc"/>
+                    <constraint firstAttribute="bottom" secondItem="q17-sH-vO1" secondAttribute="bottom" constant="2.5" id="RuT-X7-6Hx"/>
+                    <constraint firstItem="q17-sH-vO1" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="cQb-sd-a8d"/>
+                    <constraint firstAttribute="trailing" secondItem="q17-sH-vO1" secondAttribute="trailing" id="vTO-cO-Xf7"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="bgView" destination="q17-sH-vO1" id="R9O-nL-zIP"/>
+                <outlet property="centerBtn" destination="pRU-nL-gOq" id="A5O-tA-UCM"/>
+                <outlet property="leftLab" destination="E9W-63-XtY" id="XWL-Lg-m6K"/>
+                <outlet property="rightBtn" destination="dbe-II-PO1" id="gno-Tz-qvC"/>
+            </connections>
+            <point key="canvasLocation" x="134" y="46"/>
+        </tableViewCell>
+    </objects>
+</document>

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

@@ -0,0 +1,151 @@
+//
+//  MDOptionsPriceCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/21.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsPriceCell: BaseTableViewCell {
+    @IBOutlet weak var titleLab: UILabel!
+    @IBOutlet weak var hintBgView: UIView!
+    @IBOutlet weak var hintImgView: UIImageView!
+    @IBOutlet weak var hintLab: UILabel!
+    
+    @IBOutlet weak var marketBtn: UIButton!
+    @IBOutlet weak var limitedBtn: UIButton!
+    @IBOutlet weak var textField: UITextField!
+    @IBOutlet weak var unitLab: UILabel!
+    
+    var VM:MDOptionsViewModel = MDOptionsViewModel()
+    var completeBlock:(() -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ALLBackGroundColor
+        self.titleLab.text = switchLanguage("4、请确认下单价格")
+        self.setTextFont(.PFSM, 18)
+        self.titleLab.textColor = TitleTextColor
+        
+        self.hintBgView.backgroundColor = ViewBorderColor
+        self.hintBgView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        
+        self.hintImgView.image = _image("Base_W_Hint&Base_W_Hint")
+        
+        self.hintLab.text = switchLanguage("注:市价成交模式下,最终执行的价格以券商报价成交为准.")
+       
+        self.hintLab.textColor = MidTextColor
+        self.hintLab.setTextFont(.PFSR, 12)
+        
+        self.marketBtn.setTextFont(.PFSR, 14)
+        self.marketBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.marketBtn.setTitle(switchLanguage("市价成交"), for: .normal)
+        self.marketBtn.addTarget(self, action: #selector(clickMarketBtnAction), for: .touchUpInside)
+        
+        self.limitedBtn.setTextFont(.PFSR, 14)
+        self.limitedBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.limitedBtn.setTitle(switchLanguage("限价成交"), for: .normal)
+        self.limitedBtn.addTarget(self, action: #selector(clickLimitedBtnAction), for: .touchUpInside)
+        
+        self.textField.backgroundColor = ALLBackGroundColor
+        self.textField.setViewLayerBorderColor(myColor: ViewBorderColor, borderWidth: 1, maskBounds: 4)
+        self.textField.setTextFont(.PFSM, 14)
+        self.textField.textColor = TitleTextColor
+        self.textField.delegate = self
+        
+        self.textField.leftView = UIView.init(frame: CGRect(x: 0, y: 0, width: 20, height: 40))
+        self.textField.leftViewMode = .always
+        
+        
+        self.textField.rightView = UIView.init(frame: CGRect(x: 0, y: 0, width: 20, height: 40))
+        self.textField.rightViewMode = .always
+        
+        
+        self.unitLab.text = "USD"
+        self.unitLab.textColor = GrayTextColor
+        self.unitLab.setTextFont(.PFSR, 14)
+        
+    
+        
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    func updateCellWith(vm:MDOptionsViewModel) -> Void {
+        self.VM = vm
+        self.updateBtnLayer(isMarket: vm.isMarket)
+        self.textField.text = "\(vm.limited)"
+        
+    }
+    
+}
+
+extension MDOptionsPriceCell:UITextFieldDelegate {
+    
+    @objc func clickMarketBtnAction(){
+        updateBtnLayer(isMarket: true)
+        self.VM.isMarket = true;
+        self.completeBlock?()
+    }
+    
+    @objc func clickLimitedBtnAction(){
+        updateBtnLayer(isMarket: false)
+        self.VM.isMarket = false;
+        self.completeBlock?()
+    }
+    
+    func updateBtnLayer(isMarket:Bool) -> Void {
+        if isMarket {
+            self.marketBtn.setImage(_image("Market_W_Select_1&Market_W_Select_1"), for: .normal)
+            self.marketBtn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
+            
+            self.limitedBtn.setImage(_image("Market_W_unSelect&Market_W_unSelect"), for: .normal)
+            self.limitedBtn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
+            
+            self.textField.backgroundColor = InputBackGroundColor;
+            self.textField.isUserInteractionEnabled = false
+            self.textField.textColor = GrayTextColor
+        }else{
+            self.limitedBtn.setImage(_image("Market_W_Select_1&Market_W_Select_1"), for: .normal)
+            self.limitedBtn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
+            
+            self.marketBtn.setImage(_image("Market_W_unSelect&Market_W_unSelect"), for: .normal)
+            self.marketBtn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
+            
+            self.textField.backgroundColor = ALLBackGroundColor;
+            self.textField.isUserInteractionEnabled = true
+            self.textField.textColor = TitleTextColor
+        }
+    }
+    
+    func textFieldDidEndEditing(_ textField: UITextField) {
+        self.VM.limited = conerData(textField.text ?? "1", .MyCGFloat).4!
+        self.completeBlock?()
+    }
+    
+    //限制输入
+    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+        let existingString: NSString = textField.text as NSString? ?? "" as NSString
+        let candidateString =  existingString.replacingCharacters(in: range, with: string)
+        if candidateString.length < existingString.length {
+            
+            return true
+        }
+        if candidateString.length > 0 {
+          
+            let pp = NSString(format: "(([0]|(0[.]\\d{0,%@}))|([1-9]\\d{0,50}(([.]\\d{0,%@})?)))?","2","2")
+            let predicate = NSPredicate.init(format: "SELF MATCHES %@",pp)
+            if !predicate .evaluate(with: candidateString){
+                return false
+            }
+        }
+        
+        return true
+    }
+}

+ 177 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPriceCell.xib

@@ -0,0 +1,177 @@
+<?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="348" id="KGk-i7-Jjw" customClass="MDOptionsPriceCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="344" height="348"/>
+            <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="344" height="348"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="fMI-AZ-47M">
+                        <rect key="frame" x="0.0" y="0.0" width="344" height="338"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pRU-Fs-qQb">
+                                <rect key="frame" x="0.0" y="0.0" width="344" height="40"/>
+                                <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="KpA-hz-ehd">
+                                        <rect key="frame" x="20.000000000000004" y="19.666666666666671" 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 firstItem="KpA-hz-ehd" firstAttribute="leading" secondItem="pRU-Fs-qQb" secondAttribute="leading" constant="20" id="NRj-YS-2kb"/>
+                                    <constraint firstAttribute="bottom" secondItem="KpA-hz-ehd" secondAttribute="bottom" id="TLS-eA-MqP"/>
+                                    <constraint firstAttribute="height" constant="40" id="yar-ku-zRw"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j7t-vF-iXT">
+                                <rect key="frame" x="0.0" y="40" width="344" height="218"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CdR-mR-rae">
+                                        <rect key="frame" x="20" y="10" width="304" height="198"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rwH-PD-Z5c">
+                                                <rect key="frame" x="25" y="10" width="269" height="178"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="MzB-HJ-Q73">
+                                                <rect key="frame" x="5" y="10" width="15" height="15"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="15" id="QiY-Gl-UeR"/>
+                                                    <constraint firstAttribute="height" constant="15" id="Tsw-sI-zD7"/>
+                                                </constraints>
+                                            </imageView>
+                                        </subviews>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                        <constraints>
+                                            <constraint firstAttribute="trailing" secondItem="rwH-PD-Z5c" secondAttribute="trailing" constant="10" id="W4e-WQ-Gs9"/>
+                                            <constraint firstItem="rwH-PD-Z5c" firstAttribute="leading" secondItem="MzB-HJ-Q73" secondAttribute="trailing" constant="5" id="eid-uz-1cc"/>
+                                            <constraint firstItem="MzB-HJ-Q73" firstAttribute="leading" secondItem="CdR-mR-rae" secondAttribute="leading" constant="10" id="fvr-on-sJG"/>
+                                            <constraint firstItem="rwH-PD-Z5c" firstAttribute="top" secondItem="CdR-mR-rae" secondAttribute="top" constant="10" id="iIH-sd-wJt"/>
+                                            <constraint firstItem="MzB-HJ-Q73" firstAttribute="leading" secondItem="CdR-mR-rae" secondAttribute="leading" constant="5" id="qY8-ec-dbP"/>
+                                            <constraint firstItem="rwH-PD-Z5c" firstAttribute="top" secondItem="MzB-HJ-Q73" secondAttribute="top" id="ueX-oR-0VY"/>
+                                            <constraint firstAttribute="bottom" secondItem="rwH-PD-Z5c" secondAttribute="bottom" constant="10" id="v6T-Ab-VE9"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="CdR-mR-rae" firstAttribute="leading" secondItem="j7t-vF-iXT" secondAttribute="leading" constant="20" id="E8L-gj-BKc"/>
+                                    <constraint firstAttribute="trailing" secondItem="CdR-mR-rae" secondAttribute="trailing" constant="20" id="TfX-tW-mgr"/>
+                                    <constraint firstItem="CdR-mR-rae" firstAttribute="top" secondItem="j7t-vF-iXT" secondAttribute="top" constant="10" id="n9g-iI-fN0"/>
+                                    <constraint firstAttribute="bottom" secondItem="CdR-mR-rae" secondAttribute="bottom" constant="10" id="w1c-S3-QqW"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="84s-oP-toS">
+                                <rect key="frame" x="0.0" y="258" width="344" height="80"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="u8B-92-Zr9">
+                                        <rect key="frame" x="20" y="0.0" width="304" height="80"/>
+                                        <subviews>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SGy-c8-Wg1">
+                                                <rect key="frame" x="0.0" y="0.0" width="304" height="40"/>
+                                                <subviews>
+                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sI8-oo-wBz">
+                                                        <rect key="frame" x="0.0" y="0.0" width="30" height="40"/>
+                                                        <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="sI8-oo-wBz" firstAttribute="top" secondItem="SGy-c8-Wg1" secondAttribute="top" id="7TL-DM-l8o"/>
+                                                    <constraint firstAttribute="bottom" secondItem="sI8-oo-wBz" secondAttribute="bottom" id="PuD-XE-XLl"/>
+                                                    <constraint firstAttribute="height" constant="40" id="gIO-kb-csI"/>
+                                                    <constraint firstItem="sI8-oo-wBz" firstAttribute="leading" secondItem="SGy-c8-Wg1" secondAttribute="leading" id="lMl-uE-uH0"/>
+                                                </constraints>
+                                            </view>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pvN-7d-hIs">
+                                                <rect key="frame" x="0.0" y="40" width="304" height="40"/>
+                                                <subviews>
+                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YIj-fP-CDi">
+                                                        <rect key="frame" x="0.0" y="0.0" width="30" height="40"/>
+                                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                                    </button>
+                                                    <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="rFH-Ci-dxE">
+                                                        <rect key="frame" x="50" y="0.0" width="137.66666666666666" height="40"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                        <textInputTraits key="textInputTraits"/>
+                                                    </textField>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LkC-XP-EDY">
+                                                        <rect key="frame" x="192.66666666666666" y="0.0" width="41.333333333333343" height="40"/>
+                                                        <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="bottom" secondItem="YIj-fP-CDi" secondAttribute="bottom" id="3gk-QL-5fl"/>
+                                                    <constraint firstItem="YIj-fP-CDi" firstAttribute="leading" secondItem="pvN-7d-hIs" secondAttribute="leading" id="4ii-pr-fNG"/>
+                                                    <constraint firstItem="rFH-Ci-dxE" firstAttribute="leading" secondItem="YIj-fP-CDi" secondAttribute="trailing" constant="20" id="J80-xq-bc9"/>
+                                                    <constraint firstAttribute="trailing" secondItem="LkC-XP-EDY" secondAttribute="trailing" constant="70" id="MTD-cf-THY"/>
+                                                    <constraint firstItem="rFH-Ci-dxE" firstAttribute="top" secondItem="pvN-7d-hIs" secondAttribute="top" id="Ozi-N2-nnP"/>
+                                                    <constraint firstItem="YIj-fP-CDi" firstAttribute="top" secondItem="pvN-7d-hIs" secondAttribute="top" id="Sgp-bH-np4"/>
+                                                    <constraint firstAttribute="bottom" secondItem="LkC-XP-EDY" secondAttribute="bottom" id="TZJ-xP-Usc"/>
+                                                    <constraint firstItem="LkC-XP-EDY" firstAttribute="leading" secondItem="rFH-Ci-dxE" secondAttribute="trailing" constant="5" id="eiE-Zy-hch"/>
+                                                    <constraint firstAttribute="bottom" secondItem="rFH-Ci-dxE" secondAttribute="bottom" id="jCt-w6-z0h"/>
+                                                    <constraint firstAttribute="height" constant="40" id="kmn-bU-ZMe"/>
+                                                    <constraint firstItem="LkC-XP-EDY" firstAttribute="top" secondItem="pvN-7d-hIs" secondAttribute="top" id="lXv-oW-Kyt"/>
+                                                </constraints>
+                                            </view>
+                                        </subviews>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="u8B-92-Zr9" firstAttribute="top" secondItem="84s-oP-toS" secondAttribute="top" id="K32-zA-CK6"/>
+                                    <constraint firstAttribute="trailing" secondItem="u8B-92-Zr9" secondAttribute="trailing" constant="20" id="RYj-Rk-CUJ"/>
+                                    <constraint firstItem="u8B-92-Zr9" firstAttribute="leading" secondItem="84s-oP-toS" secondAttribute="leading" constant="20" id="jig-Xi-G0v"/>
+                                    <constraint firstAttribute="bottom" secondItem="u8B-92-Zr9" secondAttribute="bottom" id="lE0-G7-Vsj"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="fMI-AZ-47M" secondAttribute="bottom" constant="10" id="Df6-22-JfE"/>
+                    <constraint firstItem="fMI-AZ-47M" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="HXy-6v-zwR"/>
+                    <constraint firstAttribute="trailing" secondItem="fMI-AZ-47M" secondAttribute="trailing" id="mzR-if-IAr"/>
+                    <constraint firstItem="fMI-AZ-47M" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="uy9-H4-iIx"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="hintBgView" destination="CdR-mR-rae" id="H19-TC-Z5W"/>
+                <outlet property="hintImgView" destination="MzB-HJ-Q73" id="kLI-Co-EpU"/>
+                <outlet property="hintLab" destination="rwH-PD-Z5c" id="loV-gz-hRj"/>
+                <outlet property="limitedBtn" destination="YIj-fP-CDi" id="ISR-3N-Lvm"/>
+                <outlet property="marketBtn" destination="sI8-oo-wBz" id="aBY-nX-tPq"/>
+                <outlet property="textField" destination="rFH-Ci-dxE" id="WYG-tz-tpb"/>
+                <outlet property="titleLab" destination="KpA-hz-ehd" id="v8c-kb-Pgb"/>
+                <outlet property="unitLab" destination="LkC-XP-EDY" id="kdd-5a-HzO"/>
+            </connections>
+            <point key="canvasLocation" x="-53.435114503816791" y="261.97183098591552"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

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

@@ -0,0 +1,116 @@
+//
+//  MDOptionsPrincipalCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/21.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsPrincipalCell: BaseTableViewCell {
+    @IBOutlet weak var titleLab: UILabel!
+    @IBOutlet weak var hintBgView: UIView!
+    @IBOutlet weak var hintImgView: UIImageView!
+    @IBOutlet weak var hintLab: UILabel!
+    
+    @IBOutlet weak var subtractBtn: UIButton!
+    @IBOutlet weak var textField: UITextField!
+    @IBOutlet weak var addBtn: UIButton!
+    @IBOutlet weak var principalLab: UILabel!
+    
+    var VM:MDOptionsViewModel = MDOptionsViewModel()
+    var completeBlock:(() -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ALLBackGroundColor
+        self.titleLab.text = switchLanguage("3、请输入名义本金")
+        self.setTextFont(.PFSM, 18)
+        self.titleLab.textColor = TitleTextColor
+        
+        self.hintBgView.backgroundColor = ViewBorderColor
+        self.hintBgView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        
+        self.hintImgView.image = _image("Base_W_Hint&Base_W_Hint")
+        
+        self.hintLab.text = switchLanguage("注:名义本金额是指您需要认购的合约规模,即要进行交易资金数额.")
+        self.hintLab.textColor = MidTextColor
+        self.hintLab.setTextFont(.PFSR, 12)
+        
+        self.subtractBtn.setImage(_image("Market_W_Subtract&Market_W_Subtract"), for: .normal)
+        self.subtractBtn.setTitle("", for: .normal)
+        self.subtractBtn.addTarget(self, action: #selector(clickSubtractBtnAction), for: .touchUpInside)
+        
+        self.addBtn.setImage(_image("Market_W_Add&Market_W_Add"), for: .normal)
+        self.addBtn.setTitle("", for: .normal)
+        self.addBtn.addTarget(self, action: #selector(clickAddBtnAction), for: .touchUpInside)
+        
+        self.textField.backgroundColor = InputBackGroundColor
+        self.textField.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        self.textField.setTextFont(.PFSM, 14)
+        self.textField.textColor = TitleTextColor
+        self.textField.delegate = self
+        
+        
+        self.principalLab.text = switchLanguage("X1万")
+        self.principalLab.setTextFont(.PFSM, 14)
+        self.principalLab.textColor = TitleTextColor
+        
+        
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+        
+        // Configure the view for the selected state
+    }
+    
+    func updateCellWith(vm:MDOptionsViewModel) -> Void {
+        self.VM = vm
+        self.textField.text = "\(self.VM.principal)"
+        
+    }
+    
+}
+
+extension MDOptionsPrincipalCell:UITextFieldDelegate{
+   
+    @objc func clickSubtractBtnAction(){
+        let text = self.textField.text ?? "0"
+        if conerData(text, .MyInt).0! > 1 {
+            self.textField.text = decimalNumber(A: text, B: "1", type: .Subtract)
+            self.VM.principal -= 1
+        }
+    }
+    @objc func clickAddBtnAction(){
+        let text = self.textField.text ?? "0"
+        self.textField.text = decimalNumber(A: text, B: "1", type: .Add)
+        self.VM.principal += 1
+    }
+    
+    func textFieldDidEndEditing(_ textField: UITextField) {
+        self.VM.principal = conerData(textField.text ?? "1", .MyCGFloat).4!
+        self.completeBlock?()
+    }
+    
+    //限制输入
+    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+        let existingString: NSString = textField.text as NSString? ?? "" as NSString
+        let candidateString =  existingString.replacingCharacters(in: range, with: string)
+        if candidateString.length < existingString.length {
+            
+            return true
+        }
+        if candidateString.length > 0 {
+          
+            let pp = NSString(format: "^[1-9][0-9]*$")
+            let predicate = NSPredicate.init(format: "SELF MATCHES %@",pp)
+            if !predicate .evaluate(with: candidateString){
+                return false
+            }
+        }
+       
+        return true
+    }
+}

+ 159 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsPrincipalCell.xib

@@ -0,0 +1,159 @@
+<?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="160" id="KGk-i7-Jjw" customClass="MDOptionsPrincipalCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="376" height="160"/>
+            <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="376" height="160"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Vkw-rl-M0S">
+                        <rect key="frame" x="0.0" y="0.0" width="376" height="150"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="its-Ey-Hk4">
+                                <rect key="frame" x="0.0" y="0.0" width="376" height="40"/>
+                                <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="8Ox-PC-3yZ">
+                                        <rect key="frame" x="20.000000000000004" y="19.666666666666671" 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="40" id="MG2-eZ-lOR"/>
+                                    <constraint firstItem="8Ox-PC-3yZ" firstAttribute="leading" secondItem="its-Ey-Hk4" secondAttribute="leading" constant="20" id="rAE-I6-eVS"/>
+                                    <constraint firstAttribute="bottom" secondItem="8Ox-PC-3yZ" secondAttribute="bottom" id="x1w-qS-tyF"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZWS-7r-Zna">
+                                <rect key="frame" x="0.0" y="40" width="376" height="60"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nYc-Aa-YM2">
+                                        <rect key="frame" x="20" y="10" width="336" height="40"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pft-UA-aXr">
+                                                <rect key="frame" x="25" y="10" width="301" height="20"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3dR-Iu-WUo">
+                                                <rect key="frame" x="5" y="10" width="15" height="15"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="15" id="PVU-dk-6LY"/>
+                                                    <constraint firstAttribute="height" constant="15" id="eNg-ro-Lth"/>
+                                                </constraints>
+                                            </imageView>
+                                        </subviews>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                        <constraints>
+                                            <constraint firstItem="Pft-UA-aXr" firstAttribute="top" secondItem="nYc-Aa-YM2" secondAttribute="top" constant="10" id="Hc9-JL-dVJ"/>
+                                            <constraint firstItem="Pft-UA-aXr" firstAttribute="top" secondItem="3dR-Iu-WUo" secondAttribute="top" id="Krx-dZ-uvZ"/>
+                                            <constraint firstItem="3dR-Iu-WUo" firstAttribute="leading" secondItem="nYc-Aa-YM2" secondAttribute="leading" constant="5" id="UP1-pW-8sU"/>
+                                            <constraint firstAttribute="bottom" secondItem="Pft-UA-aXr" secondAttribute="bottom" constant="10" id="V2q-Wv-mwe"/>
+                                            <constraint firstItem="Pft-UA-aXr" firstAttribute="leading" secondItem="3dR-Iu-WUo" secondAttribute="trailing" constant="5" id="nNl-Dx-bq1"/>
+                                            <constraint firstAttribute="trailing" secondItem="Pft-UA-aXr" secondAttribute="trailing" constant="10" id="uFc-8U-azr"/>
+                                            <constraint firstItem="3dR-Iu-WUo" firstAttribute="leading" secondItem="nYc-Aa-YM2" secondAttribute="leading" constant="10" id="yEP-9U-tpN"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="nYc-Aa-YM2" secondAttribute="bottom" constant="10" id="LJe-Gh-mHb"/>
+                                    <constraint firstAttribute="trailing" secondItem="nYc-Aa-YM2" secondAttribute="trailing" constant="20" id="TML-4n-fq4"/>
+                                    <constraint firstItem="nYc-Aa-YM2" firstAttribute="leading" secondItem="ZWS-7r-Zna" secondAttribute="leading" constant="20" id="cje-Ae-eDL"/>
+                                    <constraint firstItem="nYc-Aa-YM2" firstAttribute="top" secondItem="ZWS-7r-Zna" secondAttribute="top" constant="10" id="qpJ-43-JBP"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nWJ-Hf-pdo">
+                                <rect key="frame" x="0.0" y="100" width="376" height="50"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ri7-4C-9ef">
+                                        <rect key="frame" x="15" y="0.0" width="50" height="50"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="50" id="SYN-uo-Xf7"/>
+                                        </constraints>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="R5D-a2-GZA">
+                                        <rect key="frame" x="67" y="5" width="60" height="40"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="60" id="CfH-gK-wrC"/>
+                                        </constraints>
+                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                        <textInputTraits key="textInputTraits"/>
+                                    </textField>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YKB-2w-wG0">
+                                        <rect key="frame" x="129" y="0.0" width="50" height="50"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="50" id="dRV-BG-z0S"/>
+                                        </constraints>
+                                        <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="1EJ-Zg-J7y">
+                                        <rect key="frame" x="189" y="0.0" width="41.333333333333343" height="50"/>
+                                        <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="R5D-a2-GZA" firstAttribute="top" secondItem="nWJ-Hf-pdo" secondAttribute="top" constant="5" id="0wG-AZ-XhM"/>
+                                    <constraint firstItem="YKB-2w-wG0" firstAttribute="top" secondItem="nWJ-Hf-pdo" secondAttribute="top" id="6iB-Bj-4wm"/>
+                                    <constraint firstAttribute="bottom" secondItem="ri7-4C-9ef" secondAttribute="bottom" id="7gu-5Q-Xoi"/>
+                                    <constraint firstAttribute="bottom" secondItem="YKB-2w-wG0" secondAttribute="bottom" id="AQi-px-YMP"/>
+                                    <constraint firstItem="1EJ-Zg-J7y" firstAttribute="leading" secondItem="YKB-2w-wG0" secondAttribute="trailing" constant="10" id="Abq-hp-sbs"/>
+                                    <constraint firstItem="YKB-2w-wG0" firstAttribute="leading" secondItem="R5D-a2-GZA" secondAttribute="trailing" constant="2" id="C6m-Bm-rz7"/>
+                                    <constraint firstAttribute="bottom" secondItem="1EJ-Zg-J7y" secondAttribute="bottom" id="HKD-Sv-IAb"/>
+                                    <constraint firstItem="ri7-4C-9ef" firstAttribute="top" secondItem="nWJ-Hf-pdo" secondAttribute="top" id="IFP-CG-4c8"/>
+                                    <constraint firstItem="ri7-4C-9ef" firstAttribute="leading" secondItem="nWJ-Hf-pdo" secondAttribute="leading" constant="15" id="RvK-vZ-yZI"/>
+                                    <constraint firstItem="R5D-a2-GZA" firstAttribute="leading" secondItem="ri7-4C-9ef" secondAttribute="trailing" constant="2" id="XHu-ig-zXH"/>
+                                    <constraint firstAttribute="height" constant="50" id="ft2-Ta-Aju"/>
+                                    <constraint firstItem="1EJ-Zg-J7y" firstAttribute="top" secondItem="nWJ-Hf-pdo" secondAttribute="top" id="iPL-YT-TGP"/>
+                                    <constraint firstAttribute="bottom" secondItem="R5D-a2-GZA" secondAttribute="bottom" constant="5" id="ktR-gY-by6"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="trailing" secondItem="Vkw-rl-M0S" secondAttribute="trailing" id="ccP-Nk-hgh"/>
+                    <constraint firstItem="Vkw-rl-M0S" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="peV-hO-H7q"/>
+                    <constraint firstItem="Vkw-rl-M0S" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="qTO-xQ-heL"/>
+                    <constraint firstAttribute="bottom" secondItem="Vkw-rl-M0S" secondAttribute="bottom" constant="10" id="xzf-Q5-d7S"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="addBtn" destination="YKB-2w-wG0" id="TDV-vk-XKl"/>
+                <outlet property="hintBgView" destination="nYc-Aa-YM2" id="f09-c0-5AI"/>
+                <outlet property="hintImgView" destination="3dR-Iu-WUo" id="jzJ-Xw-AhO"/>
+                <outlet property="hintLab" destination="Pft-UA-aXr" id="Rl2-h0-hYL"/>
+                <outlet property="principalLab" destination="1EJ-Zg-J7y" id="EFR-vM-XIU"/>
+                <outlet property="subtractBtn" destination="ri7-4C-9ef" id="s8V-V4-tiM"/>
+                <outlet property="textField" destination="R5D-a2-GZA" id="JVN-Ne-4Ft"/>
+                <outlet property="titleLab" destination="8Ox-PC-3yZ" id="kie-Sy-glz"/>
+            </connections>
+            <point key="canvasLocation" x="174" y="61"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

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

@@ -0,0 +1,157 @@
+//
+//  MDOptionsRateCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/21.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsRateCell: BaseTableViewCell {
+    @IBOutlet weak var titleLab: UILabel!
+    @IBOutlet weak var hintBgView: UIView!
+    @IBOutlet weak var hintImgView: UIImageView!
+    @IBOutlet weak var hintLab: UILabel!
+    
+    @IBOutlet weak var btn1: UIButton!
+    @IBOutlet weak var btn2: UIButton!
+    @IBOutlet weak var btn3: UIButton!
+    
+    @IBOutlet weak var rateLab: UILabel!
+    
+    var completeBlock:(() -> ())?
+    
+    var rate:CGFloat = 5
+    
+     var VM:MDOptionsViewModel = MDOptionsViewModel()
+        
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        // Initialization code
+        
+        self.backgroundColor = ALLBackGroundColor
+        self.titleLab.text = switchLanguage("2、请选择费率波动上限")
+        self.setTextFont(.PFSM, 18)
+        self.titleLab.textColor = TitleTextColor
+        
+        self.hintBgView.backgroundColor = ViewBorderColor
+        self.hintBgView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        
+        self.hintImgView.image = _image("Base_W_Hint&Base_W_Hint")
+        
+        self.hintLab.text = switchLanguage("期权上限费率 = 期权费率 X 最大波动率")
+        self.hintLab.textColor = MidTextColor
+        self.hintLab.setTextFont(.PFSR, 12)
+        
+        self.btn1.setTitle("5%", for: .normal)
+        self.btn1.setTextFont(.PFSR, 14)
+        self.btn1.addTarget(self, action: #selector(clickBtn1Action), for: .touchUpInside)
+        
+        self.btn2.setTitle("10%", for: .normal)
+        self.btn2.setTextFont(.PFSR, 14)
+        self.btn2.addTarget(self, action: #selector(clickBtn2Action), for: .touchUpInside)
+        
+        self.btn3.setTitle("20%", for: .normal)
+        self.btn3.setTextFont(.PFSR, 14)
+        self.btn3.addTarget(self, action: #selector(clickBtn3Action), for: .touchUpInside)
+        
+        self.rateLab.text = String(format: switchLanguage("当前选项对应费率上限: %@"),"0.00%")
+        
+        self.rateLab.setTextFont(.PFSR, 12)
+        self.rateLab.textColor = GrayTextColor
+        
+        self.rateLab.isHidden = true
+        
+        self.updateBtnLayer(type: 0)
+        
+    }
+    
+    @objc func clickBtn1Action(){
+        updateBtnLayer(type:0)
+    }
+    
+    @objc func clickBtn2Action(){
+        updateBtnLayer(type:1)
+    }
+    
+    @objc func clickBtn3Action(){
+        updateBtnLayer(type:2)
+    }
+    
+    func updateBtnLayer(type:Int) -> Void {
+        self.btn1.setTitleColor(TitleTextColor, for: .normal)
+        self.btn1.setViewLayerBorderColor(myColor: ViewBorderColor, borderWidth:1, maskBounds: 4)
+        
+        self.btn2.setTitleColor(TitleTextColor, for: .normal)
+        self.btn2.setViewLayerBorderColor(myColor: ViewBorderColor, borderWidth:1, maskBounds: 4)
+        
+        self.btn3.setTitleColor(TitleTextColor, for: .normal)
+        self.btn3.setViewLayerBorderColor(myColor: ViewBorderColor, borderWidth:1, maskBounds: 4)
+        
+        if type == 0 {
+            self.btn1.setTitleColor(MainBackGroundColor, for: .normal)
+            self.btn1.setViewLayerBorderColor(myColor: MainBackGroundColor, borderWidth:1, maskBounds: 4)
+            self.rate = 5
+        }
+        else if type == 1{
+            self.btn2.setTitleColor(MainBackGroundColor, for: .normal)
+            self.btn2.setViewLayerBorderColor(myColor: MainBackGroundColor, borderWidth:1, maskBounds: 4)
+            self.rate = 10
+        }
+        else if type == 3{
+            self.btn3.setTitleColor(MainBackGroundColor, for: .normal)
+            self.btn3.setViewLayerBorderColor(myColor: MainBackGroundColor, borderWidth:1, maskBounds: 4)
+            self.rate = 20
+        }
+        
+        updateRate()
+        self.completeBlock?()
+    }
+    
+    func updateRate() -> Void {
+        self.rateLab.isHidden = true
+        let model = self.VM.selectPeriodModel
+        
+        if model.averageRate.length > 0{
+            self.rateLab.isHidden = false
+            var r:CGFloat = 0.0
+            if model.isAverageSelect {
+                r = conerData(model.averageRate, .MyCGFloat).4!
+            }else{
+                r = conerData(model.nominalRate, .MyCGFloat).4!
+            }
+            
+            self.VM.capRates =  r + (r*self.rate)/100
+            
+            let rateStr = precisionString(with: "\(self.VM.capRates)", precision: "2") + "%"
+            
+            let text = String(format: switchLanguage("当前选项对应费率上限: %@"),rateStr)
+            let att = NSMutableAttributedString.init(string: text,attributes: [NSAttributedString.Key.foregroundColor: GrayTextColor])
+            let range1 = (text as NSString).range(of: rateStr)
+            att.addAttributes([NSAttributedString.Key.foregroundColor: MainBackGroundColor], range: range1)
+            
+            self.rateLab.attributedText = att
+            
+        }
+        
+       
+    }
+    
+    
+    func updateCellWith(vm:MDOptionsViewModel) -> Void {
+        self.VM = vm
+        
+        self.updateRate()
+    }
+    
+    
+    
+    
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+}

+ 167 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsRateCell.xib

@@ -0,0 +1,167 @@
+<?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="161" id="KGk-i7-Jjw" customClass="MDOptionsRateCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="400" height="161"/>
+            <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="400" height="161"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="wuB-zg-tiy">
+                        <rect key="frame" x="0.0" y="0.0" width="400" height="161"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aZ1-RB-wtw">
+                                <rect key="frame" x="0.0" y="0.0" width="400" height="40"/>
+                                <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="H39-0L-c4N">
+                                        <rect key="frame" x="20.000000000000004" y="19.666666666666671" 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="bottom" secondItem="H39-0L-c4N" secondAttribute="bottom" id="Jeb-EA-QhU"/>
+                                    <constraint firstItem="H39-0L-c4N" firstAttribute="leading" secondItem="aZ1-RB-wtw" secondAttribute="leading" constant="20" id="YgB-NM-q7M"/>
+                                    <constraint firstAttribute="height" constant="40" id="eri-LJ-onc"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QGL-JQ-6Bb">
+                                <rect key="frame" x="0.0" y="40" width="400" height="56"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2Wz-ju-uDu">
+                                        <rect key="frame" x="20" y="10" width="360" height="36"/>
+                                        <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="YAv-Su-FV5">
+                                                <rect key="frame" x="25" y="10" width="325" height="16"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3wB-yD-RDL">
+                                                <rect key="frame" x="5" y="10" width="15" height="15"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="15" id="7rm-qd-HHl"/>
+                                                    <constraint firstAttribute="width" constant="15" id="vXK-qK-vOm"/>
+                                                </constraints>
+                                            </imageView>
+                                        </subviews>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                        <constraints>
+                                            <constraint firstItem="YAv-Su-FV5" firstAttribute="top" secondItem="3wB-yD-RDL" secondAttribute="top" id="3xr-st-qOs"/>
+                                            <constraint firstAttribute="bottom" secondItem="YAv-Su-FV5" secondAttribute="bottom" constant="10" id="DDg-Sf-ktd"/>
+                                            <constraint firstItem="YAv-Su-FV5" firstAttribute="leading" secondItem="3wB-yD-RDL" secondAttribute="trailing" constant="5" id="DtU-6S-Xgm"/>
+                                            <constraint firstItem="YAv-Su-FV5" firstAttribute="top" secondItem="2Wz-ju-uDu" secondAttribute="top" constant="10" id="FOw-bM-Jw5"/>
+                                            <constraint firstItem="3wB-yD-RDL" firstAttribute="leading" secondItem="2Wz-ju-uDu" secondAttribute="leading" constant="10" id="Onq-xi-vO9"/>
+                                            <constraint firstItem="3wB-yD-RDL" firstAttribute="leading" secondItem="2Wz-ju-uDu" secondAttribute="leading" constant="5" id="TBd-kU-h7A"/>
+                                            <constraint firstAttribute="trailing" secondItem="YAv-Su-FV5" secondAttribute="trailing" constant="10" id="rCO-Fg-KRI"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="2Wz-ju-uDu" secondAttribute="trailing" constant="20" id="LPP-Ks-z1e"/>
+                                    <constraint firstItem="2Wz-ju-uDu" firstAttribute="top" secondItem="QGL-JQ-6Bb" secondAttribute="top" constant="10" id="Rfv-ZY-KgQ"/>
+                                    <constraint firstAttribute="bottom" secondItem="2Wz-ju-uDu" secondAttribute="bottom" constant="10" id="bb5-as-FgG"/>
+                                    <constraint firstItem="2Wz-ju-uDu" firstAttribute="leading" secondItem="QGL-JQ-6Bb" secondAttribute="leading" constant="20" id="dSU-AB-ov1"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6X4-0j-ub9">
+                                <rect key="frame" x="0.0" y="96" width="400" height="30"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Z09-SJ-tKX">
+                                        <rect key="frame" x="20" y="0.0" width="160" height="30"/>
+                                        <subviews>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8tS-Ou-Za6">
+                                                <rect key="frame" x="0.0" y="0.0" width="50" height="30"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="50" id="PQb-78-q32"/>
+                                                </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="iTc-8s-Hot">
+                                                <rect key="frame" x="55" y="0.0" width="50" height="30"/>
+                                                <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="2xp-0u-Vjs">
+                                                <rect key="frame" x="110" y="0.0" width="50" height="30"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="2xp-0u-Vjs" firstAttribute="width" secondItem="8tS-Ou-Za6" secondAttribute="width" id="GQI-Lf-Thn"/>
+                                            <constraint firstItem="iTc-8s-Hot" firstAttribute="width" secondItem="8tS-Ou-Za6" secondAttribute="width" id="vOq-EH-Mnh"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="30" id="GLd-ED-hOB"/>
+                                    <constraint firstItem="Z09-SJ-tKX" firstAttribute="top" secondItem="6X4-0j-ub9" secondAttribute="top" id="Mdc-im-bT8"/>
+                                    <constraint firstItem="Z09-SJ-tKX" firstAttribute="leading" secondItem="6X4-0j-ub9" secondAttribute="leading" constant="20" id="x48-Ph-b3k"/>
+                                    <constraint firstAttribute="bottom" secondItem="Z09-SJ-tKX" secondAttribute="bottom" id="y8R-yc-bXf"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QKX-Gi-q6u">
+                                <rect key="frame" x="0.0" y="126" width="400" height="35"/>
+                                <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="SUH-mL-f6A">
+                                        <rect key="frame" x="20" y="10" width="360" height="15"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="15" id="TjF-Hw-Eer"/>
+                                        </constraints>
+                                        <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="bottom" secondItem="SUH-mL-f6A" secondAttribute="bottom" constant="10" id="2Zg-k3-kmr"/>
+                                    <constraint firstItem="SUH-mL-f6A" firstAttribute="leading" secondItem="QKX-Gi-q6u" secondAttribute="leading" constant="20" id="Oqx-ff-8Ke"/>
+                                    <constraint firstItem="SUH-mL-f6A" firstAttribute="top" secondItem="QKX-Gi-q6u" secondAttribute="top" constant="10" id="fAd-9E-Ubj"/>
+                                    <constraint firstAttribute="trailing" secondItem="SUH-mL-f6A" secondAttribute="trailing" constant="20" id="pYE-cR-dEv"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="trailing" secondItem="wuB-zg-tiy" secondAttribute="trailing" id="AKU-o5-Onr"/>
+                    <constraint firstItem="wuB-zg-tiy" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="Dln-cz-3FH"/>
+                    <constraint firstAttribute="bottom" secondItem="wuB-zg-tiy" secondAttribute="bottom" id="Fw2-Or-hjY"/>
+                    <constraint firstItem="wuB-zg-tiy" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="tI4-HU-FCu"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="btn1" destination="8tS-Ou-Za6" id="AVo-mU-OnO"/>
+                <outlet property="btn2" destination="iTc-8s-Hot" id="pCZ-Bl-fpD"/>
+                <outlet property="btn3" destination="2xp-0u-Vjs" id="Jto-j1-hlv"/>
+                <outlet property="hintBgView" destination="2Wz-ju-uDu" id="e3F-l5-5J9"/>
+                <outlet property="hintImgView" destination="3wB-yD-RDL" id="HRu-ft-arI"/>
+                <outlet property="hintLab" destination="YAv-Su-FV5" id="bZa-5X-J48"/>
+                <outlet property="rateLab" destination="SUH-mL-f6A" id="Zha-NN-Mpb"/>
+                <outlet property="titleLab" destination="H39-0L-c4N" id="BUZ-cR-tMe"/>
+            </connections>
+            <point key="canvasLocation" x="188" y="62"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

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

@@ -0,0 +1,85 @@
+//
+//  MDOptionsTimerCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/21.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class MDOptionsTimerCell: BaseTableViewCell {
+    @IBOutlet weak var titleLab: UILabel!
+   
+    @IBOutlet weak var timer1Btn: UIButton!
+    @IBOutlet weak var timer2Btn: UIButton!
+
+    var VM:MDOptionsViewModel = MDOptionsViewModel()
+    var completeBlock:(() -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ALLBackGroundColor
+        self.titleLab.text = switchLanguage("5、订单时间设置")
+        self.setTextFont(.PFSM, 18)
+        self.titleLab.textColor = TitleTextColor
+        
+        self.timer1Btn.setTextFont(.PFSR, 14)
+        self.timer1Btn.setTitleColor(TitleTextColor, for: .normal)
+        self.timer1Btn.setTitle(switchLanguage("当日无流动性,允许T+1日成交"), for: .normal)
+        self.timer1Btn.addTarget(self, action: #selector(clickTimer1BtnAction), for: .touchUpInside)
+        
+        self.timer2Btn.setTextFont(.PFSR, 14)
+        self.timer2Btn.setTitleColor(TitleTextColor, for: .normal)
+        self.timer2Btn.setTitle(switchLanguage("当日无流动性,取消订单"), for: .normal)
+        self.timer2Btn.addTarget(self, action: #selector(clickTimer2BtnAction), for: .touchUpInside)
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    func updateCellWith(vm:MDOptionsViewModel) -> Void {
+        self.VM = vm
+        self.updateBtnLayer(isT_1: vm.isT_1)
+       
+    }
+    
+    
+    
+}
+
+extension MDOptionsTimerCell{
+    @objc func clickTimer1BtnAction(){
+        updateBtnLayer(isT_1: true)
+        self.VM.isT_1 = true;
+        self.completeBlock?()
+    }
+    
+    @objc func clickTimer2BtnAction(){
+        updateBtnLayer(isT_1: false)
+        self.VM.isT_1 = false;
+        self.completeBlock?()
+    }
+    
+    func updateBtnLayer(isT_1:Bool) -> Void {
+        if isT_1 {
+            self.timer1Btn.setImage(_image("Market_W_Select_1&Market_W_Select_1"), for: .normal)
+            self.timer1Btn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
+            
+            self.timer2Btn.setImage(_image("Market_W_unSelect&Market_W_unSelect"), for: .normal)
+            self.timer2Btn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
+            
+        }else{
+            self.timer2Btn.setImage(_image("Market_W_Select_1&Market_W_Select_1"), for: .normal)
+            self.timer2Btn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
+            
+            self.timer1Btn.setImage(_image("Market_W_unSelect&Market_W_unSelect"), for: .normal)
+            self.timer1Btn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
+            
+        }
+    }
+    
+}

+ 108 - 0
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsTimerCell.xib

@@ -0,0 +1,108 @@
+<?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="191" id="KGk-i7-Jjw" customClass="MDOptionsTimerCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="423" height="191"/>
+            <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="423" height="191"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="1bY-L0-jgN">
+                        <rect key="frame" x="0.0" y="0.0" width="423" height="140"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xCW-LN-yHU">
+                                <rect key="frame" x="0.0" y="0.0" width="423" height="40"/>
+                                <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="wMj-KL-4dC">
+                                        <rect key="frame" x="20.000000000000004" y="19.666666666666671" 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="40" id="8G7-cF-kQe"/>
+                                    <constraint firstAttribute="bottom" secondItem="wMj-KL-4dC" secondAttribute="bottom" id="DB0-6k-E2b"/>
+                                    <constraint firstItem="wMj-KL-4dC" firstAttribute="leading" secondItem="xCW-LN-yHU" secondAttribute="leading" constant="20" id="SVb-kl-7Bg"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BQ0-iP-9rK">
+                                <rect key="frame" x="0.0" y="50" width="423" height="90"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Er7-1F-cyn">
+                                        <rect key="frame" x="20" y="0.0" width="383" height="90"/>
+                                        <subviews>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nXE-0U-4dS">
+                                                <rect key="frame" x="0.0" y="0.0" width="383" height="40"/>
+                                                <subviews>
+                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z7m-eo-Yi8">
+                                                        <rect key="frame" x="0.0" y="0.0" width="30" height="40"/>
+                                                        <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="40" id="8c8-5Z-Mqy"/>
+                                                    <constraint firstItem="Z7m-eo-Yi8" firstAttribute="top" secondItem="nXE-0U-4dS" secondAttribute="top" id="Sza-NN-PCW"/>
+                                                    <constraint firstItem="Z7m-eo-Yi8" firstAttribute="leading" secondItem="nXE-0U-4dS" secondAttribute="leading" id="bbG-xT-fzV"/>
+                                                    <constraint firstAttribute="bottom" secondItem="Z7m-eo-Yi8" secondAttribute="bottom" id="spR-nk-e6s"/>
+                                                </constraints>
+                                            </view>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="01L-je-Wgt">
+                                                <rect key="frame" x="0.0" y="40" width="383" height="50"/>
+                                                <subviews>
+                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q7t-DN-rcW">
+                                                        <rect key="frame" x="0.0" y="0.0" width="30" height="50"/>
+                                                        <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="q7t-DN-rcW" firstAttribute="top" secondItem="01L-je-Wgt" secondAttribute="top" id="BoR-ic-0p0"/>
+                                                    <constraint firstAttribute="bottom" secondItem="q7t-DN-rcW" secondAttribute="bottom" id="M3c-eo-DoZ"/>
+                                                    <constraint firstItem="q7t-DN-rcW" firstAttribute="leading" secondItem="01L-je-Wgt" secondAttribute="leading" id="ylx-dQ-QGl"/>
+                                                    <constraint firstAttribute="height" constant="40" id="z47-qs-xiy"/>
+                                                </constraints>
+                                            </view>
+                                        </subviews>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="Er7-1F-cyn" firstAttribute="top" secondItem="BQ0-iP-9rK" secondAttribute="top" id="2Cv-0X-Viy"/>
+                                    <constraint firstAttribute="trailing" secondItem="Er7-1F-cyn" secondAttribute="trailing" constant="20" id="bj5-mP-r2f"/>
+                                    <constraint firstAttribute="bottom" secondItem="Er7-1F-cyn" secondAttribute="bottom" id="nhx-g6-FD1"/>
+                                    <constraint firstItem="Er7-1F-cyn" firstAttribute="leading" secondItem="BQ0-iP-9rK" secondAttribute="leading" constant="20" id="x5w-YX-8n2"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="1bY-L0-jgN" secondAttribute="bottom" constant="10" id="6rK-9a-afe"/>
+                    <constraint firstItem="1bY-L0-jgN" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="RC3-VY-fOx"/>
+                    <constraint firstAttribute="trailing" secondItem="1bY-L0-jgN" secondAttribute="trailing" id="clF-Gs-KU4"/>
+                    <constraint firstItem="1bY-L0-jgN" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="ekH-T6-hIQ"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="timer1Btn" destination="Z7m-eo-Yi8" id="dOM-gj-d8i"/>
+                <outlet property="timer2Btn" destination="q7t-DN-rcW" id="GiW-7w-KZx"/>
+                <outlet property="titleLab" destination="wMj-KL-4dC" id="uMD-bV-Zs4"/>
+            </connections>
+            <point key="canvasLocation" x="202" y="57"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 188 - 6
Koala/Koala/Modular/Market/V/MarketDetailView/MDOptionsView/MDOptionsView.swift

@@ -9,13 +9,195 @@
 import UIKit
 
 class MDOptionsView: BaseView {
+    var VM: MDOptionsViewModel?
+    
+    lazy var tableView: BaseTableView = { [weak self] in
+        let tableView = BaseTableView.init(frame: .zero, style: .grouped)
+        tableView.separatorStyle = .none
+        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: "MDOptionsPeriodCell", bundle: nil), forCellReuseIdentifier: "MDOptionsPeriodCell")
+        
+        tableView.register(UINib.init(nibName: "MDOptionsRateCell", bundle: nil), forCellReuseIdentifier: "MDOptionsRateCell")
+        
+        tableView.register(UINib.init(nibName: "MDOptionsPrincipalCell", bundle: nil), forCellReuseIdentifier: "MDOptionsPrincipalCell")
+        
+        tableView.register(UINib.init(nibName: "MDOptionsPriceCell", bundle: nil), forCellReuseIdentifier: "MDOptionsPriceCell")
+        
+        tableView.register(UINib.init(nibName: "MDOptionsTimerCell", bundle: nil), forCellReuseIdentifier: "MDOptionsTimerCell")
+        
+        tableView.register(UINib.init(nibName: "MDOptionsOrderCell", bundle: nil), forCellReuseIdentifier: "MDOptionsOrderCell")
+        
+        
+        
+        if #available(iOS 11, *){
+            tableView.contentInsetAdjustmentBehavior = .never
+        }
+        return tableView
+        }()
+    
+    override func subView() {
+        self.addSubview(tableView)
+    
+        mySwitchLanguage()
+        mySwitchSkin()
+        
+    }
+    
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        tableView.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+        }
+        
+        
+       
+       
+    }
+    
+    override func setViewModel(viewmodel: AnyObject) {
+        guard viewmodel is MDOptionsViewModel else {
+            return
+        }
+        self.VM = viewmodel as? MDOptionsViewModel
+        super.setViewModel(viewmodel: viewmodel)
+       
+    }
+    
+    override func mySwitchLanguage() {
+        //self.footerView.mySwitchLanguage()
+       
+    }
+    
+    override func mySwitchSkin() {
+        self.tableView.backgroundColor = ViewBorderColor
+        self.backgroundColor = ALLBackGroundColor
+       
+    }
+    
 
-    /*
-    // Only override draw() if you perform custom drawing.
-    // An empty implementation adversely affects performance during animation.
-    override func draw(_ rect: CGRect) {
-        // Drawing code
+    override func blindModel() {
+        VM?.getCashAction.values.observeValues({[weak self] (success) in
+            guard let self = self else { return }
+            if success {
+                self.reloadTable()
+            }
+        })
+        
+        VM?.signalPeriod.observeValues({ [weak self] (success) in
+            guard let self = self else { return }
+            if success {
+                self.reloadTable()
+            }
+        })
     }
-    */
+    
+    
+    func reloadTable() {
+        DispatchQueue.main.async {
+//            self.tableView.mj_header!.endRefreshing()
+            self.tableView.reloadData()
+        }
+    }
+
 
 }
+
+//代理
+extension MDOptionsView:UITableViewDelegate,UITableViewDataSource{
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 6
+    }
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        if indexPath.section == 0 {
+            let cell:MDOptionsPeriodCell = tableView.dequeueReusableCell(withIdentifier: "MDOptionsPeriodCell") as! MDOptionsPeriodCell
+            cell.updateCellWith(vm: self.VM!)
+            cell.completeBlock = {
+                self.reloadTable()
+            }
+            return cell
+        }
+        else if indexPath.section == 1{
+            let cell:MDOptionsRateCell = tableView.dequeueReusableCell(withIdentifier: "MDOptionsRateCell") as! MDOptionsRateCell
+            cell.updateCellWith(vm: self.VM!)
+            cell.completeBlock = {
+                self.reloadTable()
+            }
+            return cell
+        }
+        else if indexPath.section == 2{
+            let cell:MDOptionsPrincipalCell = tableView.dequeueReusableCell(withIdentifier: "MDOptionsPrincipalCell") as! MDOptionsPrincipalCell
+            cell.updateCellWith(vm: self.VM!)
+            cell.completeBlock = {
+                self.reloadTable()
+            }
+            return cell
+        }
+        else if indexPath.section == 3{
+            let cell:MDOptionsPriceCell = tableView.dequeueReusableCell(withIdentifier: "MDOptionsPriceCell") as! MDOptionsPriceCell
+            cell.updateCellWith(vm: self.VM!)
+            cell.completeBlock = {
+                self.reloadTable()
+            }
+            return cell
+        }
+        else if indexPath.section == 4{
+            let cell:MDOptionsTimerCell = tableView.dequeueReusableCell(withIdentifier: "MDOptionsTimerCell") as! MDOptionsTimerCell
+            cell.updateCellWith(vm: self.VM!)
+            cell.completeBlock = {
+                self.reloadTable()
+            }
+            return cell
+        }
+        
+        
+        let cell:MDOptionsOrderCell = tableView.dequeueReusableCell(withIdentifier: "MDOptionsOrderCell") as! MDOptionsOrderCell
+       
+        cell.updateCellWith(vm: self.VM!)
+        
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        if indexPath.section == 0 {
+            return CGFloat(140 + self.VM!.periodList.count * 45)
+        }
+       
+        return -1
+    }
+    
+    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.01
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 5
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+       
+    }
+    
+}
+

+ 22 - 11
Koala/Koala/Modular/Market/VC/MarketDetailViewController.swift

@@ -58,7 +58,7 @@ class MarketDetailViewController: BaseViewController {
     
     lazy var scrollView: UIScrollView = {
         let scrollView = UIScrollView()
-        scrollView.contentSize = CGSize(width: SCREEN_WIDTH * 6, height: SCREEN_HEIGHT-44)
+        scrollView.contentSize = CGSize(width: SCREEN_WIDTH * 5, height: SCREEN_HEIGHT-44)
         scrollView.isPagingEnabled = true
         scrollView.delegate = self
         scrollView.showsVerticalScrollIndicator = false
@@ -68,7 +68,7 @@ class MarketDetailViewController: BaseViewController {
         scrollView.addSubview(financeView)
         scrollView.addSubview(profileView)
         scrollView.addSubview(newsView)
-        scrollView.addSubview(announcementView)
+       // scrollView.addSubview(announcementView)
         scrollView.addSubview(optionsView)
         
         
@@ -99,15 +99,15 @@ class MarketDetailViewController: BaseViewController {
             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)
-        }
+//        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.left.equalTo(newsView.snp.right)
             make.right.top.equalToSuperview()
             make.height.equalTo(SCREEN_HEIGHT-TopHeight-44)
             make.width.equalTo(SCREEN_WIDTH)
@@ -133,7 +133,7 @@ class MarketDetailViewController: BaseViewController {
             self.index = Int(index)
             
         }
-        segmentedControl.sectionTitles = [switchLanguage("报价"),switchLanguage("财务"),switchLanguage("简况"),switchLanguage("新闻"),switchLanguage("公告"),switchLanguage("个股期股")]
+        segmentedControl.sectionTitles = [switchLanguage("报价"),switchLanguage("财务"),switchLanguage("简况"),switchLanguage("新闻"),switchLanguage("个股期股")]
         return segmentedControl
     }()
     
@@ -194,7 +194,7 @@ class MarketDetailViewController: BaseViewController {
         if self.symbolModel.market == "CFD"{
             self.segmentedControl.sectionTitles = [switchLanguage("报价")]
         }else{
-            segmentedControl.sectionTitles = [switchLanguage("报价"),switchLanguage("财务"),switchLanguage("简况"),switchLanguage("新闻"),switchLanguage("公告"),switchLanguage("个股期股")]
+            segmentedControl.sectionTitles = [switchLanguage("报价"),switchLanguage("财务"),switchLanguage("简况"),switchLanguage("新闻"),switchLanguage("个股期股")]
         }
         
         self.navView.updateDataWith(model: self.symbolModel)
@@ -207,6 +207,12 @@ class MarketDetailViewController: BaseViewController {
         self.profileViewModel.symbolModel = self.symbolModel
         
         self.newsViewModel.symbolModel = self.symbolModel
+        
+        self.optionsViewModel.symbolModel = self.symbolModel
+        
+        self.optionsViewModel.getPeriodList()
+        self.optionsViewModel.netOptionProductListGroup()
+        
     }
     
     func updateContentOffset() -> Void {
@@ -249,6 +255,11 @@ class MarketDetailViewController: BaseViewController {
         else if index == 3{
             self.newsView.VM?.netNewsList(isUp: false)
         }
+        else if index == 4{
+            if OperationalUserInfoData.getLogin(){
+                self.optionsView.VM?.netGetCash()
+            }
+        }
     }
     
     deinit {

+ 205 - 1
Koala/Koala/Modular/Market/VM/MDOptionsViewModel.swift

@@ -7,7 +7,211 @@
 //
 
 import UIKit
-
+import ReactiveCocoa
+import ReactiveSwift
 class MDOptionsViewModel: BaseViewModel {
+    var symbolModel:KSymbolModel = KSymbolModel()
+    
+    lazy var periodList:[MDPeriodModel] = {
+        let arr:[MDPeriodModel] = [MDPeriodModel]()
+        return arr
+    }()
+    
+    var selectPeriodModel = MDPeriodModel()
+    
+    var capRates:CGFloat = 0.00
+    
+    var principal:CGFloat = 1
+    var isMarket:Bool = true
+    var limited:CGFloat = 0.00
+    var cycle:Int = 1
+    var standard:String = ""
+    var isT_1:Bool = true
+    
+    var rule:String = ""
+    var type:String = ""
+    
+    var optionsListModel:OptionsListModel = OptionsListModel()
+    var cashModel:CashModel = CashModel()
+    
+    let (signalPeriod, observePeriod) = Signal<Bool, Never>.pipe()
+    //netForGetCash
+    //netForInsertOptionOrder
+    var getCashAction: Action <(),(Bool),Never>!
+    var optionProductListGroupAction: Action <(),(Bool),Never>!
+    var insertOptionOrderAction: Action <(),(Bool),Never>!
+    
+    override func initialize() {
+        getCashAction = Action<(),(Bool),Never> {[weak self] _ in
+            return SignalProducer<(Bool),Never>{ observer, _ in
+                self?.requestGetCash(observer: observer)
+            }
+        }
+        
+        optionProductListGroupAction = Action<(),(Bool),Never> {[weak self] _ in
+            return SignalProducer<(Bool),Never>{ observer, _ in
+                self?.requestOptionProductListGroup(observer: observer)
+            }
+        }
+        
+        insertOptionOrderAction = Action<(),(Bool),Never> {[weak self] _ in
+            return SignalProducer<(Bool),Never>{ observer, _ in
+                self?.requestInsertOptionOrder(observer: observer)
+            }
+        }
+        
+    }
+}
 
+extension MDOptionsViewModel{
+    //余额
+    func netGetCash() {
+        getCashAction.apply().start()
+    }
+    //余额
+    func requestGetCash(observer: Signal< Bool, Never>.Observer) -> Void {
+        
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForGetCash , success: {[weak self] (code, result) in
+            ProgressHUD.hideHud()
+            if let dict:NSDictionary = result as? NSDictionary {
+                self?.cashModel = CashModel.deserialize(from: dict)!
+                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 netOptionProductListGroup() {
+        optionProductListGroupAction.apply().start()
+    }
+    //
+    func requestOptionProductListGroup(observer: Signal< Bool, Never>.Observer) -> Void {
+        
+        ProgressHUD.showLoading()
+        let param : [String : Any] = [
+            "code" : self.symbolModel.symbol
+        ]
+        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] {
+                for dict in list{
+                    self?.optionsListModel = OptionsListModel.deserialize(from: dict)!
+                    self?.getPeriodList()
+                }
+                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 netInsertOptionOrder() {
+        guard self.selectPeriodModel.timer.length > 0 else{
+            ProgressHUD.showInfo(status: switchLanguage("请选择时间周期"))
+            return
+        }
+        insertOptionOrderAction.apply().start()
+    }
+    //下单
+    func requestInsertOptionOrder(observer: Signal< Bool, Never>.Observer) -> Void {
+        let param = [
+            "code":self.symbolModel.symbol,
+            "title":self.symbolModel.title,
+            "type":self.type,
+            "rule":self.rule,
+            "standard":self.standard,
+            "cycle":self.cycle,
+            "max_price":self.capRates,
+            "amount":self.principal * 10000,
+            "bak":self.isT_1 ? "1" : "2",
+            "expected_open_price":self.isMarket ? 0 : self.limited
+        ] as [String : Any]
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForInsertOptionOrder ,parameters: param ,success: {[weak self] (code, result) in
+            ProgressHUD.hideHud()
+            if let dict:NSDictionary = result as? NSDictionary {
+                self?.getPeriodList()
+                self?.selectPeriodModel = MDPeriodModel()
+                ProgressHUD.showSuccess(status: switchLanguage("下单成功"))
+                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 MDOptionsViewModel{
+    
+    func getPeriodList() -> Void {
+        self.periodList.removeAll()
+        for i in 1...6{
+            self.setMDPeriodModelAction(timer: i)
+        }
+        
+        self.observePeriod.send(value: true)
+    }
+    
+    
+    func setMDPeriodModelAction(timer:Int) -> Void {
+        let model = MDPeriodModel()
+        let dict = self.optionsListModel.toJSON()
+        let key = String(format: "price_%dm_list", timer)
+        if let value:String = dict?[key] as? String{
+            if value.length == 0 {
+                return
+            }
+            model.timer = String(format:switchLanguage("%d个月"), timer)
+            model.timerData = timer
+            let arr = value.components(separatedBy: ",")
+            model.averageRate = arr.first?.replacingOccurrences(of: " ", with: "") ?? ""
+            model.nominalRate = arr.last?.replacingOccurrences(of: " ", with: "") ?? ""
+        }
+        
+        let arr1 = self.optionsListModel.type_list.components(separatedBy: ",")
+        let arr2 = self.optionsListModel.rule_list.components(separatedBy: ",")
+        let arr3 = self.optionsListModel.standard_list.components(separatedBy: ",")
+        
+        model.averageType = arr1.first?.replacingOccurrences(of: " ", with: "") ?? ""
+        model.nominalType = arr1.last?.replacingOccurrences(of: " ", with: "") ?? ""
+        
+        model.averageRule = arr2.first?.replacingOccurrences(of: " ", with: "") ?? ""
+        model.nominalRule = arr2.last?.replacingOccurrences(of: " ", with: "") ?? ""
+        
+        model.averageStandard = arr3.first?.replacingOccurrences(of: " ", with: "") ?? ""
+        model.nominalStandard = arr3.last?.replacingOccurrences(of: " ", with: "") ?? ""
+        
+        self.periodList.append(model)
+       
+    }
+    
+    
+    
+    
+}
+

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

@@ -121,4 +121,9 @@ class UpdateModel: BaseModel {
     
 }
 
+class CashModel: BaseModel {
+    var frozen: String = ""
+    var balance: String = ""
+    var uid: String = ""
+}
 

BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_BNB.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_BNB.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_BNB.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_BTC.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_BTC.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_BTC.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_ETH.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_ETH.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_ETH.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_TRX.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_TRX.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_TRX.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDC.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDC.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDC.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDT.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDT.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_USDT.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Code.imageset/组 2287.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Code.imageset/组 2287@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Code.imageset/组 2287@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Copy.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Copy.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Copy.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deal.imageset/2.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deal.imageset/2@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deal.imageset/2@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Delete.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Delete.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Delete.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Copy.imageset/69.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Copy.imageset/69@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Copy.imageset/69@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Record.imageset/56.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Record.imageset/56@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Deposit_Record.imageset/56@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Exchange.imageset/10.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Exchange.imageset/10@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Exchange.imageset/10@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Finance.imageset/28.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Finance.imageset/28@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Finance.imageset/28@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Hide_Small.imageset/减去 565.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Hide_Small.imageset/减去 565@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Hide_Small.imageset/减去 565@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_In.imageset/2.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_In.imageset/2@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_In.imageset/2@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Out.imageset/2.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Out.imageset/2@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Out.imageset/2@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Proxy.imageset/28.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Proxy.imageset/28@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Proxy.imageset/28@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Record.imageset/17.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Record.imageset/17@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Record.imageset/17@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Screen.imageset/39.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Screen.imageset/39@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Screen.imageset/39@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Select.imageset/6.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Select.imageset/6@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Select.imageset/6@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Set.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Set.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Set.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Show.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Show.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Show.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_UnHide_Small.imageset/矩形 8703.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_UnHide_Small.imageset/矩形 8703@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_UnHide_Small.imageset/矩形 8703@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Wallet.imageset/2.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Wallet.imageset/2@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_Wallet.imageset/2@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_unSelect.imageset/invalidName.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_unSelect.imageset/invalidName@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/Assets_W_unSelect.imageset/invalidName@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Assets/jd_check.imageset/check.png


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä