3 Commit-ok cac344f5f9 ... 2a4df7bef5

Szerző SHA1 Üzenet Dátum
  Kevin 2a4df7bef5 1. 修改 tabbar 图标 1 éve
  Kevin 98846b48d3 ⚠️⚠️⚠️目前环境地址是测试环境,固定写死⚠️⚠️⚠️ 1 éve
  Kevin c4ddff257e 选择设备类型页面基本完成,未添加点击事件 1 éve
90 módosított fájl, 687 hozzáadás és 218 törlés
  1. 10 2
      Temperature.xcodeproj/project.pbxproj
  2. 22 0
      Temperature/Assets.xcassets/DeviceType/type_fluorine_main_controller.imageset/Contents.json
  3. BIN
      Temperature/Assets.xcassets/DeviceType/type_fluorine_main_controller.imageset/type_fluorine_main_controller@2x.png
  4. BIN
      Temperature/Assets.xcassets/DeviceType/type_fluorine_main_controller.imageset/type_fluorine_main_controller@3x.png
  5. 22 0
      Temperature/Assets.xcassets/DeviceType/type_fluorine_sub_controller.imageset/Contents.json
  6. BIN
      Temperature/Assets.xcassets/DeviceType/type_fluorine_sub_controller.imageset/type_fluorine_sub_controller@2x.png
  7. BIN
      Temperature/Assets.xcassets/DeviceType/type_fluorine_sub_controller.imageset/type_fluorine_sub_controller@3x.png
  8. 22 0
      Temperature/Assets.xcassets/DeviceType/type_intelligent_water_collector.imageset/Contents.json
  9. BIN
      Temperature/Assets.xcassets/DeviceType/type_intelligent_water_collector.imageset/type_intelligent_water_collector@2x.png
  10. BIN
      Temperature/Assets.xcassets/DeviceType/type_intelligent_water_collector.imageset/type_intelligent_water_collector@3x.png
  11. 21 0
      Temperature/Assets.xcassets/DeviceType/type_water_main_controller.imageset/Contents.json
  12. BIN
      Temperature/Assets.xcassets/DeviceType/type_water_main_controller.imageset/type_water_main_controller@2x.png
  13. 21 0
      Temperature/Assets.xcassets/DeviceType/type_water_main_controller@2x.imageset/Contents.json
  14. BIN
      Temperature/Assets.xcassets/DeviceType/type_water_main_controller@2x.imageset/type_water_main_controller@2x@3x.png
  15. 22 0
      Temperature/Assets.xcassets/DeviceType/type_water_sub_controller.imageset/Contents.json
  16. BIN
      Temperature/Assets.xcassets/DeviceType/type_water_sub_controller.imageset/type_water_sub_controller@2x.png
  17. BIN
      Temperature/Assets.xcassets/DeviceType/type_water_sub_controller.imageset/type_water_sub_controller@3x.png
  18. BIN
      Temperature/Assets.xcassets/Home/.DS_Store
  19. BIN
      Temperature/Assets.xcassets/devCtl/.DS_Store
  20. BIN
      Temperature/Assets.xcassets/devCtl/icon_fan.imageset/icon_fan@2x.png
  21. BIN
      Temperature/Assets.xcassets/devCtl/icon_fan.imageset/icon_fan@3x.png
  22. BIN
      Temperature/Assets.xcassets/devCtl/icon_newair.imageset/icon_newair@2x.png
  23. BIN
      Temperature/Assets.xcassets/devCtl/icon_newair.imageset/icon_newair@3x.png
  24. BIN
      Temperature/Assets.xcassets/devCtl/icon_newair_sel.imageset/icon_newair_sel@2x.png
  25. BIN
      Temperature/Assets.xcassets/devCtl/icon_newair_sel.imageset/icon_newair_sel@3x.png
  26. 2 2
      Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/Contents.json
  27. BIN
      Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/icon_on_1@2x.png
  28. BIN
      Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/icon_on_1@3x.png
  29. BIN
      Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/icon_on_sel 1@2x.png
  30. BIN
      Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/icon_on_sel 1@3x.png
  31. 2 2
      Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/Contents.json
  32. BIN
      Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/icon_on_sel@2x.png
  33. BIN
      Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/icon_on_sel@3x.png
  34. BIN
      Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/icon_on_sel_1@2x.png
  35. BIN
      Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/icon_on_sel_1@3x.png
  36. BIN
      Temperature/Assets.xcassets/devCtl/icon_point.imageset/icon_point@2x.png
  37. BIN
      Temperature/Assets.xcassets/devCtl/icon_point.imageset/icon_point@3x.png
  38. 22 0
      Temperature/Assets.xcassets/devCtl/icon_sleep.imageset/Contents.json
  39. BIN
      Temperature/Assets.xcassets/devCtl/icon_sleep.imageset/icon_sleep@2x.png
  40. BIN
      Temperature/Assets.xcassets/devCtl/icon_sleep.imageset/icon_sleep@3x.png
  41. 22 0
      Temperature/Assets.xcassets/devCtl/icon_sleep_sel.imageset/Contents.json
  42. BIN
      Temperature/Assets.xcassets/devCtl/icon_sleep_sel.imageset/icon_sleep_sel@2x.png
  43. BIN
      Temperature/Assets.xcassets/devCtl/icon_sleep_sel.imageset/icon_sleep_sel@3x.png
  44. BIN
      Temperature/Assets.xcassets/devCtl/icon_time.imageset/icon_time@2x.png
  45. BIN
      Temperature/Assets.xcassets/devCtl/icon_time.imageset/icon_time@3x.png
  46. BIN
      Temperature/Assets.xcassets/devCtl/icon_time_sel.imageset/icon_time_sel@2x.png
  47. BIN
      Temperature/Assets.xcassets/devCtl/icon_time_sel.imageset/icon_time_sel@3x.png
  48. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_home.imageset/icon_tab_home@2x.png
  49. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_home.imageset/icon_tab_home@3x.png
  50. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_home_sel.imageset/icon_tab_home_sel@2x.png
  51. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_home_sel.imageset/icon_tab_home_sel@3x.png
  52. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_me.imageset/icon_tab_me@2x.png
  53. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_me.imageset/icon_tab_me@3x.png
  54. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_me_sel.imageset/icon_tab_me_sel@2x.png
  55. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_me_sel.imageset/icon_tab_me_sel@3x.png
  56. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_room.imageset/icon_tab_room@2x.png
  57. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_room.imageset/icon_tab_room@3x.png
  58. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_room_sel.imageset/icon_tab_room_sel@2x.png
  59. BIN
      Temperature/Assets.xcassets/tabbar/icon_tab_room_sel.imageset/icon_tab_room_sel@3x.png
  60. 3 0
      Temperature/ControlModule/Home/Controller/RDSAddRoomVC.h
  61. 3 1
      Temperature/ControlModule/Home/Controller/RDSAddRoomVC.m
  62. 37 15
      Temperature/ControlModule/Home/Controller/RDSAirControlVC.m
  63. 153 123
      Temperature/ControlModule/Home/Controller/RDSAirControlVC.xib
  64. 3 0
      Temperature/ControlModule/Home/Controller/RDSBindDeviceVC.h
  65. 1 1
      Temperature/ControlModule/Home/Controller/RDSBindDeviceVC.m
  66. 2 0
      Temperature/ControlModule/Home/Controller/RDSBindSubDeviceVC.h
  67. 3 1
      Temperature/ControlModule/Home/Controller/RDSBindSubDeviceVC.m
  68. 8 3
      Temperature/ControlModule/Home/Controller/RDSHomeVC.m
  69. 2 0
      Temperature/ControlModule/Home/Controller/RDSInputWiFiVC.h
  70. 1 0
      Temperature/ControlModule/Home/Controller/RDSInputWiFiVC.m
  71. 3 0
      Temperature/ControlModule/Home/Controller/RDSResetDeviceVC.h
  72. 4 2
      Temperature/ControlModule/Home/Controller/RDSResetDeviceVC.m
  73. 3 12
      Temperature/ControlModule/Home/Controller/RDSSelectDeviceMainVC.m
  74. 28 5
      Temperature/ControlModule/Home/Controller/RDSSelectDeviceSubVC.m
  75. 11 11
      Temperature/ControlModule/Home/Controller/RDSSubControlVC.m
  76. 27 19
      Temperature/ControlModule/Home/Controller/RDSSubControlVC.xib
  77. 2 0
      Temperature/ControlModule/Home/Model/RDSDeviceTypeModel.h
  78. 12 0
      Temperature/ControlModule/Home/Model/RDSDeviceTypeModel.m
  79. 1 1
      Temperature/ControlModule/Home/View/RDSCtrlModeView.m
  80. 19 0
      Temperature/ControlModule/Home/View/RDSDeviceTypeCell.h
  81. 49 0
      Temperature/ControlModule/Home/View/RDSDeviceTypeCell.m
  82. 77 3
      Temperature/ControlModule/Home/View/RDSRoomCell.m
  83. 1 1
      Temperature/ControlModule/Room/Controller/RDSRoomVC.m
  84. 5 0
      Temperature/ControlModule/Room/Model/RDSRoomModel.h
  85. 8 0
      Temperature/ControlModule/Room/Model/RDSRoomModel.m
  86. 0 6
      Temperature/Info.plist
  87. 5 1
      Temperature/NetWork/RDSDemoApiHelper.h
  88. 20 1
      Temperature/NetWork/RDSDemoApiHelper.m
  89. 3 3
      Temperature/ThirdPart/CYCircularSlider/CYCircularSlider.m
  90. 5 3
      Temperature/Tools/Slider/RDSlider.m

+ 10 - 2
Temperature.xcodeproj/project.pbxproj

@@ -12,6 +12,7 @@
 		03245AFF2A8E5E2B003DF602 /* RDSDeviceTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 03245AFE2A8E5E2B003DF602 /* RDSDeviceTypeModel.m */; };
 		03245AFF2A8E5E2B003DF602 /* RDSDeviceTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 03245AFE2A8E5E2B003DF602 /* RDSDeviceTypeModel.m */; };
 		03D1A3712A8CF47700106033 /* UIFont+Temperature.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D1A3702A8CF47700106033 /* UIFont+Temperature.m */; };
 		03D1A3712A8CF47700106033 /* UIFont+Temperature.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D1A3702A8CF47700106033 /* UIFont+Temperature.m */; };
 		03D1A3742A8CF5B200106033 /* UIColor+Temperature.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D1A3732A8CF5B200106033 /* UIColor+Temperature.m */; };
 		03D1A3742A8CF5B200106033 /* UIColor+Temperature.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D1A3732A8CF5B200106033 /* UIColor+Temperature.m */; };
+		03DB89162A9789A900718F10 /* RDSDeviceTypeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 03DB89152A9789A900718F10 /* RDSDeviceTypeCell.m */; };
 		19F0EABC3C1DE4F3D3AD4610 /* Pods_Temperature.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B774C01636692E126F78C586 /* Pods_Temperature.framework */; };
 		19F0EABC3C1DE4F3D3AD4610 /* Pods_Temperature.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B774C01636692E126F78C586 /* Pods_Temperature.framework */; };
 		220357E6293466D50081B5B8 /* RDSConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = 220357E5293466D40081B5B8 /* RDSConstant.m */; };
 		220357E6293466D50081B5B8 /* RDSConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = 220357E5293466D40081B5B8 /* RDSConstant.m */; };
 		220357EA293735BF0081B5B8 /* RDSMemberModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 220357E9293735BF0081B5B8 /* RDSMemberModel.m */; };
 		220357EA293735BF0081B5B8 /* RDSMemberModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 220357E9293735BF0081B5B8 /* RDSMemberModel.m */; };
@@ -208,6 +209,8 @@
 		03D1A3702A8CF47700106033 /* UIFont+Temperature.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIFont+Temperature.m"; sourceTree = "<group>"; };
 		03D1A3702A8CF47700106033 /* UIFont+Temperature.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIFont+Temperature.m"; sourceTree = "<group>"; };
 		03D1A3722A8CF5B200106033 /* UIColor+Temperature.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIColor+Temperature.h"; sourceTree = "<group>"; };
 		03D1A3722A8CF5B200106033 /* UIColor+Temperature.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIColor+Temperature.h"; sourceTree = "<group>"; };
 		03D1A3732A8CF5B200106033 /* UIColor+Temperature.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+Temperature.m"; sourceTree = "<group>"; };
 		03D1A3732A8CF5B200106033 /* UIColor+Temperature.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+Temperature.m"; sourceTree = "<group>"; };
+		03DB89142A9789A900718F10 /* RDSDeviceTypeCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RDSDeviceTypeCell.h; sourceTree = "<group>"; };
+		03DB89152A9789A900718F10 /* RDSDeviceTypeCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RDSDeviceTypeCell.m; sourceTree = "<group>"; };
 		220357E5293466D40081B5B8 /* RDSConstant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RDSConstant.m; sourceTree = "<group>"; };
 		220357E5293466D40081B5B8 /* RDSConstant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RDSConstant.m; sourceTree = "<group>"; };
 		220357E8293735BF0081B5B8 /* RDSMemberModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RDSMemberModel.h; sourceTree = "<group>"; };
 		220357E8293735BF0081B5B8 /* RDSMemberModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RDSMemberModel.h; sourceTree = "<group>"; };
 		220357E9293735BF0081B5B8 /* RDSMemberModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RDSMemberModel.m; sourceTree = "<group>"; };
 		220357E9293735BF0081B5B8 /* RDSMemberModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RDSMemberModel.m; sourceTree = "<group>"; };
@@ -841,6 +844,8 @@
 		22A8C240290387B4008B9448 /* View */ = {
 		22A8C240290387B4008B9448 /* View */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				03DB89142A9789A900718F10 /* RDSDeviceTypeCell.h */,
+				03DB89152A9789A900718F10 /* RDSDeviceTypeCell.m */,
 				22CC22FF2907830B00E627E9 /* RDSHomeTopView.h */,
 				22CC22FF2907830B00E627E9 /* RDSHomeTopView.h */,
 				22CC23002907830B00E627E9 /* RDSHomeTopView.m */,
 				22CC23002907830B00E627E9 /* RDSHomeTopView.m */,
 				22CC23022907833200E627E9 /* RDSHomeTopView.xib */,
 				22CC23022907833200E627E9 /* RDSHomeTopView.xib */,
@@ -1554,6 +1559,7 @@
 				22AAFB2229657F1500C54580 /* NSMutableDictionary+addObj.m in Sources */,
 				22AAFB2229657F1500C54580 /* NSMutableDictionary+addObj.m in Sources */,
 				227AC3E12967AF3A00814FBF /* RDSCtrlModeView.m in Sources */,
 				227AC3E12967AF3A00814FBF /* RDSCtrlModeView.m in Sources */,
 				22CC237D2907921300E627E9 /* GTMBase64.m in Sources */,
 				22CC237D2907921300E627E9 /* GTMBase64.m in Sources */,
+				03DB89162A9789A900718F10 /* RDSDeviceTypeCell.m in Sources */,
 				22CC23322907919400E627E9 /* UIControl+HitRect.m in Sources */,
 				22CC23322907919400E627E9 /* UIControl+HitRect.m in Sources */,
 				22AFE61C29135DD100793E79 /* RDSLoginPwdCodeVC.m in Sources */,
 				22AFE61C29135DD100793E79 /* RDSLoginPwdCodeVC.m in Sources */,
 				22CC23772907921300E627E9 /* RDSTools.m in Sources */,
 				22CC23772907921300E627E9 /* RDSTools.m in Sources */,
@@ -1821,7 +1827,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 2023061215;
 				CURRENT_PROJECT_VERSION = 2023061215;
-				DEVELOPMENT_TEAM = FBAS2Y3Z2S;
+				DEVELOPMENT_TEAM = Z675BR2K4U;
 				FRAMEWORK_SEARCH_PATHS = (
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(inherited)",
 					"$(PROJECT_DIR)/Temperature/Tools/Location/BaiduMapSDK",
 					"$(PROJECT_DIR)/Temperature/Tools/Location/BaiduMapSDK",
@@ -1831,6 +1837,7 @@
 				INFOPLIST_FILE = Temperature/Info.plist;
 				INFOPLIST_FILE = Temperature/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = "永续绿建五恒";
 				INFOPLIST_KEY_CFBundleDisplayName = "永续绿建五恒";
 				INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "开启后,才能连接设备";
 				INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "开启后,才能连接设备";
+				INFOPLIST_KEY_NSBluetoothPeripheralUsageDescription = "需要打开蓝牙,才能添加主控面板设备";
 				INFOPLIST_KEY_NSCameraUsageDescription = "App需要您的同意,才能使用相机设置用户头像";
 				INFOPLIST_KEY_NSCameraUsageDescription = "App需要您的同意,才能使用相机设置用户头像";
 				INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "开启后,才能获取定位信息,用于绑定设备和加载天气信息";
 				INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "开启后,才能获取定位信息,用于绑定设备和加载天气信息";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "开启后,才能获取定位信息,用于加载天气信息";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "开启后,才能获取定位信息,用于加载天气信息";
@@ -1867,7 +1874,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 2023061215;
 				CURRENT_PROJECT_VERSION = 2023061215;
-				DEVELOPMENT_TEAM = FBAS2Y3Z2S;
+				DEVELOPMENT_TEAM = Z675BR2K4U;
 				FRAMEWORK_SEARCH_PATHS = (
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(inherited)",
 					"$(PROJECT_DIR)/Temperature/Tools/Location/BaiduMapSDK",
 					"$(PROJECT_DIR)/Temperature/Tools/Location/BaiduMapSDK",
@@ -1877,6 +1884,7 @@
 				INFOPLIST_FILE = Temperature/Info.plist;
 				INFOPLIST_FILE = Temperature/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = "永续绿建五恒";
 				INFOPLIST_KEY_CFBundleDisplayName = "永续绿建五恒";
 				INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "开启后,才能连接设备";
 				INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "开启后,才能连接设备";
+				INFOPLIST_KEY_NSBluetoothPeripheralUsageDescription = "需要打开蓝牙,才能添加主控面板设备";
 				INFOPLIST_KEY_NSCameraUsageDescription = "App需要您的同意,才能使用相机设置用户头像";
 				INFOPLIST_KEY_NSCameraUsageDescription = "App需要您的同意,才能使用相机设置用户头像";
 				INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "开启后,才能获取定位信息,用于绑定设备和加载天气信息";
 				INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "开启后,才能获取定位信息,用于绑定设备和加载天气信息";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "开启后,才能获取定位信息,用于加载天气信息";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "开启后,才能获取定位信息,用于加载天气信息";

+ 22 - 0
Temperature/Assets.xcassets/DeviceType/type_fluorine_main_controller.imageset/Contents.json

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

BIN
Temperature/Assets.xcassets/DeviceType/type_fluorine_main_controller.imageset/type_fluorine_main_controller@2x.png


BIN
Temperature/Assets.xcassets/DeviceType/type_fluorine_main_controller.imageset/type_fluorine_main_controller@3x.png


+ 22 - 0
Temperature/Assets.xcassets/DeviceType/type_fluorine_sub_controller.imageset/Contents.json

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

BIN
Temperature/Assets.xcassets/DeviceType/type_fluorine_sub_controller.imageset/type_fluorine_sub_controller@2x.png


BIN
Temperature/Assets.xcassets/DeviceType/type_fluorine_sub_controller.imageset/type_fluorine_sub_controller@3x.png


+ 22 - 0
Temperature/Assets.xcassets/DeviceType/type_intelligent_water_collector.imageset/Contents.json

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

BIN
Temperature/Assets.xcassets/DeviceType/type_intelligent_water_collector.imageset/type_intelligent_water_collector@2x.png


BIN
Temperature/Assets.xcassets/DeviceType/type_intelligent_water_collector.imageset/type_intelligent_water_collector@3x.png


+ 21 - 0
Temperature/Assets.xcassets/DeviceType/type_water_main_controller.imageset/Contents.json

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

BIN
Temperature/Assets.xcassets/DeviceType/type_water_main_controller.imageset/type_water_main_controller@2x.png


+ 21 - 0
Temperature/Assets.xcassets/DeviceType/type_water_main_controller@2x.imageset/Contents.json

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

BIN
Temperature/Assets.xcassets/DeviceType/type_water_main_controller@2x.imageset/type_water_main_controller@2x@3x.png


+ 22 - 0
Temperature/Assets.xcassets/DeviceType/type_water_sub_controller.imageset/Contents.json

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

BIN
Temperature/Assets.xcassets/DeviceType/type_water_sub_controller.imageset/type_water_sub_controller@2x.png


BIN
Temperature/Assets.xcassets/DeviceType/type_water_sub_controller.imageset/type_water_sub_controller@3x.png


BIN
Temperature/Assets.xcassets/Home/.DS_Store


BIN
Temperature/Assets.xcassets/devCtl/.DS_Store


BIN
Temperature/Assets.xcassets/devCtl/icon_fan.imageset/icon_fan@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_fan.imageset/icon_fan@3x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_newair.imageset/icon_newair@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_newair.imageset/icon_newair@3x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_newair_sel.imageset/icon_newair_sel@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_newair_sel.imageset/icon_newair_sel@3x.png


+ 2 - 2
Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
       "scale" : "1x"
     },
     },
     {
     {
-      "filename" : "icon_on_sel 1@2x.png",
+      "filename" : "icon_on_1@2x.png",
       "idiom" : "universal",
       "idiom" : "universal",
       "scale" : "2x"
       "scale" : "2x"
     },
     },
     {
     {
-      "filename" : "icon_on_sel 1@3x.png",
+      "filename" : "icon_on_1@3x.png",
       "idiom" : "universal",
       "idiom" : "universal",
       "scale" : "3x"
       "scale" : "3x"
     }
     }

BIN
Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/icon_on_1@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/icon_on_1@3x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/icon_on_sel 1@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_on_1.imageset/icon_on_sel 1@3x.png


+ 2 - 2
Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
       "scale" : "1x"
     },
     },
     {
     {
-      "filename" : "icon_on_sel@2x.png",
+      "filename" : "icon_on_sel_1@2x.png",
       "idiom" : "universal",
       "idiom" : "universal",
       "scale" : "2x"
       "scale" : "2x"
     },
     },
     {
     {
-      "filename" : "icon_on_sel@3x.png",
+      "filename" : "icon_on_sel_1@3x.png",
       "idiom" : "universal",
       "idiom" : "universal",
       "scale" : "3x"
       "scale" : "3x"
     }
     }

BIN
Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/icon_on_sel@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/icon_on_sel@3x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/icon_on_sel_1@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_on_sel_1.imageset/icon_on_sel_1@3x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_point.imageset/icon_point@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_point.imageset/icon_point@3x.png


+ 22 - 0
Temperature/Assets.xcassets/devCtl/icon_sleep.imageset/Contents.json

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

BIN
Temperature/Assets.xcassets/devCtl/icon_sleep.imageset/icon_sleep@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_sleep.imageset/icon_sleep@3x.png


+ 22 - 0
Temperature/Assets.xcassets/devCtl/icon_sleep_sel.imageset/Contents.json

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

BIN
Temperature/Assets.xcassets/devCtl/icon_sleep_sel.imageset/icon_sleep_sel@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_sleep_sel.imageset/icon_sleep_sel@3x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_time.imageset/icon_time@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_time.imageset/icon_time@3x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_time_sel.imageset/icon_time_sel@2x.png


BIN
Temperature/Assets.xcassets/devCtl/icon_time_sel.imageset/icon_time_sel@3x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_home.imageset/icon_tab_home@2x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_home.imageset/icon_tab_home@3x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_home_sel.imageset/icon_tab_home_sel@2x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_home_sel.imageset/icon_tab_home_sel@3x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_me.imageset/icon_tab_me@2x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_me.imageset/icon_tab_me@3x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_me_sel.imageset/icon_tab_me_sel@2x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_me_sel.imageset/icon_tab_me_sel@3x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_room.imageset/icon_tab_room@2x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_room.imageset/icon_tab_room@3x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_room_sel.imageset/icon_tab_room_sel@2x.png


BIN
Temperature/Assets.xcassets/tabbar/icon_tab_room_sel.imageset/icon_tab_room_sel@3x.png


+ 3 - 0
Temperature/ControlModule/Home/Controller/RDSAddRoomVC.h

@@ -6,11 +6,14 @@
 //
 //
 
 
 #import "RDSBaseViewController.h"
 #import "RDSBaseViewController.h"
+#import "RDSDeviceTypeModel.h"
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
 @interface RDSAddRoomVC : RDSBaseViewController
 @interface RDSAddRoomVC : RDSBaseViewController
 
 
+@property (nonatomic, strong) RDSDeviceTypeModel *deviceTypeModel;
+
 @end
 @end
 
 
 NS_ASSUME_NONNULL_END
 NS_ASSUME_NONNULL_END

+ 3 - 1
Temperature/ControlModule/Home/Controller/RDSAddRoomVC.m

@@ -63,10 +63,12 @@
     
     
     [self.view endEditing:YES];
     [self.view endEditing:YES];
     
     
-    if(TheDataManager.rooms.count == 0){
+//    if(TheDataManager.rooms.count == 0){
+    if (self.deviceTypeModel.isMasterController) {
         RDSInputWiFiVC *vc = [[RDSInputWiFiVC alloc] init];
         RDSInputWiFiVC *vc = [[RDSInputWiFiVC alloc] init];
         vc.roomName = _roomNameTF.text;
         vc.roomName = _roomNameTF.text;
         vc.deviceID = _deviceIDTF.text;
         vc.deviceID = _deviceIDTF.text;
+        vc.deviceTypeModel = self.deviceTypeModel;
         [self pushViewController:vc animated:YES];
         [self pushViewController:vc animated:YES];
     }else{
     }else{
         RDSBindSubDeviceVC *vc = [[RDSBindSubDeviceVC alloc] init];
         RDSBindSubDeviceVC *vc = [[RDSBindSubDeviceVC alloc] init];

+ 37 - 15
Temperature/ControlModule/Home/Controller/RDSAirControlVC.m

@@ -40,6 +40,8 @@
 @property (weak, nonatomic) IBOutlet UIButton *newairBtn;
 @property (weak, nonatomic) IBOutlet UIButton *newairBtn;
 @property (weak, nonatomic) IBOutlet UIButton *powerBtn;
 @property (weak, nonatomic) IBOutlet UIButton *powerBtn;
 @property (weak, nonatomic) IBOutlet UIButton *timingBtn;
 @property (weak, nonatomic) IBOutlet UIButton *timingBtn;
+@property (weak, nonatomic) IBOutlet UIButton *sleepBtn;
+
 @property (nonatomic, strong) GCDTimer *gcdTimer;
 @property (nonatomic, strong) GCDTimer *gcdTimer;
 @property (nonatomic, strong) SPAlertController *timerAlert;
 @property (nonatomic, strong) SPAlertController *timerAlert;
 @property (nonatomic, strong) NSMutableArray *timerData;// 定时picker数据源
 @property (nonatomic, strong) NSMutableArray *timerData;// 定时picker数据源
@@ -86,22 +88,22 @@
     
     
     [self p_setupModeView];
     [self p_setupModeView];
     
     
-    UIImage *greenImg = [UIImage rds_imageWithColor:RDSGreenColor];
-    UIImage *lightGreenImg = [UIImage rds_imageWithColor:RDSLightGreenColor];
-    
-    [_newairBtn setBackgroundImage:lightGreenImg forState:UIControlStateNormal];
-    [_powerBtn setBackgroundImage:lightGreenImg forState:UIControlStateNormal];
-    [_timingBtn setBackgroundImage:lightGreenImg forState:UIControlStateNormal];
-    
-    
-    [_newairBtn setBackgroundImage:greenImg forState:UIControlStateSelected];
-    [_powerBtn setBackgroundImage:greenImg forState:UIControlStateSelected];
-    [_timingBtn setBackgroundImage:greenImg forState:UIControlStateSelected];
+//    UIImage *greenImg = [UIImage rds_imageWithColor:RDSGreenColor];
+//    UIImage *lightGreenImg = [UIImage rds_imageWithColor:RDSLightGreenColor];
+//
+//    [_newairBtn setBackgroundImage:lightGreenImg forState:UIControlStateNormal];
+//    [_powerBtn setBackgroundImage:lightGreenImg forState:UIControlStateNormal];
+//    [_timingBtn setBackgroundImage:lightGreenImg forState:UIControlStateNormal];
+//
+//
+//    [_newairBtn setBackgroundImage:greenImg forState:UIControlStateSelected];
+//    [_powerBtn setBackgroundImage:greenImg forState:UIControlStateSelected];
+//    [_timingBtn setBackgroundImage:greenImg forState:UIControlStateSelected];
     
     
 
 
     
     
-    CGFloat width = SCREEN_WIDTH-120;
-    _cirSlider =[[CYCircularSlider alloc]initWithFrame:CGRectMake(10, 0, width, width)];
+    CGFloat width = 220;
+    _cirSlider =[[CYCircularSlider alloc]initWithFrame:CGRectMake((246 - width) / 2, (246 - width) / 2, width, width)];
     _cirSlider.delegate = self;
     _cirSlider.delegate = self;
     _cirSlider.backgroundColor = UIColor.clearColor;
     _cirSlider.backgroundColor = UIColor.clearColor;
     _cirSlider.filledColor = RDSGreenColor;
     _cirSlider.filledColor = RDSGreenColor;
@@ -113,7 +115,6 @@
     [self.tempView addSubview:_cirSlider];
     [self.tempView addSubview:_cirSlider];
     
     
     
     
-
     _fanSlider.minimumTrackTintColor = RDSGreenColor;
     _fanSlider.minimumTrackTintColor = RDSGreenColor;
     [_fanSlider setThumbImage:[UIImage imageNamed:@"icon_point"] forState:UIControlStateNormal];
     [_fanSlider setThumbImage:[UIImage imageNamed:@"icon_point"] forState:UIControlStateNormal];
     [_fanSlider setThumbImage:[UIImage imageNamed:@"icon_point"] forState:UIControlStateHighlighted];
     [_fanSlider setThumbImage:[UIImage imageNamed:@"icon_point"] forState:UIControlStateHighlighted];
@@ -153,7 +154,7 @@
 
 
 - (void)p_setupModeView{
 - (void)p_setupModeView{
     
     
-    CGFloat viewW = (SCREEN_WIDTH-20*5)/4;// 一行显示4个,算上左右2边空白,共5个间隔
+    CGFloat viewW = (SCREEN_WIDTH-20*6)/5;// 一行显示4个,算上左右2边空白,共5个间隔
     RDSCtrlModeView *modeView = [[RDSCtrlModeView alloc] init];
     RDSCtrlModeView *modeView = [[RDSCtrlModeView alloc] init];
     self.modeView = modeView;
     self.modeView = modeView;
     [self.view addSubview:modeView];
     [self.view addSubview:modeView];
@@ -343,6 +344,26 @@
     }];
     }];
 }
 }
 
 
+- (IBAction)onSleepAction:(UIButton *)sender {
+    if(!_roomModel.power) {
+        [RDSHudShower showCenterToast:@"请先开机再进行其他操作"];
+        return;
+    }
+    
+    [_gcdTimer restartTimer];// 重新开始轮询
+    
+    sender.selected = !sender.isSelected;
+    
+    [RDSDemoApiHelper rds_setSleepPower:sender.isSelected control_number:_roomModel.control_number success:^(id responseObject) {
+        if ([responseObject[@"code"] intValue] != 0) {
+            [RDSHudShower showCenterToast:responseObject[@"message"]];
+        }
+    } failure:^(NSError *error) {
+        [RDSHudShower showCenterToast:@"连接服务器失败"];
+    }];
+    
+}
+
 // 定时
 // 定时
 - (IBAction)onTimingAction:(UIButton *)sender {
 - (IBAction)onTimingAction:(UIButton *)sender {
     
     
@@ -534,6 +555,7 @@
         weakSelf.powerBtn.selected = weakSelf.roomModel.power;
         weakSelf.powerBtn.selected = weakSelf.roomModel.power;
         weakSelf.newairBtn.selected = weakSelf.roomModel.new_fan;
         weakSelf.newairBtn.selected = weakSelf.roomModel.new_fan;
         weakSelf.timingBtn.selected = weakSelf.roomModel.timer_status;
         weakSelf.timingBtn.selected = weakSelf.roomModel.timer_status;
+        weakSelf.sleepBtn.selected = weakSelf.roomModel.sleep_mode;
         
         
         
         
         NSString *mode;
         NSString *mode;

+ 153 - 123
Temperature/ControlModule/Home/Controller/RDSAirControlVC.xib

@@ -3,7 +3,7 @@
     <device id="retina5_5" orientation="portrait" appearance="light"/>
     <device id="retina5_5" orientation="portrait" appearance="light"/>
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -20,6 +20,7 @@
                 <outlet property="roomHumidityLab" destination="VS1-fQ-gMA" id="EMo-Aj-2s4"/>
                 <outlet property="roomHumidityLab" destination="VS1-fQ-gMA" id="EMo-Aj-2s4"/>
                 <outlet property="roomPm25Lab" destination="ppq-FP-eCW" id="NDe-92-GuK"/>
                 <outlet property="roomPm25Lab" destination="ppq-FP-eCW" id="NDe-92-GuK"/>
                 <outlet property="roomTempLab" destination="waa-oO-0Y0" id="w4W-wa-4XE"/>
                 <outlet property="roomTempLab" destination="waa-oO-0Y0" id="w4W-wa-4XE"/>
+                <outlet property="sleepBtn" destination="bXy-UU-gfP" id="COk-Nk-POg"/>
                 <outlet property="tempView" destination="Zyq-Wi-E9C" id="n5x-mu-A1k"/>
                 <outlet property="tempView" destination="Zyq-Wi-E9C" id="n5x-mu-A1k"/>
                 <outlet property="timingBtn" destination="eIS-2H-B8e" id="Iah-kt-Dui"/>
                 <outlet property="timingBtn" destination="eIS-2H-B8e" id="Iah-kt-Dui"/>
                 <outlet property="timingLab" destination="9CL-54-bjP" id="EyT-Ck-X1G"/>
                 <outlet property="timingLab" destination="9CL-54-bjP" id="EyT-Ck-X1G"/>
@@ -32,38 +33,48 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5d0-gu-6DK">
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5d0-gu-6DK">
-                    <rect key="frame" x="0.0" y="53" width="414" height="499"/>
+                    <rect key="frame" x="0.0" y="0.0" width="405.33333333333331" height="491"/>
                     <subviews>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kbl-WG-ZWC">
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kbl-WG-ZWC">
-                            <rect key="frame" x="53" y="50" width="308" height="261.66666666666669"/>
+                            <rect key="frame" x="52" y="96" width="301.33333333333331" height="256.33333333333331"/>
                             <subviews>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zyq-Wi-E9C">
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zyq-Wi-E9C">
-                                    <rect key="frame" x="0.0" y="0.0" width="308" height="261.66666666666669"/>
-                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <rect key="frame" x="27.666666666666686" y="0.0" width="246" height="246"/>
+                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="246" id="DcU-y6-orW"/>
+                                        <constraint firstAttribute="width" constant="246" id="ZYE-41-BFr"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                            <integer key="value" value="123"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
+                                    </userDefinedRuntimeAttributes>
                                 </view>
                                 </view>
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uRf-pJ-KLN">
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uRf-pJ-KLN">
-                                    <rect key="frame" x="43.333333333333329" y="0.0" width="221.66666666666669" height="221.66666666666666"/>
+                                    <rect key="frame" x="42.666666666666686" y="0.0" width="216" height="216.33333333333334"/>
                                     <subviews>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="28" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q5M-Lo-zcy">
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="28" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q5M-Lo-zcy">
-                                            <rect key="frame" x="66.666666666666671" y="68.666666666666657" width="88.000000000000014" height="84"/>
-                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="70"/>
+                                            <rect key="frame" x="78.333333333333329" y="80" width="59.666666666666671" height="56.333333333333343"/>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="47"/>
                                             <color key="textColor" red="0.15294117647058825" green="0.1803921568627451" blue="0.23137254901960785" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.15294117647058825" green="0.1803921568627451" blue="0.23137254901960785" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         </label>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="℃" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9yS-2d-GcF">
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="℃" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9yS-2d-GcF">
-                                            <rect key="frame" x="154.66666666666669" y="86" width="29.666666666666657" height="30"/>
+                                            <rect key="frame" x="138" y="86" width="29.666666666666657" height="30"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         </label>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="制冷 一档" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V8e-c8-QWi">
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="制冷 一档" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V8e-c8-QWi">
-                                            <rect key="frame" x="82.666666666666671" y="155.66666666666669" width="56.333333333333329" height="15.666666666666657"/>
+                                            <rect key="frame" x="79.999999999999986" y="139.33333333333331" width="56.333333333333329" height="15.666666666666657"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         </label>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="定时:开" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9CL-54-bjP">
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="定时:开" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9CL-54-bjP">
-                                            <rect key="frame" x="84.000000000000014" y="176.33333333333331" width="53.333333333333329" height="15.666666666666657"/>
+                                            <rect key="frame" x="81.333333333333329" y="160" width="53.333333333333329" height="15.666666666666657"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
                                             <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
@@ -75,7 +86,7 @@
                                         <constraint firstItem="V8e-c8-QWi" firstAttribute="top" secondItem="Q5M-Lo-zcy" secondAttribute="bottom" constant="3" id="Fqb-tn-lSg"/>
                                         <constraint firstItem="V8e-c8-QWi" firstAttribute="top" secondItem="Q5M-Lo-zcy" secondAttribute="bottom" constant="3" id="Fqb-tn-lSg"/>
                                         <constraint firstItem="9CL-54-bjP" firstAttribute="centerX" secondItem="uRf-pJ-KLN" secondAttribute="centerX" id="NFd-Fc-H13"/>
                                         <constraint firstItem="9CL-54-bjP" firstAttribute="centerX" secondItem="uRf-pJ-KLN" secondAttribute="centerX" id="NFd-Fc-H13"/>
                                         <constraint firstItem="Q5M-Lo-zcy" firstAttribute="centerX" secondItem="uRf-pJ-KLN" secondAttribute="centerX" id="am9-Gj-0de"/>
                                         <constraint firstItem="Q5M-Lo-zcy" firstAttribute="centerX" secondItem="uRf-pJ-KLN" secondAttribute="centerX" id="am9-Gj-0de"/>
-                                        <constraint firstItem="Q5M-Lo-zcy" firstAttribute="top" secondItem="9yS-2d-GcF" secondAttribute="top" multiplier="0.8" id="bLL-mu-pSn"/>
+                                        <constraint firstItem="Q5M-Lo-zcy" firstAttribute="top" secondItem="9yS-2d-GcF" secondAttribute="top" constant="-6" id="bLL-mu-pSn"/>
                                         <constraint firstAttribute="width" secondItem="uRf-pJ-KLN" secondAttribute="height" id="bjF-Jr-Vkb"/>
                                         <constraint firstAttribute="width" secondItem="uRf-pJ-KLN" secondAttribute="height" id="bjF-Jr-Vkb"/>
                                         <constraint firstItem="V8e-c8-QWi" firstAttribute="centerX" secondItem="uRf-pJ-KLN" secondAttribute="centerX" id="cqt-mG-IJN"/>
                                         <constraint firstItem="V8e-c8-QWi" firstAttribute="centerX" secondItem="uRf-pJ-KLN" secondAttribute="centerX" id="cqt-mG-IJN"/>
                                         <constraint firstItem="Q5M-Lo-zcy" firstAttribute="centerY" secondItem="uRf-pJ-KLN" secondAttribute="centerY" id="iPg-Gd-xOG"/>
                                         <constraint firstItem="Q5M-Lo-zcy" firstAttribute="centerY" secondItem="uRf-pJ-KLN" secondAttribute="centerY" id="iPg-Gd-xOG"/>
@@ -83,35 +94,27 @@
                                     </constraints>
                                     </constraints>
                                 </view>
                                 </view>
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9uN-a5-kmu">
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9uN-a5-kmu">
-                                    <rect key="frame" x="0.0" y="221.66666666666669" width="40" height="40"/>
-                                    <color key="backgroundColor" red="0.94117647058823528" green="0.96078431372549022" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
+                                    <rect key="frame" x="7.6666666666666643" y="216.33333333333331" width="40" height="40"/>
+                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="40" id="JZk-up-fMK"/>
                                         <constraint firstAttribute="height" constant="40" id="JZk-up-fMK"/>
                                         <constraint firstAttribute="width" constant="40" id="oYJ-PA-NQr"/>
                                         <constraint firstAttribute="width" constant="40" id="oYJ-PA-NQr"/>
                                     </constraints>
                                     </constraints>
                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                     <state key="normal" image="icon_reduce"/>
                                     <state key="normal" image="icon_reduce"/>
-                                    <userDefinedRuntimeAttributes>
-                                        <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="20"/>
-                                        <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
-                                    </userDefinedRuntimeAttributes>
                                     <connections>
                                     <connections>
                                         <action selector="onMovTempAction:" destination="-1" eventType="touchUpInside" id="Zfj-2P-PRD"/>
                                         <action selector="onMovTempAction:" destination="-1" eventType="touchUpInside" id="Zfj-2P-PRD"/>
                                     </connections>
                                     </connections>
                                 </button>
                                 </button>
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Exg-z6-gwm">
                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Exg-z6-gwm">
-                                    <rect key="frame" x="268" y="221.66666666666669" width="40" height="40"/>
-                                    <color key="backgroundColor" red="0.94117647059999998" green="0.96078431369999995" blue="0.96470588239999999" alpha="1" colorSpace="calibratedRGB"/>
+                                    <rect key="frame" x="238.66666666666669" y="216.33333333333331" width="40" height="40"/>
+                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="40" id="m2H-WE-Mc7"/>
                                         <constraint firstAttribute="height" constant="40" id="m2H-WE-Mc7"/>
                                         <constraint firstAttribute="width" constant="40" id="zuf-8s-sBV"/>
                                         <constraint firstAttribute="width" constant="40" id="zuf-8s-sBV"/>
                                     </constraints>
                                     </constraints>
                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                     <state key="normal" image="icon_add_1"/>
                                     <state key="normal" image="icon_add_1"/>
-                                    <userDefinedRuntimeAttributes>
-                                        <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="20"/>
-                                        <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
-                                    </userDefinedRuntimeAttributes>
                                     <connections>
                                     <connections>
                                         <action selector="onAddTempAction:" destination="-1" eventType="touchUpInside" id="7T1-V6-9jU"/>
                                         <action selector="onAddTempAction:" destination="-1" eventType="touchUpInside" id="7T1-V6-9jU"/>
                                     </connections>
                                     </connections>
@@ -120,60 +123,65 @@
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <constraints>
                             <constraints>
                                 <constraint firstItem="uRf-pJ-KLN" firstAttribute="centerX" secondItem="Kbl-WG-ZWC" secondAttribute="centerX" id="0jj-SU-n21"/>
                                 <constraint firstItem="uRf-pJ-KLN" firstAttribute="centerX" secondItem="Kbl-WG-ZWC" secondAttribute="centerX" id="0jj-SU-n21"/>
-                                <constraint firstItem="9uN-a5-kmu" firstAttribute="leading" secondItem="Kbl-WG-ZWC" secondAttribute="leading" id="1aA-nV-gnC"/>
                                 <constraint firstItem="uRf-pJ-KLN" firstAttribute="top" secondItem="Kbl-WG-ZWC" secondAttribute="top" id="5x9-zr-gli"/>
                                 <constraint firstItem="uRf-pJ-KLN" firstAttribute="top" secondItem="Kbl-WG-ZWC" secondAttribute="top" id="5x9-zr-gli"/>
                                 <constraint firstAttribute="bottom" secondItem="Exg-z6-gwm" secondAttribute="bottom" id="Bgl-gA-6SV"/>
                                 <constraint firstAttribute="bottom" secondItem="Exg-z6-gwm" secondAttribute="bottom" id="Bgl-gA-6SV"/>
                                 <constraint firstAttribute="width" secondItem="Kbl-WG-ZWC" secondAttribute="height" multiplier="10:8.5" id="F8E-TE-bs0"/>
                                 <constraint firstAttribute="width" secondItem="Kbl-WG-ZWC" secondAttribute="height" multiplier="10:8.5" id="F8E-TE-bs0"/>
-                                <constraint firstAttribute="trailing" secondItem="Exg-z6-gwm" secondAttribute="trailing" id="Hx5-AB-DJy"/>
                                 <constraint firstItem="Zyq-Wi-E9C" firstAttribute="top" secondItem="Kbl-WG-ZWC" secondAttribute="top" id="KRs-vo-blP"/>
                                 <constraint firstItem="Zyq-Wi-E9C" firstAttribute="top" secondItem="Kbl-WG-ZWC" secondAttribute="top" id="KRs-vo-blP"/>
                                 <constraint firstAttribute="bottom" secondItem="9uN-a5-kmu" secondAttribute="bottom" id="MGU-rb-05L"/>
                                 <constraint firstAttribute="bottom" secondItem="9uN-a5-kmu" secondAttribute="bottom" id="MGU-rb-05L"/>
-                                <constraint firstAttribute="trailing" secondItem="Zyq-Wi-E9C" secondAttribute="trailing" id="mwS-W1-Af2"/>
-                                <constraint firstItem="Zyq-Wi-E9C" firstAttribute="leading" secondItem="Kbl-WG-ZWC" secondAttribute="leading" id="nAn-lx-TMQ"/>
-                                <constraint firstAttribute="bottom" secondItem="Zyq-Wi-E9C" secondAttribute="bottom" id="npX-q1-Rvf"/>
+                                <constraint firstItem="Exg-z6-gwm" firstAttribute="leading" secondItem="uRf-pJ-KLN" secondAttribute="trailing" constant="-20" id="Q6d-Hv-WMO"/>
+                                <constraint firstItem="Zyq-Wi-E9C" firstAttribute="leading" secondItem="9uN-a5-kmu" secondAttribute="trailing" constant="-20" id="W6q-c7-kPw"/>
+                                <constraint firstItem="Zyq-Wi-E9C" firstAttribute="centerX" secondItem="Kbl-WG-ZWC" secondAttribute="centerX" id="pM3-GX-BLI"/>
                                 <constraint firstItem="9uN-a5-kmu" firstAttribute="top" secondItem="uRf-pJ-KLN" secondAttribute="bottom" id="tDm-DK-4cL"/>
                                 <constraint firstItem="9uN-a5-kmu" firstAttribute="top" secondItem="uRf-pJ-KLN" secondAttribute="bottom" id="tDm-DK-4cL"/>
                             </constraints>
                             </constraints>
                         </view>
                         </view>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uPo-GP-WtY">
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uPo-GP-WtY">
-                            <rect key="frame" x="53" y="311.66666666666669" width="308" height="80"/>
+                            <rect key="frame" x="22" y="306" width="361.33333333333331" height="80"/>
                             <subviews>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="13℃" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="waa-oO-0Y0">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="13℃" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="waa-oO-0Y0">
-                                    <rect key="frame" x="5.6666666666666643" y="50" width="35" height="25.333333333333329"/>
-                                    <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
+                                    <rect key="frame" x="23.666666666666668" y="42" width="34.666666666666657" height="25.333333333333329"/>
+                                    <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="18"/>
                                     <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="52%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VS1-fQ-gMA">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="52%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VS1-fQ-gMA">
-                                    <rect key="frame" x="87.666666666666657" y="49.666666666666629" width="40" height="25.666666666666671"/>
-                                    <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
+                                    <rect key="frame" x="114.99999999999999" y="42" width="39.333333333333329" height="25.333333333333329"/>
+                                    <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="18"/>
                                     <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_temperature_g" translatesAutoresizingMaskIntoConstraints="NO" id="1DD-Tr-TNt">
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_temperature_g" translatesAutoresizingMaskIntoConstraints="NO" id="1DD-Tr-TNt">
-                                    <rect key="frame" x="9.3333333333333357" y="20" width="28" height="28"/>
+                                    <rect key="frame" x="27" y="12" width="28" height="28"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="28" id="Kw1-iD-FQk"/>
+                                        <constraint firstAttribute="height" constant="28" id="LUY-AY-Oly"/>
+                                    </constraints>
                                 </imageView>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_humidity_g" translatesAutoresizingMaskIntoConstraints="NO" id="Byx-CF-qt6">
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_humidity_g" translatesAutoresizingMaskIntoConstraints="NO" id="Byx-CF-qt6">
-                                    <rect key="frame" x="93.666666666666657" y="20" width="28" height="28"/>
+                                    <rect key="frame" x="120.66666666666666" y="12" width="28" height="28"/>
                                 </imageView>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_pm2.5_g" translatesAutoresizingMaskIntoConstraints="NO" id="QY3-Lp-b97">
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_pm2.5_g" translatesAutoresizingMaskIntoConstraints="NO" id="QY3-Lp-b97">
-                                    <rect key="frame" x="186.33333333333334" y="20" width="28" height="28"/>
+                                    <rect key="frame" x="212.66666666666666" y="12" width="28" height="28"/>
                                 </imageView>
                                 </imageView>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_co2_g" translatesAutoresizingMaskIntoConstraints="NO" id="FUb-zI-XCf">
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_co2_g" translatesAutoresizingMaskIntoConstraints="NO" id="FUb-zI-XCf">
-                                    <rect key="frame" x="271" y="20" width="28" height="28"/>
+                                    <rect key="frame" x="311.33333333333331" y="12" width="28" height="28"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="28" id="wKf-yq-LUl"/>
+                                    </constraints>
                                 </imageView>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="400" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ppq-FP-eCW">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="400" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ppq-FP-eCW">
-                                    <rect key="frame" x="184" y="50" width="32.666666666666657" height="25.333333333333329"/>
-                                    <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
+                                    <rect key="frame" x="210.33333333333334" y="42" width="32.666666666666657" height="25.333333333333329"/>
+                                    <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="18"/>
                                     <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="480" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zAt-Qd-zbU">
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="480" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zAt-Qd-zbU">
-                                    <rect key="frame" x="268.66666666666669" y="50" width="32.666666666666686" height="25.333333333333329"/>
-                                    <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
+                                    <rect key="frame" x="309" y="42" width="32.666666666666686" height="25.333333333333329"/>
+                                    <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="18"/>
                                     <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 </label>
                             </subviews>
                             </subviews>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <constraints>
                             <constraints>
                                 <constraint firstItem="ppq-FP-eCW" firstAttribute="centerX" secondItem="QY3-Lp-b97" secondAttribute="centerX" id="1iS-Mj-0JU"/>
                                 <constraint firstItem="ppq-FP-eCW" firstAttribute="centerX" secondItem="QY3-Lp-b97" secondAttribute="centerX" id="1iS-Mj-0JU"/>
                                 <constraint firstItem="waa-oO-0Y0" firstAttribute="top" secondItem="1DD-Tr-TNt" secondAttribute="bottom" constant="2" id="3Xj-da-rzY"/>
                                 <constraint firstItem="waa-oO-0Y0" firstAttribute="top" secondItem="1DD-Tr-TNt" secondAttribute="bottom" constant="2" id="3Xj-da-rzY"/>
@@ -181,46 +189,52 @@
                                 <constraint firstItem="Byx-CF-qt6" firstAttribute="centerY" secondItem="1DD-Tr-TNt" secondAttribute="centerY" id="8Tg-qc-lDo"/>
                                 <constraint firstItem="Byx-CF-qt6" firstAttribute="centerY" secondItem="1DD-Tr-TNt" secondAttribute="centerY" id="8Tg-qc-lDo"/>
                                 <constraint firstItem="VS1-fQ-gMA" firstAttribute="centerX" secondItem="Byx-CF-qt6" secondAttribute="centerX" id="BvE-CA-nFR"/>
                                 <constraint firstItem="VS1-fQ-gMA" firstAttribute="centerX" secondItem="Byx-CF-qt6" secondAttribute="centerX" id="BvE-CA-nFR"/>
                                 <constraint firstItem="zAt-Qd-zbU" firstAttribute="centerX" secondItem="FUb-zI-XCf" secondAttribute="centerX" id="D6L-6f-TPk"/>
                                 <constraint firstItem="zAt-Qd-zbU" firstAttribute="centerX" secondItem="FUb-zI-XCf" secondAttribute="centerX" id="D6L-6f-TPk"/>
-                                <constraint firstItem="FUb-zI-XCf" firstAttribute="centerX" secondItem="uPo-GP-WtY" secondAttribute="centerX" multiplier="1.85" id="Fd3-Je-9Zn"/>
                                 <constraint firstItem="ppq-FP-eCW" firstAttribute="centerY" secondItem="waa-oO-0Y0" secondAttribute="centerY" id="Kjw-TO-T0B"/>
                                 <constraint firstItem="ppq-FP-eCW" firstAttribute="centerY" secondItem="waa-oO-0Y0" secondAttribute="centerY" id="Kjw-TO-T0B"/>
                                 <constraint firstAttribute="height" constant="80" id="Qe9-mv-UjB"/>
                                 <constraint firstAttribute="height" constant="80" id="Qe9-mv-UjB"/>
                                 <constraint firstItem="QY3-Lp-b97" firstAttribute="centerY" secondItem="1DD-Tr-TNt" secondAttribute="centerY" id="RDF-hZ-mIQ"/>
                                 <constraint firstItem="QY3-Lp-b97" firstAttribute="centerY" secondItem="1DD-Tr-TNt" secondAttribute="centerY" id="RDF-hZ-mIQ"/>
+                                <constraint firstItem="1DD-Tr-TNt" firstAttribute="leading" secondItem="uPo-GP-WtY" secondAttribute="leading" constant="27" id="Xts-KQ-rOi"/>
                                 <constraint firstItem="VS1-fQ-gMA" firstAttribute="centerY" secondItem="waa-oO-0Y0" secondAttribute="centerY" id="Yta-d0-ksb"/>
                                 <constraint firstItem="VS1-fQ-gMA" firstAttribute="centerY" secondItem="waa-oO-0Y0" secondAttribute="centerY" id="Yta-d0-ksb"/>
-                                <constraint firstItem="Byx-CF-qt6" firstAttribute="centerX" secondItem="uPo-GP-WtY" secondAttribute="centerX" multiplier="0.7" id="boy-Zo-VJL"/>
-                                <constraint firstItem="1DD-Tr-TNt" firstAttribute="top" secondItem="uPo-GP-WtY" secondAttribute="top" constant="20" id="eLt-7E-zH4"/>
-                                <constraint firstItem="QY3-Lp-b97" firstAttribute="centerX" secondItem="uPo-GP-WtY" secondAttribute="centerX" multiplier="1.3" id="ec8-3y-TUJ"/>
+                                <constraint firstItem="Byx-CF-qt6" firstAttribute="centerX" secondItem="uPo-GP-WtY" secondAttribute="centerX" constant="-46" id="boy-Zo-VJL"/>
+                                <constraint firstItem="1DD-Tr-TNt" firstAttribute="top" secondItem="uPo-GP-WtY" secondAttribute="top" constant="12" id="eLt-7E-zH4"/>
+                                <constraint firstItem="QY3-Lp-b97" firstAttribute="centerX" secondItem="uPo-GP-WtY" secondAttribute="centerX" constant="46" id="ec8-3y-TUJ"/>
+                                <constraint firstAttribute="trailing" secondItem="FUb-zI-XCf" secondAttribute="trailing" constant="22" id="f98-LY-NXh"/>
                                 <constraint firstItem="FUb-zI-XCf" firstAttribute="centerY" secondItem="1DD-Tr-TNt" secondAttribute="centerY" id="fyU-Tp-isv"/>
                                 <constraint firstItem="FUb-zI-XCf" firstAttribute="centerY" secondItem="1DD-Tr-TNt" secondAttribute="centerY" id="fyU-Tp-isv"/>
                                 <constraint firstItem="zAt-Qd-zbU" firstAttribute="centerY" secondItem="waa-oO-0Y0" secondAttribute="centerY" id="jPk-kY-cvW"/>
                                 <constraint firstItem="zAt-Qd-zbU" firstAttribute="centerY" secondItem="waa-oO-0Y0" secondAttribute="centerY" id="jPk-kY-cvW"/>
-                                <constraint firstItem="1DD-Tr-TNt" firstAttribute="centerX" secondItem="uPo-GP-WtY" secondAttribute="centerX" multiplier="0.15" id="q9h-18-8Zh"/>
                             </constraints>
                             </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                    <integer key="value" value="16"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
+                            </userDefinedRuntimeAttributes>
                         </view>
                         </view>
                         <view multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8ya-bf-jnR">
                         <view multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8ya-bf-jnR">
-                            <rect key="frame" x="26.666666666666657" y="414" width="360.66666666666674" height="85"/>
+                            <rect key="frame" x="22" y="406" width="361.33333333333331" height="85"/>
                             <subviews>
                             <subviews>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_fan" translatesAutoresizingMaskIntoConstraints="NO" id="xJ6-9s-4Dp">
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_fan" translatesAutoresizingMaskIntoConstraints="NO" id="xJ6-9s-4Dp">
-                                    <rect key="frame" x="9.9999999999999964" y="27.333333333333371" width="30.000000000000004" height="30"/>
+                                    <rect key="frame" x="18" y="31.666666666666686" width="22" height="22"/>
                                     <constraints>
                                     <constraints>
-                                        <constraint firstAttribute="width" constant="30" id="egO-gM-gaS"/>
-                                        <constraint firstAttribute="height" constant="30" id="kFy-1K-rQv"/>
+                                        <constraint firstAttribute="width" constant="22" id="egO-gM-gaS"/>
+                                        <constraint firstAttribute="height" constant="22" id="kFy-1K-rQv"/>
                                     </constraints>
                                     </constraints>
                                 </imageView>
                                 </imageView>
-                                <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="5" translatesAutoresizingMaskIntoConstraints="NO" id="bsh-mP-EHO" customClass="RDSlider">
-                                    <rect key="frame" x="45" y="27.333333333333371" width="290.66666666666669" height="31"/>
+                                <slider opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="5" translatesAutoresizingMaskIntoConstraints="NO" id="bsh-mP-EHO" customClass="RDSlider">
+                                    <rect key="frame" x="47" y="27.666666666666686" width="298.33333333333331" height="31"/>
                                     <connections>
                                     <connections>
                                         <action selector="onFanSliderValueChanged:" destination="-1" eventType="valueChanged" id="b5Z-LI-KwP"/>
                                         <action selector="onFanSliderValueChanged:" destination="-1" eventType="valueChanged" id="b5Z-LI-KwP"/>
                                         <action selector="onFanSliderValueDidChanged:" destination="-1" eventType="touchUpInside" id="mve-tQ-Mbn"/>
                                         <action selector="onFanSliderValueDidChanged:" destination="-1" eventType="touchUpInside" id="mve-tQ-Mbn"/>
                                     </connections>
                                     </connections>
                                 </slider>
                                 </slider>
                             </subviews>
                             </subviews>
-                            <color key="backgroundColor" red="0.9137254901960784" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <gestureRecognizers/>
                             <gestureRecognizers/>
                             <constraints>
                             <constraints>
-                                <constraint firstAttribute="trailing" secondItem="bsh-mP-EHO" secondAttribute="trailing" constant="27" id="CdX-Mz-ylb"/>
-                                <constraint firstItem="xJ6-9s-4Dp" firstAttribute="centerY" secondItem="8ya-bf-jnR" secondAttribute="centerY" id="QNN-vA-svS"/>
-                                <constraint firstItem="bsh-mP-EHO" firstAttribute="leading" secondItem="xJ6-9s-4Dp" secondAttribute="trailing" constant="7" id="QkK-cq-E4x"/>
-                                <constraint firstItem="bsh-mP-EHO" firstAttribute="centerY" secondItem="8ya-bf-jnR" secondAttribute="centerY" id="bda-a2-JwK"/>
-                                <constraint firstItem="xJ6-9s-4Dp" firstAttribute="leading" secondItem="8ya-bf-jnR" secondAttribute="leading" constant="10" id="cwh-f9-1sW"/>
+                                <constraint firstItem="bsh-mP-EHO" firstAttribute="leading" secondItem="xJ6-9s-4Dp" secondAttribute="trailing" constant="9" id="MRJ-mS-ERp"/>
+                                <constraint firstItem="xJ6-9s-4Dp" firstAttribute="centerY" secondItem="8ya-bf-jnR" secondAttribute="centerY" id="QRo-N3-bft"/>
+                                <constraint firstItem="xJ6-9s-4Dp" firstAttribute="leading" secondItem="8ya-bf-jnR" secondAttribute="leading" constant="18" id="Qno-pJ-qLk"/>
+                                <constraint firstAttribute="trailing" secondItem="bsh-mP-EHO" secondAttribute="trailing" constant="18" id="RHT-fW-csw"/>
                                 <constraint firstAttribute="width" secondItem="8ya-bf-jnR" secondAttribute="height" multiplier="34:8" id="rcN-wW-Qcw"/>
                                 <constraint firstAttribute="width" secondItem="8ya-bf-jnR" secondAttribute="height" multiplier="34:8" id="rcN-wW-Qcw"/>
+                                <constraint firstItem="bsh-mP-EHO" firstAttribute="centerY" secondItem="8ya-bf-jnR" secondAttribute="centerY" id="xs3-4R-DGx"/>
                             </constraints>
                             </constraints>
                             <userDefinedRuntimeAttributes>
                             <userDefinedRuntimeAttributes>
                                 <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="16"/>
                                 <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="16"/>
@@ -232,76 +246,90 @@
                     <constraints>
                     <constraints>
                         <constraint firstItem="Kbl-WG-ZWC" firstAttribute="centerX" secondItem="5d0-gu-6DK" secondAttribute="centerX" id="3uY-da-JT2"/>
                         <constraint firstItem="Kbl-WG-ZWC" firstAttribute="centerX" secondItem="5d0-gu-6DK" secondAttribute="centerX" id="3uY-da-JT2"/>
                         <constraint firstItem="uPo-GP-WtY" firstAttribute="centerX" secondItem="5d0-gu-6DK" secondAttribute="centerX" id="7KS-fJ-0OX"/>
                         <constraint firstItem="uPo-GP-WtY" firstAttribute="centerX" secondItem="5d0-gu-6DK" secondAttribute="centerX" id="7KS-fJ-0OX"/>
+                        <constraint firstItem="uPo-GP-WtY" firstAttribute="height" secondItem="8ya-bf-jnR" secondAttribute="height" multiplier="0.941176" id="8w0-xa-8Ec"/>
                         <constraint firstItem="8ya-bf-jnR" firstAttribute="centerX" secondItem="5d0-gu-6DK" secondAttribute="centerX" id="9WE-tn-gAl"/>
                         <constraint firstItem="8ya-bf-jnR" firstAttribute="centerX" secondItem="5d0-gu-6DK" secondAttribute="centerX" id="9WE-tn-gAl"/>
-                        <constraint firstItem="Kbl-WG-ZWC" firstAttribute="top" secondItem="5d0-gu-6DK" secondAttribute="top" constant="50" id="JH1-aL-vio"/>
-                        <constraint firstItem="uPo-GP-WtY" firstAttribute="top" secondItem="Kbl-WG-ZWC" secondAttribute="bottom" id="PHs-pv-H2j"/>
-                        <constraint firstItem="uPo-GP-WtY" firstAttribute="leading" secondItem="9uN-a5-kmu" secondAttribute="leading" id="SGa-fI-BW6"/>
+                        <constraint firstItem="uPo-GP-WtY" firstAttribute="trailing" secondItem="8ya-bf-jnR" secondAttribute="trailing" id="FIV-L0-K0s"/>
+                        <constraint firstItem="Kbl-WG-ZWC" firstAttribute="top" secondItem="5d0-gu-6DK" secondAttribute="top" constant="96" id="JH1-aL-vio"/>
+                        <constraint firstItem="8ya-bf-jnR" firstAttribute="top" secondItem="uPo-GP-WtY" secondAttribute="bottom" constant="20" id="PZu-Eg-Rt7"/>
+                        <constraint firstItem="uPo-GP-WtY" firstAttribute="leading" secondItem="8ya-bf-jnR" secondAttribute="leading" id="Qzd-nq-aVv"/>
                         <constraint firstAttribute="bottom" secondItem="8ya-bf-jnR" secondAttribute="bottom" id="mQv-H9-5Mv"/>
                         <constraint firstAttribute="bottom" secondItem="8ya-bf-jnR" secondAttribute="bottom" id="mQv-H9-5Mv"/>
                     </constraints>
                     </constraints>
                 </view>
                 </view>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4FE-si-qMp">
-                    <rect key="frame" x="152.33333333333334" y="572" width="109.33333333333334" height="92.666666666666629"/>
+                <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="dih-XE-4lS">
+                    <rect key="frame" x="23" y="551" width="359.33333333333331" height="70"/>
+                    <subviews>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VkB-sk-GuN">
+                            <rect key="frame" x="0.0" y="0.0" width="82.333333333333329" height="70"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" image="icon_newair"/>
+                            <state key="selected" image="icon_newair_sel"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="16"/>
+                                <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="onNewAirPowerAction:" destination="-1" eventType="touchUpInside" id="vM8-xa-tNr"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4FE-si-qMp">
+                            <rect key="frame" x="92.333333333333343" y="0.0" width="82.333333333333343" height="70"/>
+                            <constraints>
+                                <constraint firstAttribute="width" secondItem="4FE-si-qMp" secondAttribute="height" multiplier="100:85" id="uoc-6y-T8v"/>
+                            </constraints>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" image="icon_on_1"/>
+                            <state key="selected" image="icon_on_sel_1"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="16"/>
+                                <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="onPowerAction:" destination="-1" eventType="touchUpInside" id="2bR-Ex-FNS"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bXy-UU-gfP">
+                            <rect key="frame" x="184.66666666666666" y="0.0" width="82.333333333333343" height="70"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" image="icon_sleep"/>
+                            <state key="selected" image="icon_sleep_sel"/>
+                            <connections>
+                                <action selector="onSleepAction:" destination="-1" eventType="touchUpInside" id="SKg-0M-qhu"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eIS-2H-B8e">
+                            <rect key="frame" x="277" y="0.0" width="82.333333333333314" height="70"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="" image="icon_time"/>
+                            <state key="selected" image="icon_time_sel"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="16"/>
+                                <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="onTimingAction:" destination="-1" eventType="touchUpInside" id="hsV-ad-8w6"/>
+                            </connections>
+                        </button>
+                    </subviews>
                     <constraints>
                     <constraints>
-                        <constraint firstAttribute="width" secondItem="4FE-si-qMp" secondAttribute="height" multiplier="100:85" id="uoc-6y-T8v"/>
+                        <constraint firstItem="eIS-2H-B8e" firstAttribute="width" secondItem="4FE-si-qMp" secondAttribute="width" id="Jnv-AO-smg"/>
+                        <constraint firstItem="4FE-si-qMp" firstAttribute="width" secondItem="VkB-sk-GuN" secondAttribute="width" id="b4E-NE-QDM"/>
+                        <constraint firstItem="4FE-si-qMp" firstAttribute="height" secondItem="VkB-sk-GuN" secondAttribute="height" id="sgn-um-Igj"/>
+                        <constraint firstItem="eIS-2H-B8e" firstAttribute="height" secondItem="4FE-si-qMp" secondAttribute="height" id="wNk-e2-3Cr"/>
                     </constraints>
                     </constraints>
-                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                    <state key="normal" image="icon_on_1"/>
-                    <state key="selected" image="icon_on_sel_1"/>
-                    <userDefinedRuntimeAttributes>
-                        <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="16"/>
-                        <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
-                    </userDefinedRuntimeAttributes>
-                    <connections>
-                        <action selector="onPowerAction:" destination="-1" eventType="touchUpInside" id="2bR-Ex-FNS"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VkB-sk-GuN">
-                    <rect key="frame" x="27.999999999999993" y="572" width="109.33333333333331" height="92.666666666666629"/>
-                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                    <state key="normal" image="icon_newair"/>
-                    <state key="selected" image="icon_air_sel"/>
-                    <userDefinedRuntimeAttributes>
-                        <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="16"/>
-                        <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
-                    </userDefinedRuntimeAttributes>
-                    <connections>
-                        <action selector="onNewAirPowerAction:" destination="-1" eventType="touchUpInside" id="vM8-xa-tNr"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eIS-2H-B8e">
-                    <rect key="frame" x="276.66666666666669" y="572" width="109.33333333333331" height="92.666666666666629"/>
-                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                    <state key="normal" title="" image="icon_time"/>
-                    <state key="selected" image="icon_time_sel"/>
-                    <userDefinedRuntimeAttributes>
-                        <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="16"/>
-                        <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
-                    </userDefinedRuntimeAttributes>
-                    <connections>
-                        <action selector="onTimingAction:" destination="-1" eventType="touchUpInside" id="hsV-ad-8w6"/>
-                    </connections>
-                </button>
+                </stackView>
             </subviews>
             </subviews>
             <viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
             <viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
             <color key="backgroundColor" systemColor="systemBackgroundColor"/>
             <color key="backgroundColor" systemColor="systemBackgroundColor"/>
             <constraints>
             <constraints>
-                <constraint firstItem="VkB-sk-GuN" firstAttribute="centerY" secondItem="4FE-si-qMp" secondAttribute="centerY" id="8pb-Wv-I3u"/>
                 <constraint firstItem="5d0-gu-6DK" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="C2j-e6-WO3"/>
                 <constraint firstItem="5d0-gu-6DK" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="C2j-e6-WO3"/>
                 <constraint firstItem="5d0-gu-6DK" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="EWh-G9-35V"/>
                 <constraint firstItem="5d0-gu-6DK" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="EWh-G9-35V"/>
                 <constraint firstItem="Kbl-WG-ZWC" firstAttribute="width" secondItem="i5M-Pr-FkT" secondAttribute="width" multiplier="290:390" id="GUZ-Ao-18M"/>
                 <constraint firstItem="Kbl-WG-ZWC" firstAttribute="width" secondItem="i5M-Pr-FkT" secondAttribute="width" multiplier="290:390" id="GUZ-Ao-18M"/>
-                <constraint firstItem="5d0-gu-6DK" firstAttribute="height" secondItem="Q5M-cg-NOt" secondAttribute="width" multiplier="470:390" id="Gej-wr-PEd"/>
-                <constraint firstItem="4FE-si-qMp" firstAttribute="leading" secondItem="VkB-sk-GuN" secondAttribute="trailing" constant="15" id="GjI-uF-Xy9"/>
-                <constraint firstItem="eIS-2H-B8e" firstAttribute="height" secondItem="4FE-si-qMp" secondAttribute="height" id="JZn-VW-ujV"/>
-                <constraint firstItem="4FE-si-qMp" firstAttribute="width" secondItem="VkB-sk-GuN" secondAttribute="width" id="S8u-Sx-zha"/>
-                <constraint firstItem="4FE-si-qMp" firstAttribute="top" secondItem="5d0-gu-6DK" secondAttribute="bottom" constant="20" id="Wyu-nz-wOO"/>
+                <constraint firstItem="dih-XE-4lS" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="23" id="SxW-2a-T3Q"/>
                 <constraint firstItem="8ya-bf-jnR" firstAttribute="width" secondItem="Q5M-cg-NOt" secondAttribute="width" multiplier="340:390" id="XBc-qX-5yd"/>
                 <constraint firstItem="8ya-bf-jnR" firstAttribute="width" secondItem="Q5M-cg-NOt" secondAttribute="width" multiplier="340:390" id="XBc-qX-5yd"/>
-                <constraint firstItem="4FE-si-qMp" firstAttribute="height" secondItem="VkB-sk-GuN" secondAttribute="height" id="XtH-AJ-EDU"/>
-                <constraint firstItem="eIS-2H-B8e" firstAttribute="leading" secondItem="4FE-si-qMp" secondAttribute="trailing" constant="15" id="YL4-ha-3Ji"/>
-                <constraint firstItem="eIS-2H-B8e" firstAttribute="width" secondItem="4FE-si-qMp" secondAttribute="width" id="ej6-GD-bSV"/>
-                <constraint firstItem="5d0-gu-6DK" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" multiplier="0.9" id="fHM-bx-MKb"/>
-                <constraint firstItem="4FE-si-qMp" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="k8J-MQ-ZBc"/>
-                <constraint firstItem="eIS-2H-B8e" firstAttribute="centerY" secondItem="4FE-si-qMp" secondAttribute="centerY" id="qDs-gk-fIw"/>
-                <constraint firstItem="4FE-si-qMp" firstAttribute="width" secondItem="Q5M-cg-NOt" secondAttribute="width" multiplier="103:390" id="sYh-V1-Ice"/>
+                <constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="dih-XE-4lS" secondAttribute="bottom" constant="51" id="hxc-Od-O5B"/>
+                <constraint firstItem="dih-XE-4lS" firstAttribute="top" secondItem="5d0-gu-6DK" secondAttribute="bottom" constant="60" id="j74-Kh-aju"/>
+                <constraint firstItem="5d0-gu-6DK" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" id="leH-Yn-2Sh"/>
+                <constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="dih-XE-4lS" secondAttribute="trailing" constant="23" id="mUt-ir-gUR"/>
             </constraints>
             </constraints>
             <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" translucent="NO" prompted="NO"/>
             <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" translucent="NO" prompted="NO"/>
             <point key="canvasLocation" x="130.40000000000001" y="18.440779610194905"/>
             <point key="canvasLocation" x="130.40000000000001" y="18.440779610194905"/>
@@ -309,18 +337,20 @@
     </objects>
     </objects>
     <resources>
     <resources>
         <image name="icon_add_1" width="40" height="40"/>
         <image name="icon_add_1" width="40" height="40"/>
-        <image name="icon_air_sel" width="27.666666030883789" height="30"/>
         <image name="icon_co2_g" width="28" height="28"/>
         <image name="icon_co2_g" width="28" height="28"/>
-        <image name="icon_fan" width="30" height="30"/>
+        <image name="icon_fan" width="22" height="22"/>
         <image name="icon_humidity_g" width="28" height="28"/>
         <image name="icon_humidity_g" width="28" height="28"/>
-        <image name="icon_newair" width="40" height="40"/>
-        <image name="icon_on_1" width="46" height="46"/>
-        <image name="icon_on_sel_1" width="46" height="46"/>
+        <image name="icon_newair" width="75" height="70"/>
+        <image name="icon_newair_sel" width="75" height="70"/>
+        <image name="icon_on_1" width="75" height="70"/>
+        <image name="icon_on_sel_1" width="75" height="70"/>
         <image name="icon_pm2.5_g" width="28" height="28"/>
         <image name="icon_pm2.5_g" width="28" height="28"/>
         <image name="icon_reduce" width="40" height="40"/>
         <image name="icon_reduce" width="40" height="40"/>
+        <image name="icon_sleep" width="75" height="70"/>
+        <image name="icon_sleep_sel" width="75" height="70"/>
         <image name="icon_temperature_g" width="28" height="28"/>
         <image name="icon_temperature_g" width="28" height="28"/>
-        <image name="icon_time" width="40" height="40"/>
-        <image name="icon_time_sel" width="23.666666030883789" height="25"/>
+        <image name="icon_time" width="75" height="70"/>
+        <image name="icon_time_sel" width="75" height="70"/>
         <systemColor name="systemBackgroundColor">
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>
         </systemColor>

+ 3 - 0
Temperature/ControlModule/Home/Controller/RDSBindDeviceVC.h

@@ -6,6 +6,7 @@
 //
 //
 
 
 #import "RDSBaseViewController.h"
 #import "RDSBaseViewController.h"
+#import "RDSDeviceTypeModel.h"
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
@@ -15,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, strong) NSString *deviceID;
 @property (nonatomic, strong) NSString *deviceID;
 @property (nonatomic, strong) NSString *wifiName;
 @property (nonatomic, strong) NSString *wifiName;
 @property (nonatomic, strong) NSString *pwd;
 @property (nonatomic, strong) NSString *pwd;
+@property (nonatomic, strong) RDSDeviceTypeModel *deviceTypeModel;
+
 @end
 @end
 
 
 NS_ASSUME_NONNULL_END
 NS_ASSUME_NONNULL_END

+ 1 - 1
Temperature/ControlModule/Home/Controller/RDSBindDeviceVC.m

@@ -118,7 +118,7 @@
 }
 }
 
 
 - (void)p_updateLocation{
 - (void)p_updateLocation{
-    RDS_WEAKSELF(weakSelf)
+//    RDS_WEAKSELF(weakSelf)
     [RDSDemoApiHelper rds_updateHomeInfoWithHomeId:TheDataManager.current_home_id name:TheDataManager.current_home_name city:TheMapHelper.userLocation.cityString success:^(id responseObject) {
     [RDSDemoApiHelper rds_updateHomeInfoWithHomeId:TheDataManager.current_home_id name:TheDataManager.current_home_name city:TheMapHelper.userLocation.cityString success:^(id responseObject) {
         if ([responseObject[@"code"] intValue] == 0) {
         if ([responseObject[@"code"] intValue] == 0) {
             DDLog(@"更新城市成功");
             DDLog(@"更新城市成功");

+ 2 - 0
Temperature/ControlModule/Home/Controller/RDSBindSubDeviceVC.h

@@ -6,6 +6,7 @@
 //
 //
 
 
 #import "RDSBaseViewController.h"
 #import "RDSBaseViewController.h"
+#import "RDSDeviceTypeModel.h"
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
@@ -13,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 @property (nonatomic, strong) NSString *roomName;
 @property (nonatomic, strong) NSString *roomName;
 @property (nonatomic, strong) NSString *deviceID;
 @property (nonatomic, strong) NSString *deviceID;
+@property (nonatomic, strong) RDSDeviceTypeModel *deviceTypeModel;
 
 
 @end
 @end
 
 

+ 3 - 1
Temperature/ControlModule/Home/Controller/RDSBindSubDeviceVC.m

@@ -31,10 +31,11 @@
     
     
     
     
     RDS_WEAKSELF(weakSelf)
     RDS_WEAKSELF(weakSelf)
-    [RDSDemoApiHelper rds_addRoomName:_roomName control_number:_deviceID success:^(id responseObject) {
+    [RDSDemoApiHelper rds_addRoomName:_roomName control_number:_deviceID device_type_id:self.deviceTypeModel.record_id success:^(id responseObject) {
         
         
         if ([responseObject[@"code"] intValue] != 0) {
         if ([responseObject[@"code"] intValue] != 0) {
             [RDSHudShower showBottomToast:responseObject[@"message"]];
             [RDSHudShower showBottomToast:responseObject[@"message"]];
+            [self.navigationController popViewControllerAnimated:YES];
         }else{
         }else{
             [weakSelf p_cancelTimeout];
             [weakSelf p_cancelTimeout];
             [RDSHudShower showCenterToast:@"绑定成功"];
             [RDSHudShower showCenterToast:@"绑定成功"];
@@ -45,6 +46,7 @@
         
         
     } failure:^(NSError *error) {
     } failure:^(NSError *error) {
         [RDSHudShower showBottomToast:@"连接服务器失败"];
         [RDSHudShower showBottomToast:@"连接服务器失败"];
+        [self.navigationController popViewControllerAnimated:YES];
     }];
     }];
     
     
     dispatch_async(dispatch_get_main_queue(), ^{
     dispatch_async(dispatch_get_main_queue(), ^{

+ 8 - 3
Temperature/ControlModule/Home/Controller/RDSHomeVC.m

@@ -11,7 +11,7 @@
 #import "RDSHomeRoomView.h"
 #import "RDSHomeRoomView.h"
 #import "RDSRoomCell.h"
 #import "RDSRoomCell.h"
 #import "RDSAddRoomView.h"
 #import "RDSAddRoomView.h"
-#import "RDSResetDeviceVC.h"
+#import "RDSSelectDeviceMainVC.h"
 #import "RDSAirControlVC.h"
 #import "RDSAirControlVC.h"
 #import "RDSSubControlVC.h"
 #import "RDSSubControlVC.h"
 #import <MJRefresh/MJRefresh.h>
 #import <MJRefresh/MJRefresh.h>
@@ -48,6 +48,7 @@ static NSString * const RDSRoomCellID = @"RDSRoomCellID";
     
     
     
     
     [self p_getCurrentUserInfo];
     [self p_getCurrentUserInfo];
+//    [self p_getHomeList];
     [self p_setUpTimer];// 初始化轮询
     [self p_setUpTimer];// 初始化轮询
     [self p_setupCollectionView];
     [self p_setupCollectionView];
     
     
@@ -84,6 +85,10 @@ static NSString * const RDSRoomCellID = @"RDSRoomCellID";
     }];
     }];
 }
 }
 
 
+//- (void)p_getHomeList {
+//    [RDSHomeModel rds_getHomeListIsAdmin:NO finished:nil];
+//}
+
 - (void)p_getWeather{
 - (void)p_getWeather{
     RDS_WEAKSELF(weakSelf)
     RDS_WEAKSELF(weakSelf)
     [WeatherModel rds_getWeatherFinished:^(WeatherModel * _Nonnull weather, NSError * _Nonnull error) {
     [WeatherModel rds_getWeatherFinished:^(WeatherModel * _Nonnull weather, NSError * _Nonnull error) {
@@ -238,7 +243,7 @@ static NSString * const RDSRoomCellID = @"RDSRoomCellID";
         
         
         RDS_WEAKSELF(weakSelf)
         RDS_WEAKSELF(weakSelf)
         _addView.onAddClick = ^{
         _addView.onAddClick = ^{
-            RDSResetDeviceVC *vc = [[RDSResetDeviceVC alloc] init];
+            RDSSelectDeviceMainVC *vc = [[RDSSelectDeviceMainVC alloc] init];
             vc.hidesBottomBarWhenPushed = YES;
             vc.hidesBottomBarWhenPushed = YES;
             [weakSelf pushViewController:vc animated:YES];
             [weakSelf pushViewController:vc animated:YES];
             
             
@@ -305,7 +310,7 @@ static NSString * const RDSRoomCellID = @"RDSRoomCellID";
     [collectionView deselectItemAtIndexPath:indexPath animated:YES];
     [collectionView deselectItemAtIndexPath:indexPath animated:YES];
     
     
     RDSRoomModel *roomModel = TheDataManager.rooms[indexPath.row];
     RDSRoomModel *roomModel = TheDataManager.rooms[indexPath.row];
-    if(roomModel.is_master){
+    if(roomModel.isMasterController){
         RDSAirControlVC *vc = [[RDSAirControlVC alloc] init];
         RDSAirControlVC *vc = [[RDSAirControlVC alloc] init];
         vc.hidesBottomBarWhenPushed = YES;
         vc.hidesBottomBarWhenPushed = YES;
         vc.roomModel = roomModel;
         vc.roomModel = roomModel;

+ 2 - 0
Temperature/ControlModule/Home/Controller/RDSInputWiFiVC.h

@@ -6,6 +6,7 @@
 //
 //
 
 
 #import "RDSBaseViewController.h"
 #import "RDSBaseViewController.h"
+#import "RDSDeviceTypeModel.h"
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
@@ -13,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 @property (nonatomic, strong) NSString *roomName;
 @property (nonatomic, strong) NSString *roomName;
 @property (nonatomic, strong) NSString *deviceID;
 @property (nonatomic, strong) NSString *deviceID;
+@property (nonatomic, strong) RDSDeviceTypeModel *deviceTypeModel;
 
 
 @end
 @end
 
 

+ 1 - 0
Temperature/ControlModule/Home/Controller/RDSInputWiFiVC.m

@@ -91,6 +91,7 @@
     vc.deviceID = _deviceID;
     vc.deviceID = _deviceID;
     vc.wifiName = self.wifiAccountTF.text;
     vc.wifiName = self.wifiAccountTF.text;
     vc.pwd = self.wifiPwdTF.text;
     vc.pwd = self.wifiPwdTF.text;
+    vc.deviceTypeModel = self.deviceTypeModel;
     [self pushViewController:vc animated:YES];
     [self pushViewController:vc animated:YES];
     
     
 }
 }

+ 3 - 0
Temperature/ControlModule/Home/Controller/RDSResetDeviceVC.h

@@ -6,11 +6,14 @@
 //
 //
 
 
 #import "RDSBaseViewController.h"
 #import "RDSBaseViewController.h"
+#import "RDSDeviceTypeModel.h"
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
 @interface RDSResetDeviceVC : RDSBaseViewController
 @interface RDSResetDeviceVC : RDSBaseViewController
 
 
+@property (nonatomic, strong) RDSDeviceTypeModel *deviceTypeModel;
+
 @end
 @end
 
 
 NS_ASSUME_NONNULL_END
 NS_ASSUME_NONNULL_END

+ 4 - 2
Temperature/ControlModule/Home/Controller/RDSResetDeviceVC.m

@@ -23,13 +23,14 @@
     
     
     self.title = @"添加房间";
     self.title = @"添加房间";
     
     
-    if(TheDataManager.rooms.count == 0){
+//    if(TheDataManager.rooms.count == 0){
+    if (self.deviceTypeModel.isMasterController) {
         // 添加主控
         // 添加主控
         _lab1.text = @"1、主控制器开机状态下,长按『菜单键』3s进入设置界面";
         _lab1.text = @"1、主控制器开机状态下,长按『菜单键』3s进入设置界面";
         _lab2.text = @"2、再次长按『菜单键』,直到显示配网二维码";
         _lab2.text = @"2、再次长按『菜单键』,直到显示配网二维码";
         _imgView1.image = [UIImage imageNamed:@"img_reset_1"];
         _imgView1.image = [UIImage imageNamed:@"img_reset_1"];
         _imgView2.image = [UIImage imageNamed:@"img_reset_2"];
         _imgView2.image = [UIImage imageNamed:@"img_reset_2"];
-    }else{
+    } else {
         // 添加分控
         // 添加分控
         _lab1.text = @"1、分控制器开机状态下,长按『菜单键』3s直到界面出现配网二维码";
         _lab1.text = @"1、分控制器开机状态下,长按『菜单键』3s直到界面出现配网二维码";
         _lab2.text = @"2、使用APP扫码绑定";
         _lab2.text = @"2、使用APP扫码绑定";
@@ -42,6 +43,7 @@
 - (IBAction)onNextBtnClick {
 - (IBAction)onNextBtnClick {
     
     
     RDSAddRoomVC *vc = [[RDSAddRoomVC alloc] init];
     RDSAddRoomVC *vc = [[RDSAddRoomVC alloc] init];
+    vc.deviceTypeModel = self.deviceTypeModel;
     [self pushViewController:vc animated:YES];
     [self pushViewController:vc animated:YES];
     
     
 }
 }

+ 3 - 12
Temperature/ControlModule/Home/Controller/RDSSelectDeviceMainVC.m

@@ -17,7 +17,6 @@
 
 
 @property (nonatomic, strong) TYTabPagerBar *pagerBar;
 @property (nonatomic, strong) TYTabPagerBar *pagerBar;
 @property (nonatomic, strong) TYPagerController *pagerController;
 @property (nonatomic, strong) TYPagerController *pagerController;
-@property (nonatomic, strong) NSMutableArray *pagerBarTitleArray;
 
 
 @end
 @end
 
 
@@ -46,6 +45,7 @@
     self.navigationItem.title = @"选择设备";
     self.navigationItem.title = @"选择设备";
     
     
     self.pagerBar = [[TYTabPagerBar alloc] init];
     self.pagerBar = [[TYTabPagerBar alloc] init];
+    self.pagerBar.backgroundColor = [UIColor colorWithHexString:@"#FBFBFB"];
     self.pagerBar.layout.barStyle = TYPagerBarStyleProgressView;
     self.pagerBar.layout.barStyle = TYPagerBarStyleProgressView;
     self.pagerBar.layout.normalTextColor = [UIColor colorWithHexString:@"#333333"];
     self.pagerBar.layout.normalTextColor = [UIColor colorWithHexString:@"#333333"];
     self.pagerBar.layout.selectedTextColor = [UIColor colorWithHexString:@"#14C9C8"];
     self.pagerBar.layout.selectedTextColor = [UIColor colorWithHexString:@"#14C9C8"];
@@ -57,8 +57,6 @@
     self.pagerBar.layout.cellSpacing = 0;
     self.pagerBar.layout.cellSpacing = 0;
     self.pagerBar.layout.cellEdging = 0;
     self.pagerBar.layout.cellEdging = 0;
     self.pagerBar.layout.sectionInset = UIEdgeInsetsMake(0, 20, 0, 20);
     self.pagerBar.layout.sectionInset = UIEdgeInsetsMake(0, 20, 0, 20);
-    self.pagerBar.layout.progressWidth = 28;
-    self.pagerBar.layout.progressHeight = 4;
     self.pagerBar.layout.adjustContentCellsCenter = NO;
     self.pagerBar.layout.adjustContentCellsCenter = NO;
     self.pagerBar.dataSource = self;
     self.pagerBar.dataSource = self;
     self.pagerBar.delegate = self;
     self.pagerBar.delegate = self;
@@ -82,7 +80,7 @@
     [self.view addSubview:self.pagerController.view];
     [self.view addSubview:self.pagerController.view];
     [self.pagerController.view mas_makeConstraints:^(MASConstraintMaker *make) {
     [self.pagerController.view mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(0);
         make.left.right.mas_equalTo(0);
-        make.top.equalTo(self.pagerBar.mas_bottom).offset(12);
+        make.top.equalTo(self.pagerBar.mas_bottom);
         make.bottom.equalTo(self.view);
         make.bottom.equalTo(self.view);
     }];
     }];
         
         
@@ -114,7 +112,7 @@
 
 
 #pragma mark - TYPagerControllerDataSource
 #pragma mark - TYPagerControllerDataSource
 - (NSInteger)numberOfControllersInPagerController {
 - (NSInteger)numberOfControllersInPagerController {
-    return self.pagerBarTitleArray.count;
+    return self.deviceTypeModel.deviceTypeList.count;
 }
 }
 
 
 - (UIViewController *)pagerController:(TYPagerController *)pagerController controllerForIndex:(NSInteger)index prefetching:(BOOL)prefetching {
 - (UIViewController *)pagerController:(TYPagerController *)pagerController controllerForIndex:(NSInteger)index prefetching:(BOOL)prefetching {
@@ -134,13 +132,6 @@
 }
 }
 
 
 #pragma mark - Getter
 #pragma mark - Getter
-- (NSMutableArray *)pagerBarTitleArray {
-    if (!_pagerBarTitleArray) {
-        _pagerBarTitleArray = [NSMutableArray arrayWithObjects:@"氟系统", @"水系统", nil];
-    }
-    return _pagerBarTitleArray;
-}
-
 - (RDSDeviceTypeModel *)deviceTypeModel {
 - (RDSDeviceTypeModel *)deviceTypeModel {
     if (!_deviceTypeModel) {
     if (!_deviceTypeModel) {
         _deviceTypeModel = [[RDSDeviceTypeModel alloc] init];
         _deviceTypeModel = [[RDSDeviceTypeModel alloc] init];

+ 28 - 5
Temperature/ControlModule/Home/Controller/RDSSelectDeviceSubVC.m

@@ -6,6 +6,8 @@
 //
 //
 
 
 #import "RDSSelectDeviceSubVC.h"
 #import "RDSSelectDeviceSubVC.h"
+#import "RDSDeviceTypeCell.h"
+#import "RDSResetDeviceVC.h"
 
 
 @interface RDSSelectDeviceSubVC () <UITableViewDelegate, UITableViewDataSource>
 @interface RDSSelectDeviceSubVC () <UITableViewDelegate, UITableViewDataSource>
 
 
@@ -23,10 +25,11 @@
 
 
 - (void)configSubviews {
 - (void)configSubviews {
     self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
     self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
+    self.tableView.backgroundColor = [UIColor colorWithHexString:@"#FBFBFB"];
     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
-    self.tableView.rowHeight = 110;
     self.tableView.delegate = self;
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
     self.tableView.dataSource = self;
+    [self.tableView registerClass:[RDSDeviceTypeCell class] forCellReuseIdentifier:NSStringFromClass([RDSDeviceTypeCell class])];
     [self.view addSubview:self.tableView];
     [self.view addSubview:self.tableView];
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.bottom.equalTo(self.view);
         make.left.right.bottom.equalTo(self.view);
@@ -36,10 +39,10 @@
 
 
 - (void)reloadDataWithDataSource:(NSArray *)dataSource {
 - (void)reloadDataWithDataSource:(NSArray *)dataSource {
     if (!dataSource) {
     if (!dataSource) {
-        self.dataSource = [NSMutableArray array];
-        return;
+        self.dataSource = [NSArray array];
+    } else {
+        self.dataSource = [dataSource copy];
     }
     }
-    self.dataSource = [dataSource copy];
     [self.tableView reloadData];
     [self.tableView reloadData];
 }
 }
 
 
@@ -53,7 +56,27 @@
 }
 }
 
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    return [[UITableViewCell alloc] init];
+    RDSDeviceTypeCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([RDSDeviceTypeCell class]) forIndexPath:indexPath];
+    cell.deviceTypeModel = self.dataSource[indexPath.section];
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    RDSDeviceTypeModel *deviceTypeModel = self.dataSource[indexPath.section];
+    if ([deviceTypeModel.code isEqualToString:@"YXK-P/DN-JF-8"]) {
+        [TheAlertCtrl rds_alertWithTitle:@"提示" message:@"该功能正在开发中,敬请期待!"];
+        return;
+    }
+    RDSResetDeviceVC *resetDeviceVC = [[RDSResetDeviceVC alloc] init];
+    resetDeviceVC.deviceTypeModel = deviceTypeModel;
+    [self.parentViewController.navigationController pushViewController:resetDeviceVC animated:YES];
+}
+
+- (NSArray *)dataSource {
+    if (!_dataSource) {
+        _dataSource = [NSArray array];
+    }
+    return _dataSource;
 }
 }
 
 
 @end
 @end

+ 11 - 11
Temperature/ControlModule/Home/Controller/RDSSubControlVC.m

@@ -66,16 +66,16 @@
 - (void)p_initUI{
 - (void)p_initUI{
     
     
     
     
-    UIImage *greenImg = [UIImage rds_imageWithColor:RDSGreenColor];
-    UIImage *lightGreenImg = [UIImage rds_imageWithColor:RDSLightGreenColor];
-    
-    [_powerBtn setBackgroundImage:lightGreenImg forState:UIControlStateNormal];
-    [_powerBtn setBackgroundImage:greenImg forState:UIControlStateSelected];
+//    UIImage *greenImg = [UIImage rds_imageWithColor:RDSGreenColor];
+//    UIImage *lightGreenImg = [UIImage rds_imageWithColor:RDSLightGreenColor];
+//    
+//    [_powerBtn setBackgroundImage:lightGreenImg forState:UIControlStateNormal];
+//    [_powerBtn setBackgroundImage:greenImg forState:UIControlStateSelected];
     
     
 
 
     
     
-    CGFloat width = SCREEN_WIDTH-120;
-    _cirSlider = [[CYCircularSlider alloc]initWithFrame:CGRectMake(10, 0, width, width)];
+    CGFloat width = 220;
+    _cirSlider =[[CYCircularSlider alloc]initWithFrame:CGRectMake((246 - width) / 2, (246 - width) / 2, width, width)];
     _cirSlider.delegate = self;
     _cirSlider.delegate = self;
     _cirSlider.backgroundColor = UIColor.clearColor;
     _cirSlider.backgroundColor = UIColor.clearColor;
     _cirSlider.filledColor = RDSGreenColor;
     _cirSlider.filledColor = RDSGreenColor;
@@ -85,10 +85,10 @@
     _cirSlider.maximumValue = 30;
     _cirSlider.maximumValue = 30;
     _cirSlider.value = 28;
     _cirSlider.value = 28;
     
     
-    _cirSlider.userInteractionEnabled = NO;
-    _cirSlider.handleColor = UIColor.clearColor;
-    _cirSlider.handleColor2 = UIColor.clearColor;
-    _cirSlider.handleColor3 = RDSGreenColor;
+//    _cirSlider.userInteractionEnabled = NO;
+//    _cirSlider.handleColor = UIColor.clearColor;
+//    _cirSlider.handleColor2 = UIColor.clearColor;
+//    _cirSlider.handleColor3 = RDSGreenColor;
     
     
     [self.tempView addSubview:_cirSlider];
     [self.tempView addSubview:_cirSlider];
     
     

+ 27 - 19
Temperature/ControlModule/Home/Controller/RDSSubControlVC.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<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="retina4_7" orientation="portrait" appearance="light"/>
     <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -32,26 +32,36 @@
                             <rect key="frame" x="48" y="30" width="279" height="251"/>
                             <rect key="frame" x="48" y="30" width="279" height="251"/>
                             <subviews>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kGa-cc-CSP">
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kGa-cc-CSP">
-                                    <rect key="frame" x="0.0" y="0.0" width="279" height="251"/>
-                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <rect key="frame" x="16.5" y="0.0" width="246" height="246"/>
+                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="246" id="36f-Yf-hnQ"/>
+                                        <constraint firstAttribute="width" constant="246" id="3LX-zs-txc"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                            <integer key="value" value="123"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
+                                    </userDefinedRuntimeAttributes>
                                 </view>
                                 </view>
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dfv-82-UbI">
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dfv-82-UbI">
                                     <rect key="frame" x="34" y="0.0" width="211" height="211"/>
                                     <rect key="frame" x="34" y="0.0" width="211" height="211"/>
                                     <subviews>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="28" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TUq-Bs-9C5">
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="28" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TUq-Bs-9C5">
-                                            <rect key="frame" x="62.5" y="55" width="86" height="101"/>
-                                            <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="72"/>
+                                            <rect key="frame" x="77.5" y="72.5" width="56.5" height="66"/>
+                                            <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="47"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         </label>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="℃" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dtl-C8-0cC">
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="℃" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dtl-C8-0cC">
-                                            <rect key="frame" x="148.5" y="68.5" width="24" height="35"/>
+                                            <rect key="frame" x="134" y="78.5" width="24" height="35"/>
                                             <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="25"/>
                                             <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="25"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         </label>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="主控设定" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cdp-22-2A9">
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="主控设定" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cdp-22-2A9">
-                                            <rect key="frame" x="73.5" y="161" width="64" height="22.5"/>
+                                            <rect key="frame" x="73.5" y="143.5" width="64" height="22.5"/>
                                             <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="16"/>
                                             <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="16"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.1529411765" green="0.18039215689999999" blue="0.23137254900000001" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
@@ -64,7 +74,7 @@
                                         <constraint firstItem="dtl-C8-0cC" firstAttribute="leading" secondItem="TUq-Bs-9C5" secondAttribute="trailing" id="QpW-EH-kFk"/>
                                         <constraint firstItem="dtl-C8-0cC" firstAttribute="leading" secondItem="TUq-Bs-9C5" secondAttribute="trailing" id="QpW-EH-kFk"/>
                                         <constraint firstAttribute="width" secondItem="dfv-82-UbI" secondAttribute="height" id="S0h-Qs-RHR"/>
                                         <constraint firstAttribute="width" secondItem="dfv-82-UbI" secondAttribute="height" id="S0h-Qs-RHR"/>
                                         <constraint firstItem="Cdp-22-2A9" firstAttribute="top" secondItem="TUq-Bs-9C5" secondAttribute="bottom" constant="5" id="kfW-sW-YTT"/>
                                         <constraint firstItem="Cdp-22-2A9" firstAttribute="top" secondItem="TUq-Bs-9C5" secondAttribute="bottom" constant="5" id="kfW-sW-YTT"/>
-                                        <constraint firstItem="TUq-Bs-9C5" firstAttribute="top" secondItem="dtl-C8-0cC" secondAttribute="top" multiplier="0.8" id="ln7-pg-JO8"/>
+                                        <constraint firstItem="TUq-Bs-9C5" firstAttribute="top" secondItem="dtl-C8-0cC" secondAttribute="top" constant="-6" id="ln7-pg-JO8"/>
                                         <constraint firstItem="TUq-Bs-9C5" firstAttribute="centerX" secondItem="dfv-82-UbI" secondAttribute="centerX" id="swS-Tv-6ii"/>
                                         <constraint firstItem="TUq-Bs-9C5" firstAttribute="centerX" secondItem="dfv-82-UbI" secondAttribute="centerX" id="swS-Tv-6ii"/>
                                     </constraints>
                                     </constraints>
                                 </view>
                                 </view>
@@ -106,11 +116,9 @@
                                 <constraint firstItem="sbe-1G-lug" firstAttribute="top" secondItem="dfv-82-UbI" secondAttribute="bottom" id="ZcX-QB-w1U"/>
                                 <constraint firstItem="sbe-1G-lug" firstAttribute="top" secondItem="dfv-82-UbI" secondAttribute="bottom" id="ZcX-QB-w1U"/>
                                 <constraint firstAttribute="bottom" secondItem="sbe-1G-lug" secondAttribute="bottom" id="ZgT-2w-9rs"/>
                                 <constraint firstAttribute="bottom" secondItem="sbe-1G-lug" secondAttribute="bottom" id="ZgT-2w-9rs"/>
                                 <constraint firstAttribute="trailing" secondItem="BK4-fL-6xV" secondAttribute="trailing" id="de7-eF-DjK"/>
                                 <constraint firstAttribute="trailing" secondItem="BK4-fL-6xV" secondAttribute="trailing" id="de7-eF-DjK"/>
+                                <constraint firstItem="kGa-cc-CSP" firstAttribute="centerX" secondItem="Qyn-r8-ZqS" secondAttribute="centerX" id="fu9-EG-67x"/>
                                 <constraint firstItem="dfv-82-UbI" firstAttribute="top" secondItem="Qyn-r8-ZqS" secondAttribute="top" id="gji-WS-0fQ"/>
                                 <constraint firstItem="dfv-82-UbI" firstAttribute="top" secondItem="Qyn-r8-ZqS" secondAttribute="top" id="gji-WS-0fQ"/>
-                                <constraint firstItem="kGa-cc-CSP" firstAttribute="leading" secondItem="Qyn-r8-ZqS" secondAttribute="leading" id="rgM-IX-G5J"/>
-                                <constraint firstAttribute="bottom" secondItem="kGa-cc-CSP" secondAttribute="bottom" id="unU-OB-5lp"/>
                                 <constraint firstItem="dfv-82-UbI" firstAttribute="centerX" secondItem="Qyn-r8-ZqS" secondAttribute="centerX" id="vrX-zZ-AQD"/>
                                 <constraint firstItem="dfv-82-UbI" firstAttribute="centerX" secondItem="Qyn-r8-ZqS" secondAttribute="centerX" id="vrX-zZ-AQD"/>
-                                <constraint firstAttribute="trailing" secondItem="kGa-cc-CSP" secondAttribute="trailing" id="zes-Jx-yVE"/>
                             </constraints>
                             </constraints>
                         </view>
                         </view>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aqY-gg-Q7A">
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aqY-gg-Q7A">
@@ -166,14 +174,14 @@
                             <rect key="frame" x="25" y="384" width="325" height="58"/>
                             <rect key="frame" x="25" y="384" width="325" height="58"/>
                             <subviews>
                             <subviews>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_fan" translatesAutoresizingMaskIntoConstraints="NO" id="ZWj-fd-eWp">
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_fan" translatesAutoresizingMaskIntoConstraints="NO" id="ZWj-fd-eWp">
-                                    <rect key="frame" x="10" y="14" width="30" height="30"/>
+                                    <rect key="frame" x="10" y="14" width="23" height="30"/>
                                     <constraints>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="30" id="K3m-Rp-ecB"/>
                                         <constraint firstAttribute="height" constant="30" id="K3m-Rp-ecB"/>
-                                        <constraint firstAttribute="width" constant="30" id="i2S-gt-02q"/>
+                                        <constraint firstAttribute="width" constant="23" id="i2S-gt-02q"/>
                                     </constraints>
                                     </constraints>
                                 </imageView>
                                 </imageView>
                                 <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="5" translatesAutoresizingMaskIntoConstraints="NO" id="NGB-dm-V3h" customClass="RDSlider">
                                 <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="5" translatesAutoresizingMaskIntoConstraints="NO" id="NGB-dm-V3h" customClass="RDSlider">
-                                    <rect key="frame" x="45" y="14" width="255" height="31"/>
+                                    <rect key="frame" x="38" y="14" width="262" height="31"/>
                                     <connections>
                                     <connections>
                                         <action selector="fanValueChanged:" destination="-1" eventType="valueChanged" id="2r6-Lf-oNj"/>
                                         <action selector="fanValueChanged:" destination="-1" eventType="valueChanged" id="2r6-Lf-oNj"/>
                                         <action selector="fanValueDidChanged:" destination="-1" eventType="touchUpInside" id="NVf-Ds-aax"/>
                                         <action selector="fanValueDidChanged:" destination="-1" eventType="touchUpInside" id="NVf-Ds-aax"/>
@@ -181,7 +189,7 @@
                                     </connections>
                                     </connections>
                                 </slider>
                                 </slider>
                             </subviews>
                             </subviews>
-                            <color key="backgroundColor" red="0.91372549020000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <gestureRecognizers/>
                             <gestureRecognizers/>
                             <constraints>
                             <constraints>
                                 <constraint firstItem="ZWj-fd-eWp" firstAttribute="leading" secondItem="rlX-Vv-HSU" secondAttribute="leading" constant="10" id="Kx0-Ll-dag"/>
                                 <constraint firstItem="ZWj-fd-eWp" firstAttribute="leading" secondItem="rlX-Vv-HSU" secondAttribute="leading" constant="10" id="Kx0-Ll-dag"/>
@@ -242,10 +250,10 @@
     </objects>
     </objects>
     <resources>
     <resources>
         <image name="icon_add_1" width="40" height="40"/>
         <image name="icon_add_1" width="40" height="40"/>
-        <image name="icon_fan" width="30" height="30"/>
+        <image name="icon_fan" width="22" height="22"/>
         <image name="icon_humidity_g" width="28" height="28"/>
         <image name="icon_humidity_g" width="28" height="28"/>
-        <image name="icon_on_1" width="46" height="46"/>
-        <image name="icon_on_sel_1" width="46" height="46"/>
+        <image name="icon_on_1" width="75" height="70"/>
+        <image name="icon_on_sel_1" width="75" height="70"/>
         <image name="icon_reduce" width="40" height="40"/>
         <image name="icon_reduce" width="40" height="40"/>
         <image name="icon_temperature" width="24" height="24"/>
         <image name="icon_temperature" width="24" height="24"/>
         <systemColor name="systemBackgroundColor">
         <systemColor name="systemBackgroundColor">

+ 2 - 0
Temperature/ControlModule/Home/Model/RDSDeviceTypeModel.h

@@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString *code;
 @property (nonatomic, copy) NSString *code;
 @property (nonatomic, copy) NSString *parent_id;
 @property (nonatomic, copy) NSString *parent_id;
 @property (nonatomic, copy) NSString *icon;
 @property (nonatomic, copy) NSString *icon;
+@property (nonatomic, assign, readonly) BOOL isMasterController;
+
 @property (nonatomic, strong) NSArray<RDSDeviceTypeModel *> *children;
 @property (nonatomic, strong) NSArray<RDSDeviceTypeModel *> *children;
 
 
 @property (nonatomic, strong, readonly) NSMutableArray<RDSDeviceTypeModel *> *deviceTypeList;
 @property (nonatomic, strong, readonly) NSMutableArray<RDSDeviceTypeModel *> *deviceTypeList;

+ 12 - 0
Temperature/ControlModule/Home/Model/RDSDeviceTypeModel.m

@@ -9,6 +9,15 @@
 
 
 @implementation RDSDeviceTypeModel
 @implementation RDSDeviceTypeModel
 
 
+- (void)setCode:(NSString *)code {
+    _code = code;
+    if ([code isEqualToString:@"YXK-Z/86-FG-A"] || [code isEqualToString:@"YXK-Z/86-FC-B"]) {
+        _isMasterController = YES;
+    } else {
+        _isMasterController = NO;
+    }
+}
+
 - (NSString * _Nullable)getDeviceNameWithIndex:(NSInteger)index {
 - (NSString * _Nullable)getDeviceNameWithIndex:(NSInteger)index {
     if (index < self.deviceTypeList.count) {
     if (index < self.deviceTypeList.count) {
         RDSDeviceTypeModel *deviceTypeModel = self.deviceTypeList[index];
         RDSDeviceTypeModel *deviceTypeModel = self.deviceTypeList[index];
@@ -22,6 +31,9 @@
         NSLog(@"responseObject is %@", responseObject);
         NSLog(@"responseObject is %@", responseObject);
         if ([responseObject[@"code"] integerValue] == 0) {
         if ([responseObject[@"code"] integerValue] == 0) {
             NSDictionary *data = responseObject[@"data"];
             NSDictionary *data = responseObject[@"data"];
+            [RDSDeviceTypeModel mj_setupObjectClassInArray:^NSDictionary *{
+                return @{@"children": @"RDSDeviceTypeModel"};
+            }];
             self->_deviceTypeList = [RDSDeviceTypeModel mj_objectArrayWithKeyValuesArray:data];
             self->_deviceTypeList = [RDSDeviceTypeModel mj_objectArrayWithKeyValuesArray:data];
             BLOCK_SAFE_RUN(finished, nil)
             BLOCK_SAFE_RUN(finished, nil)
         } else {
         } else {

+ 1 - 1
Temperature/ControlModule/Home/View/RDSCtrlModeView.m

@@ -9,7 +9,7 @@
 #import "RDSCtrlModeCell.h"
 #import "RDSCtrlModeCell.h"
 
 
 static NSString * const RDSCtrlModeCellID = @"RDSCtrlModeCellID";
 static NSString * const RDSCtrlModeCellID = @"RDSCtrlModeCellID";
-const NSInteger ModeCellNumber = 4;
+const NSInteger ModeCellNumber = 5;
 
 
 @interface RDSCtrlModeView ()<UICollectionViewDelegate, UICollectionViewDataSource>
 @interface RDSCtrlModeView ()<UICollectionViewDelegate, UICollectionViewDataSource>
 @property (nonatomic, weak) UICollectionView *collectionView;
 @property (nonatomic, weak) UICollectionView *collectionView;

+ 19 - 0
Temperature/ControlModule/Home/View/RDSDeviceTypeCell.h

@@ -0,0 +1,19 @@
+//
+//  RDSDeviceTypeCell.h
+//  Temperature
+//
+//  Created by 姓二名哈字富贵儿 on 2023/8/24.
+//
+
+#import <UIKit/UIKit.h>
+#import "RDSDeviceTypeModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface RDSDeviceTypeCell : UITableViewCell
+
+@property (nonatomic, strong) RDSDeviceTypeModel *deviceTypeModel;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 49 - 0
Temperature/ControlModule/Home/View/RDSDeviceTypeCell.m

@@ -0,0 +1,49 @@
+//
+//  RDSDeviceTypeCell.m
+//  Temperature
+//
+//  Created by 姓二名哈字富贵儿 on 2023/8/24.
+//
+
+#import "RDSDeviceTypeCell.h"
+
+@interface RDSDeviceTypeCell ()
+
+@property (nonatomic, strong) UIImageView *deviceTypeView;
+@property (nonatomic, strong) NSDictionary *codeToNameDic;
+
+@end
+
+@implementation RDSDeviceTypeCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        self.contentView.backgroundColor = [UIColor colorWithHexString:@"#FBFBFB"];
+        self.deviceTypeView = [[UIImageView alloc] init];
+        [self.contentView addSubview:self.deviceTypeView];
+        [self.deviceTypeView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.edges.mas_equalTo(UIEdgeInsetsMake(0, 20, 0, 20));
+            make.height.equalTo(self.deviceTypeView.mas_width).multipliedBy(0.328);
+        }];
+    }
+    return self;
+}
+
+- (void)setDeviceTypeModel:(RDSDeviceTypeModel *)deviceTypeModel {
+    _deviceTypeModel = deviceTypeModel;
+    self.deviceTypeView.image = [UIImage imageNamed:self.codeToNameDic[deviceTypeModel.code]];
+}
+
+- (NSDictionary *)codeToNameDic {
+    if (!_codeToNameDic) {
+        _codeToNameDic = @{@"YXK-Z/86-FG-A": @"type_fluorine_main_controller",
+                           @"YXK-F/86-FG-A": @"type_fluorine_sub_controller",
+                           @"YXK-Z/86-FC-B": @"type_water_main_controller",
+                           @"YXK-F/86-FC-B": @"type_water_sub_controller",
+                           @"YXK-P/DN-JF-8": @"type_intelligent_water_collector"};
+    }
+    return _codeToNameDic;
+}
+
+@end

+ 77 - 3
Temperature/ControlModule/Home/View/RDSRoomCell.m

@@ -18,6 +18,9 @@
 @property (nonatomic, strong) UIView *pointView;
 @property (nonatomic, strong) UIView *pointView;
 @property (nonatomic, strong) UILabel *statusLabel;
 @property (nonatomic, strong) UILabel *statusLabel;
 @property (nonatomic, strong) UISwitch *deviceSwitch;
 @property (nonatomic, strong) UISwitch *deviceSwitch;
+@property (nonatomic, strong) UIButton *deleteButton;
+
+@property (nonatomic, strong) NSDictionary *codeToNameDic;
 
 
 @end
 @end
 
 
@@ -35,10 +38,22 @@
 - (void)setModel:(RDSRoomModel *)model {
 - (void)setModel:(RDSRoomModel *)model {
     _model = model;
     _model = model;
     self.roomNameLabel.text = model.name;
     self.roomNameLabel.text = model.name;
-    self.iconView.image = [UIImage imageNamed:@"icon_fluorine_main_controller"];
-    self.deviceTypeLabel.text = @"主控制器";
+    if (isEmptyString(model.code)) {
+        self.iconView.image = [UIImage imageNamed:@"icon_fluorine_sub_controller"];
+    } else {
+        self.iconView.image = [UIImage imageNamed:self.codeToNameDic[model.code]];
+    }
+    
+    if (isEmptyString(model.device_type_name)) {
+        self.deviceTypeLabel.text = @"分控制器";
+    } else {
+        self.deviceTypeLabel.text = model.device_type_name;
+    }
+    
     self.deviceSwitch.on = model.power;
     self.deviceSwitch.on = model.power;
-    if (model.power) {
+    
+    RDSHomeModel *currentHome = TheDataManager.detailHome;
+    if (currentHome.is_online) {
         self.statusLabel.text = [NSString stringWithFormat:@"温度%@°C 湿度%@%%", @(model.temperature), @(model.humidity)];
         self.statusLabel.text = [NSString stringWithFormat:@"温度%@°C 湿度%@%%", @(model.temperature), @(model.humidity)];
         self.statusLabel.textColor = [UIColor colorWithHexString:@"#14C9C8"];
         self.statusLabel.textColor = [UIColor colorWithHexString:@"#14C9C8"];
         self.pointView.backgroundColor = [UIColor colorWithHexString:@"#14C9C8"];
         self.pointView.backgroundColor = [UIColor colorWithHexString:@"#14C9C8"];
@@ -49,6 +64,44 @@
     }
     }
 }
 }
 
 
+- (void)setIsEdit:(BOOL)isEdit {
+    _isEdit = isEdit;
+    
+    if (isEdit) {
+        [self.deviceSwitch removeFromSuperview];
+        [self.contentView addSubview:self.deleteButton];
+        [self.deleteButton mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.size.mas_equalTo(CGSizeMake(48, 48));
+            make.right.equalTo(self.containerView).offset(-16);
+            make.centerY.mas_equalTo(0);
+        }];
+        
+        [self.roomNameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
+            make.right.equalTo(self.deleteButton.mas_left).offset(-12);
+        }];
+    } else {
+        [self.deleteButton removeFromSuperview];
+        [self.contentView addSubview:self.deviceSwitch];
+        [self.deviceSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.size.mas_equalTo(CGSizeMake(48, 24));
+            make.centerY.mas_equalTo(0);
+            make.right.equalTo(self.containerView).offset(-16);
+        }];
+        
+        [self.roomNameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
+            make.right.equalTo(self.deviceSwitch.mas_left).offset(-12);
+        }];
+    }
+}
+
+
+- (void)onPowerChanged:(UISwitch *)powerSwitch {
+    BLOCK_SAFE_RUN(_onPowerClick, powerSwitch.isOn);
+}
+
+- (void)deleteButtonClicked {
+    BLOCK_SAFE_RUN(_onDelClick);
+}
 
 
 - (void)configSubviews {
 - (void)configSubviews {
     [self.contentView addSubview:self.containerView];
     [self.contentView addSubview:self.containerView];
@@ -172,8 +225,29 @@
         _deviceSwitch = [[UISwitch alloc] init];
         _deviceSwitch = [[UISwitch alloc] init];
         _deviceSwitch.onTintColor = [UIColor colorWithHexString:@"#14C9C8"];
         _deviceSwitch.onTintColor = [UIColor colorWithHexString:@"#14C9C8"];
         _deviceSwitch.tintColor = [UIColor colorWithHexString:@"#D9D9D9"];
         _deviceSwitch.tintColor = [UIColor colorWithHexString:@"#D9D9D9"];
+        [_deviceSwitch addTarget:self action:@selector(onPowerChanged:) forControlEvents:UIControlEventValueChanged];
     }
     }
     return _deviceSwitch;
     return _deviceSwitch;
 }
 }
 
 
+- (UIButton *)deleteButton {
+    if (!_deleteButton) {
+        _deleteButton = [[UIButton alloc] init];
+        [_deleteButton setImage:[UIImage imageNamed:@"icon_delete"] forState:UIControlStateNormal];
+        [_deleteButton addTarget:self action:@selector(deleteButtonClicked) forControlEvents:UIControlEventTouchUpInside];
+    }
+    return _deleteButton;
+}
+
+- (NSDictionary *)codeToNameDic {
+    if (!_codeToNameDic) {
+        _codeToNameDic = @{@"YXK-Z/86-FG-A": @"icon_fluorine_main_controller",
+                           @"YXK-F/86-FG-A": @"icon_fluorine_sub_controller",
+                           @"YXK-Z/86-FC-B": @"icon_water_main_controller",
+                           @"YXK-F/86-FC-B": @"icon_water_sub_controller",
+                           @"YXK-P/DN-JF-8": @"icon_diverter_water_collector"};
+    }
+    return _codeToNameDic;
+}
+
 @end
 @end

+ 1 - 1
Temperature/ControlModule/Room/Controller/RDSRoomVC.m

@@ -213,7 +213,7 @@ static NSString * const RDSRoomCellID = @"RDSRoomCellID";
     if (_isEdit) return;
     if (_isEdit) return;
 
 
     RDSRoomModel *roomModel = TheDataManager.rooms[indexPath.row];
     RDSRoomModel *roomModel = TheDataManager.rooms[indexPath.row];
-    if(roomModel.is_master){
+    if(roomModel.isMasterController){
         RDSAirControlVC *vc = [[RDSAirControlVC alloc] init];
         RDSAirControlVC *vc = [[RDSAirControlVC alloc] init];
         vc.hidesBottomBarWhenPushed = YES;
         vc.hidesBottomBarWhenPushed = YES;
         vc.roomModel = roomModel;
         vc.roomModel = roomModel;

+ 5 - 0
Temperature/ControlModule/Room/Model/RDSRoomModel.h

@@ -34,12 +34,16 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, strong) NSString *type;           //
 @property (nonatomic, strong) NSString *type;           //
 @property (nonatomic, strong) NSString *record_id;      // 记录id
 @property (nonatomic, strong) NSString *record_id;      // 记录id
 @property (nonatomic, strong) NSString *control_number; // 分控编号
 @property (nonatomic, strong) NSString *control_number; // 分控编号
+@property (nonatomic, strong) NSString *code;           // 设备类型 code
+@property (nonatomic, strong) NSString *device_type_name;
+
 
 
 @property (nonatomic, strong) NSString *home_name;      // 家名称
 @property (nonatomic, strong) NSString *home_name;      // 家名称
 @property (nonatomic, strong) NSString *home_id;        // 家id
 @property (nonatomic, strong) NSString *home_id;        // 家id
 @property (nonatomic, strong) NSString *user_id;        //
 @property (nonatomic, strong) NSString *user_id;        //
 
 
 // 设备状态
 // 设备状态
+@property (nonatomic, assign, readonly) BOOL isMasterController;
 @property (nonatomic, assign) BOOL is_master;           // 是否是主控
 @property (nonatomic, assign) BOOL is_master;           // 是否是主控
 @property (nonatomic, assign) int air_quality;          // 空气质量 pm2.5
 @property (nonatomic, assign) int air_quality;          // 空气质量 pm2.5
 @property (nonatomic, assign) int temperature;          // 温度
 @property (nonatomic, assign) int temperature;          // 温度
@@ -50,6 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, assign) BOOL new_fan;             // 新风开关
 @property (nonatomic, assign) BOOL new_fan;             // 新风开关
 @property (nonatomic, assign) int mode;                 // 模式(1:制冷2:制热 3:除湿 4:送风 5:新风 6:加湿)
 @property (nonatomic, assign) int mode;                 // 模式(1:制冷2:制热 3:除湿 4:送风 5:新风 6:加湿)
 @property (nonatomic, assign) int fan_speed;            // 风速(1,2,3,4,5)
 @property (nonatomic, assign) int fan_speed;            // 风速(1,2,3,4,5)
+@property (nonatomic, assign) BOOL sleep_mode;          // 睡眠模式是否开启(true 和 false)
 @property (nonatomic, assign) int fan_value;            // 风阀档位
 @property (nonatomic, assign) int fan_value;            // 风阀档位
 @property (nonatomic, assign) BOOL timer_status;        // 定时状态
 @property (nonatomic, assign) BOOL timer_status;        // 定时状态
 @property (nonatomic, strong) NSNumber *duration;       // 定时时长
 @property (nonatomic, strong) NSNumber *duration;       // 定时时长

+ 8 - 0
Temperature/ControlModule/Room/Model/RDSRoomModel.m

@@ -9,6 +9,14 @@
 
 
 @implementation RDSRoomModel
 @implementation RDSRoomModel
 
 
+- (void)setCode:(NSString *)code {
+    _code = code;
+    if ([code isEqualToString:@"YXK-Z/86-FG-A"] || [code isEqualToString:@"YXK-Z/86-FC-B"]) {
+        _isMasterController = YES;
+    } else {
+        _isMasterController = NO;
+    }
+}
 
 
 + (void)rds_getRoomListFinished:(void (^)(NSError *))finished{
 + (void)rds_getRoomListFinished:(void (^)(NSError *))finished{
     
     

+ 0 - 6
Temperature/Info.plist

@@ -2,12 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <plist version="1.0">
 <dict>
 <dict>
-	<key>NSBluetoothPeripheralUsageDescription</key>
-	<string>需要打开蓝牙,才能添加主控面板设备</string>
-	<key>NSLocationWhenInUseUsageDescription</key>
-	<string>开启后,才能获取定位信息,用于加载天气信息</string>
-	<key>NSLocationAlwaysUsageDescription</key>
-	<string>开启后,才能获取定位信息,用于绑定设备和加载天气信息</string>
 	<key>CFBundleAllowMixedLocalizations</key>
 	<key>CFBundleAllowMixedLocalizations</key>
 	<true/>
 	<true/>
 	<key>NSAppTransportSecurity</key>
 	<key>NSAppTransportSecurity</key>

+ 5 - 1
Temperature/NetWork/RDSDemoApiHelper.h

@@ -177,7 +177,7 @@ AS_SINGLETON(RDSDemoApiHelper)
 /// - Parameters:
 /// - Parameters:
 ///   - name: 房间名
 ///   - name: 房间名
 ///   - control_number: 分控编号
 ///   - control_number: 分控编号
-+ (void)rds_addRoomName:(NSString *)name control_number:(NSString *)control_number success:(void (^)(id responseObject))success
++ (void)rds_addRoomName:(NSString *)name control_number:(NSString *)control_number device_type_id:(NSString *)device_type_id success:(void (^)(id responseObject))success
                    failure:(void (^)(NSError *error))failure;
                    failure:(void (^)(NSError *error))failure;
 
 
 
 
@@ -223,6 +223,10 @@ AS_SINGLETON(RDSDemoApiHelper)
 + (void)rds_setNewFanPower:(int)power control_number:(NSString *)control_number success:(void (^)(id responseObject))success
 + (void)rds_setNewFanPower:(int)power control_number:(NSString *)control_number success:(void (^)(id responseObject))success
                    failure:(void (^)(NSError *error))failure;
                    failure:(void (^)(NSError *error))failure;
 
 
+// 睡眠开关
++ (void)rds_setSleepPower:(int)power control_number:(NSString *)control_number success:(void (^)(id responseObject))success
+                  failure:(void (^)(NSError *error))failure;
+
 /// 分控开关
 /// 分控开关
 + (void)rds_setSubDevPower:(int)power control_number:(NSString *)control_number success:(void (^)(id responseObject))success
 + (void)rds_setSubDevPower:(int)power control_number:(NSString *)control_number success:(void (^)(id responseObject))success
                    failure:(void (^)(NSError *error))failure;
                    failure:(void (^)(NSError *error))failure;

+ 20 - 1
Temperature/NetWork/RDSDemoApiHelper.m

@@ -594,12 +594,13 @@ DEF_SINGLETON(RDSDemoApiHelper)
                               progress:nil];
                               progress:nil];
 }
 }
 
 
-+ (void)rds_addRoomName:(NSString *)name control_number:(NSString *)control_number success:(void (^)(id))success failure:(void (^)(NSError *))failure{
++ (void)rds_addRoomName:(NSString *)name control_number:(NSString *)control_number device_type_id:(NSString *)device_type_id success:(void (^)(id))success failure:(void (^)(NSError *))failure{
     
     
     NSDictionary *param = @{
     NSDictionary *param = @{
         @"name" : name,
         @"name" : name,
         @"control_number" : control_number,
         @"control_number" : control_number,
         @"home_id" : TheDataManager.current_home_id,
         @"home_id" : TheDataManager.current_home_id,
+        @"device_type_id": device_type_id
         //@"is_master" : @2,
         //@"is_master" : @2,
     };
     };
     NSDictionary *hearder = @{
     NSDictionary *hearder = @{
@@ -816,6 +817,24 @@ DEF_SINGLETON(RDSDemoApiHelper)
                                  progress:nil];
                                  progress:nil];
 }
 }
 
 
++ (void)rds_setSleepPower:(int)power control_number:(NSString *)control_number success:(void (^)(id))success failure:(void (^)(NSError *))failure {
+    NSDictionary *param = @{
+        @"gateway" : TheDataManager.gateway,
+        @"control_number" : control_number,
+        @"power" : @(power),
+    };
+    NSDictionary *hearder = @{
+        @"Authorization" : TheDataManager.token,
+        @"X-YX-APP": TheApiHelper.appHeader
+    };
+    [RDSDemoApiHelper postWithUrlString:@"control/sleep"
+                              paraments:param
+                                headers:hearder
+                                success:success
+                                   fail:failure
+                               progress:nil];
+}
+
 + (void)rds_setSubDevPower:(int)power control_number:(NSString *)control_number success:(void (^)(id))success failure:(void (^)(NSError *))failure{
 + (void)rds_setSubDevPower:(int)power control_number:(NSString *)control_number success:(void (^)(id))success failure:(void (^)(NSError *))failure{
     
     
     NSDictionary *param = @{
     NSDictionary *param = @{

+ 3 - 3
Temperature/ThirdPart/CYCircularSlider/CYCircularSlider.m

@@ -30,7 +30,7 @@
         _unfilledColor = [UIColor colorWithRed:250/255.0f green:60/255.0f blue:20/255.0f alpha:1.0f];
         _unfilledColor = [UIColor colorWithRed:250/255.0f green:60/255.0f blue:20/255.0f alpha:1.0f];
         _filledColor = [UIColor colorWithRed:175/255.0f green:195/255.0f blue:5/255.0f alpha:1.0f];
         _filledColor = [UIColor colorWithRed:175/255.0f green:195/255.0f blue:5/255.0f alpha:1.0f];
         _handleColor = UIColor.whiteColor;
         _handleColor = UIColor.whiteColor;
-        _handleColor2 = UIColor.greenColor;
+        _handleColor2 = RDSGreenColor;
         _handleColor3 = UIColor.clearColor;
         _handleColor3 = UIColor.clearColor;
         radius = self.frame.size.height/2 - _lineWidth/2-10;// 半径 决定大小
         radius = self.frame.size.height/2 - _lineWidth/2-10;// 半径 决定大小
         _angle = 140;
         _angle = 140;
@@ -90,12 +90,12 @@
     // 大圆点
     // 大圆点
     CGPoint handleCenter =  [self pointFromAngle: _angle];
     CGPoint handleCenter =  [self pointFromAngle: _angle];
     [_handleColor set];
     [_handleColor set];
-    CGContextFillEllipseInRect(ctx, CGRectMake(handleCenter.x-5, handleCenter.y-5, _lineWidth+10, _lineWidth+10));
+    CGContextFillEllipseInRect(ctx, CGRectMake(handleCenter.x-8, handleCenter.y-8, _lineWidth+16, _lineWidth+16));
     CGContextRestoreGState(ctx);
     CGContextRestoreGState(ctx);
     
     
     
     
     // 中间小圆点
     // 中间小圆点
-    CGFloat width = 10;
+    CGFloat width = 18;
     CGContextSaveGState(ctx);
     CGContextSaveGState(ctx);
     [_handleColor2 set];
     [_handleColor2 set];
     CGContextFillEllipseInRect(ctx, CGRectMake(handleCenter.x-(width-_lineWidth)/2, handleCenter.y-(width-_lineWidth)/2, width, width));
     CGContextFillEllipseInRect(ctx, CGRectMake(handleCenter.x-(width-_lineWidth)/2, handleCenter.y-(width-_lineWidth)/2, width, width));

+ 5 - 3
Temperature/Tools/Slider/RDSlider.m

@@ -10,9 +10,11 @@
 @implementation RDSlider
 @implementation RDSlider
 
 
 // 改变slider滑道的高的
 // 改变slider滑道的高的
-- (CGRect)trackRectForBounds:(CGRect)bounds{
-    
-    return CGRectMake(0, 0, CGRectGetWidth(self.frame), 12);
+- (CGRect)trackRectForBounds:(CGRect)bounds {
+    CGRect rect = bounds;
+    rect.size.height = 10;
+    rect.origin.y = (self.frame.size.height - rect.size.height) / 2;
+    return rect;
 }
 }