Commit 6a3d576e by 李威

1.1.2.9正式版本

parent 99da4460
......@@ -14,6 +14,34 @@
390516C92BAAB95000935EDE /* DXHotElecticView.m in Sources */ = {isa = PBXBuildFile; fileRef = 390516C62BAA75D000935EDE /* DXHotElecticView.m */; };
390516CA2BAAB95100935EDE /* DXHotElecticView.m in Sources */ = {isa = PBXBuildFile; fileRef = 390516C62BAA75D000935EDE /* DXHotElecticView.m */; };
390516CB2BAAB95100935EDE /* DXHotElecticView.m in Sources */ = {isa = PBXBuildFile; fileRef = 390516C62BAA75D000935EDE /* DXHotElecticView.m */; };
39D57E752DD445C400FACDD5 /* DXDRPlusVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E742DD445C400FACDD5 /* DXDRPlusVC.m */; };
39D57E762DD445C400FACDD5 /* DXDRPlusVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E742DD445C400FACDD5 /* DXDRPlusVC.m */; };
39D57E772DD445C400FACDD5 /* DXDRPlusVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E742DD445C400FACDD5 /* DXDRPlusVC.m */; };
39D57E782DD445C400FACDD5 /* DXDRPlusVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E742DD445C400FACDD5 /* DXDRPlusVC.m */; };
39D57E802DD5BB6F00FACDD5 /* DXDRPlusSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E7F2DD5BB6F00FACDD5 /* DXDRPlusSelectView.m */; };
39D57E812DD5BB6F00FACDD5 /* DXDRPlusSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E7F2DD5BB6F00FACDD5 /* DXDRPlusSelectView.m */; };
39D57E822DD5BB6F00FACDD5 /* DXDRPlusSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E7F2DD5BB6F00FACDD5 /* DXDRPlusSelectView.m */; };
39D57E832DD5BB6F00FACDD5 /* DXDRPlusSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E7F2DD5BB6F00FACDD5 /* DXDRPlusSelectView.m */; };
39D57E852DD5BC0A00FACDD5 /* DXDRPlus.json in Resources */ = {isa = PBXBuildFile; fileRef = 39D57E842DD5BBED00FACDD5 /* DXDRPlus.json */; };
39D57E862DD5BC0A00FACDD5 /* DXDRPlus.json in Resources */ = {isa = PBXBuildFile; fileRef = 39D57E842DD5BBED00FACDD5 /* DXDRPlus.json */; };
39D57E872DD5BC0A00FACDD5 /* DXDRPlus.json in Resources */ = {isa = PBXBuildFile; fileRef = 39D57E842DD5BBED00FACDD5 /* DXDRPlus.json */; };
39D57E882DD5BC0A00FACDD5 /* DXDRPlus.json in Resources */ = {isa = PBXBuildFile; fileRef = 39D57E842DD5BBED00FACDD5 /* DXDRPlus.json */; };
39D57E8B2DD5C84C00FACDD5 /* DXDRPlusMoel.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E8A2DD5C84C00FACDD5 /* DXDRPlusMoel.m */; };
39D57E8C2DD5C84C00FACDD5 /* DXDRPlusMoel.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E8A2DD5C84C00FACDD5 /* DXDRPlusMoel.m */; };
39D57E8D2DD5C84C00FACDD5 /* DXDRPlusMoel.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E8A2DD5C84C00FACDD5 /* DXDRPlusMoel.m */; };
39D57E8E2DD5C84C00FACDD5 /* DXDRPlusMoel.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E8A2DD5C84C00FACDD5 /* DXDRPlusMoel.m */; };
39D57E912DDADDB000FACDD5 /* DXDRPlusTipsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E902DDADDB000FACDD5 /* DXDRPlusTipsView.m */; };
39D57E922DDADDB000FACDD5 /* DXDRPlusTipsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E902DDADDB000FACDD5 /* DXDRPlusTipsView.m */; };
39D57E932DDADDB000FACDD5 /* DXDRPlusTipsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E902DDADDB000FACDD5 /* DXDRPlusTipsView.m */; };
39D57E942DDADDB000FACDD5 /* DXDRPlusTipsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E902DDADDB000FACDD5 /* DXDRPlusTipsView.m */; };
39D57E972DDADDDB00FACDD5 /* DXDRPlusCustomeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E962DDADDDB00FACDD5 /* DXDRPlusCustomeView.m */; };
39D57E982DDADDDB00FACDD5 /* DXDRPlusCustomeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E962DDADDDB00FACDD5 /* DXDRPlusCustomeView.m */; };
39D57E992DDADDDB00FACDD5 /* DXDRPlusCustomeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E962DDADDDB00FACDD5 /* DXDRPlusCustomeView.m */; };
39D57E9A2DDADDDB00FACDD5 /* DXDRPlusCustomeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E962DDADDDB00FACDD5 /* DXDRPlusCustomeView.m */; };
39D57E9D2DDADDEB00FACDD5 /* DXDRPlusSmartView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E9C2DDADDEB00FACDD5 /* DXDRPlusSmartView.m */; };
39D57E9E2DDADDEB00FACDD5 /* DXDRPlusSmartView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E9C2DDADDEB00FACDD5 /* DXDRPlusSmartView.m */; };
39D57E9F2DDADDEB00FACDD5 /* DXDRPlusSmartView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E9C2DDADDEB00FACDD5 /* DXDRPlusSmartView.m */; };
39D57EA02DDADDEB00FACDD5 /* DXDRPlusSmartView.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D57E9C2DDADDEB00FACDD5 /* DXDRPlusSmartView.m */; };
39E082752BB3BA6800786B9D /* DXRDSmartRec.m in Sources */ = {isa = PBXBuildFile; fileRef = 39E082742BB3BA6800786B9D /* DXRDSmartRec.m */; };
39E082762BB3BCEF00786B9D /* DXRDSmartRec.m in Sources */ = {isa = PBXBuildFile; fileRef = 39E082742BB3BA6800786B9D /* DXRDSmartRec.m */; };
39E082772BB3BCF000786B9D /* DXRDSmartRec.m in Sources */ = {isa = PBXBuildFile; fileRef = 39E082742BB3BA6800786B9D /* DXRDSmartRec.m */; };
......@@ -677,6 +705,19 @@
390516C52BAA75D000935EDE /* DXHotElecticView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DXHotElecticView.h; sourceTree = "<group>"; };
390516C62BAA75D000935EDE /* DXHotElecticView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DXHotElecticView.m; sourceTree = "<group>"; };
39514C652C5A0A1000D785DC /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = "<group>"; };
39D57E732DD445C400FACDD5 /* DXDRPlusVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DXDRPlusVC.h; sourceTree = "<group>"; };
39D57E742DD445C400FACDD5 /* DXDRPlusVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DXDRPlusVC.m; sourceTree = "<group>"; };
39D57E7E2DD5BB6F00FACDD5 /* DXDRPlusSelectView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DXDRPlusSelectView.h; sourceTree = "<group>"; };
39D57E7F2DD5BB6F00FACDD5 /* DXDRPlusSelectView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DXDRPlusSelectView.m; sourceTree = "<group>"; };
39D57E842DD5BBED00FACDD5 /* DXDRPlus.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = DXDRPlus.json; sourceTree = "<group>"; };
39D57E892DD5C84C00FACDD5 /* DXDRPlusMoel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DXDRPlusMoel.h; sourceTree = "<group>"; };
39D57E8A2DD5C84C00FACDD5 /* DXDRPlusMoel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DXDRPlusMoel.m; sourceTree = "<group>"; };
39D57E8F2DDADDB000FACDD5 /* DXDRPlusTipsView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DXDRPlusTipsView.h; sourceTree = "<group>"; };
39D57E902DDADDB000FACDD5 /* DXDRPlusTipsView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DXDRPlusTipsView.m; sourceTree = "<group>"; };
39D57E952DDADDDB00FACDD5 /* DXDRPlusCustomeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DXDRPlusCustomeView.h; sourceTree = "<group>"; };
39D57E962DDADDDB00FACDD5 /* DXDRPlusCustomeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DXDRPlusCustomeView.m; sourceTree = "<group>"; };
39D57E9B2DDADDEB00FACDD5 /* DXDRPlusSmartView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DXDRPlusSmartView.h; sourceTree = "<group>"; };
39D57E9C2DDADDEB00FACDD5 /* DXDRPlusSmartView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DXDRPlusSmartView.m; sourceTree = "<group>"; };
39E082732BB3BA6800786B9D /* DXRDSmartRec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DXRDSmartRec.h; sourceTree = "<group>"; };
39E082742BB3BA6800786B9D /* DXRDSmartRec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DXRDSmartRec.m; sourceTree = "<group>"; };
39E1E5FF031957A0EABCCB00 /* Pods-DJMHomeTY.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DJMHomeTY.debug.xcconfig"; path = "Target Support Files/Pods-DJMHomeTY/Pods-DJMHomeTY.debug.xcconfig"; sourceTree = "<group>"; };
......@@ -1157,6 +1198,8 @@
39E50A9D2BA81F8900D48C7D /* DXHotElectricVC.m */,
39ED5F272BAD2ACA00AD85FD /* DXHEUpkeepVC.h */,
39ED5F282BAD2ACA00AD85FD /* DXHEUpkeepVC.m */,
39D57E732DD445C400FACDD5 /* DXDRPlusVC.h */,
39D57E742DD445C400FACDD5 /* DXDRPlusVC.m */,
);
path = Controller;
sourceTree = "<group>";
......@@ -1168,6 +1211,9 @@
6CAFE7382AFB76E400C929A7 /* DXHFXVideoModel.m */,
39E082732BB3BA6800786B9D /* DXRDSmartRec.h */,
39E082742BB3BA6800786B9D /* DXRDSmartRec.m */,
39D57E842DD5BBED00FACDD5 /* DXDRPlus.json */,
39D57E892DD5C84C00FACDD5 /* DXDRPlusMoel.h */,
39D57E8A2DD5C84C00FACDD5 /* DXDRPlusMoel.m */,
);
path = Model;
sourceTree = "<group>";
......@@ -1185,6 +1231,14 @@
390516C62BAA75D000935EDE /* DXHotElecticView.m */,
39E50AA22BA8272800D48C7D /* DXProgressBarView.h */,
39E50AA32BA8272800D48C7D /* DXProgressBarView.m */,
39D57E7E2DD5BB6F00FACDD5 /* DXDRPlusSelectView.h */,
39D57E7F2DD5BB6F00FACDD5 /* DXDRPlusSelectView.m */,
39D57E8F2DDADDB000FACDD5 /* DXDRPlusTipsView.h */,
39D57E902DDADDB000FACDD5 /* DXDRPlusTipsView.m */,
39D57E952DDADDDB00FACDD5 /* DXDRPlusCustomeView.h */,
39D57E962DDADDDB00FACDD5 /* DXDRPlusCustomeView.m */,
39D57E9B2DDADDEB00FACDD5 /* DXDRPlusSmartView.h */,
39D57E9C2DDADDEB00FACDD5 /* DXDRPlusSmartView.m */,
);
path = View;
sourceTree = "<group>";
......@@ -2160,6 +2214,7 @@
883151382A0A2CB70025FDDE /* Assets.xcassets in Resources */,
883151392A0A2CB70025FDDE /* Localizable.strings in Resources */,
883151432A0A2CB70025FDDE /* DJMHomeGD.plist in Resources */,
39D57E872DD5BC0A00FACDD5 /* DXDRPlus.json in Resources */,
883151442A0A2CB70025FDDE /* alert.wav in Resources */,
8831514A2A0A2CB70025FDDE /* Main.storyboard in Resources */,
);
......@@ -2177,6 +2232,7 @@
88D324142A177CDC00334372 /* Assets.xcassets in Resources */,
88D324152A177CDC00334372 /* Localizable.strings in Resources */,
88D3241E2A177CDC00334372 /* DJMHomeGD.plist in Resources */,
39D57E882DD5BC0A00FACDD5 /* DXDRPlus.json in Resources */,
88D3241F2A177CDC00334372 /* alert.wav in Resources */,
88D324252A177CDC00334372 /* Main.storyboard in Resources */,
);
......@@ -2187,6 +2243,7 @@
buildActionMask = 2147483647;
files = (
88EE69E32A04D3C900C37EE2 /* working.wav in Resources */,
39D57E862DD5BC0A00FACDD5 /* DXDRPlus.json in Resources */,
88ED74A52A18592200746D44 /* DJMHomeDR.plist in Resources */,
88FF1DCD2A0B77B2001204E3 /* LaunchScreen.storyboard in Resources */,
88EE69E62A04D3C900C37EE2 /* tips.wav in Resources */,
......@@ -2210,6 +2267,7 @@
88EF4FC0298BA4E4009835BF /* Assets.xcassets in Resources */,
880BFDB229A85D4B00B59CFA /* Localizable.strings in Resources */,
88EE6A152A04DE6F00C37EE2 /* DJMHomeGD.plist in Resources */,
39D57E852DD5BC0A00FACDD5 /* DXDRPlus.json in Resources */,
88E7FC2729B3281B00F8585F /* alert.wav in Resources */,
88EF4FBE298BA4E0009835BF /* Main.storyboard in Resources */,
);
......@@ -2226,10 +2284,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMHomeTY/Pods-DJMHomeTY-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMHomeTY/Pods-DJMHomeTY-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DJMHomeTY/Pods-DJMHomeTY-resources.sh\"\n";
......@@ -2243,10 +2305,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-HJMDrWarter/Pods-HJMDrWarter-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-HJMDrWarter/Pods-HJMDrWarter-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HJMDrWarter/Pods-HJMDrWarter-resources.sh\"\n";
......@@ -2260,10 +2326,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMHomeDR/Pods-DJMHomeDR-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMHomeDR/Pods-DJMHomeDR-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DJMHomeDR/Pods-DJMHomeDR-frameworks.sh\"\n";
......@@ -2277,10 +2347,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-HJMDrWarter/Pods-HJMDrWarter-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-HJMDrWarter/Pods-HJMDrWarter-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HJMDrWarter/Pods-HJMDrWarter-frameworks.sh\"\n";
......@@ -2360,10 +2434,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMPS2/Pods-DJMPS2-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMPS2/Pods-DJMPS2-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DJMPS2/Pods-DJMPS2-frameworks.sh\"\n";
......@@ -2377,10 +2455,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMPS2/Pods-DJMPS2-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMPS2/Pods-DJMPS2-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DJMPS2/Pods-DJMPS2-resources.sh\"\n";
......@@ -2416,10 +2498,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMHomeDR/Pods-DJMHomeDR-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMHomeDR/Pods-DJMHomeDR-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DJMHomeDR/Pods-DJMHomeDR-resources.sh\"\n";
......@@ -2433,10 +2519,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMHomeTY/Pods-DJMHomeTY-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DJMHomeTY/Pods-DJMHomeTY-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DJMHomeTY/Pods-DJMHomeTY-frameworks.sh\"\n";
......@@ -2464,6 +2554,7 @@
6CB1390F2C12DEAF00544383 /* DXAddBannerVC.m in Sources */,
883150B12A0A2CB70025FDDE /* XHAlterTools.m in Sources */,
883150B22A0A2CB70025FDDE /* XHPersonalViewModel.m in Sources */,
39D57E8E2DD5C84C00FACDD5 /* DXDRPlusMoel.m in Sources */,
39E082782BB3BCF000786B9D /* DXRDSmartRec.m in Sources */,
883150B32A0A2CB70025FDDE /* XHRegistSecondView.m in Sources */,
883150B42A0A2CB70025FDDE /* XHCustomTabBarController.m in Sources */,
......@@ -2486,8 +2577,11 @@
883150C62A0A2CB70025FDDE /* XHCustomSettimesModel.m in Sources */,
883150C72A0A2CB70025FDDE /* XHCommonMethods.m in Sources */,
883150C82A0A2CB70025FDDE /* UIButton+HJButton.m in Sources */,
39D57E932DDADDB000FACDD5 /* DXDRPlusTipsView.m in Sources */,
883150C92A0A2CB70025FDDE /* HJScanView.m in Sources */,
883150CB2A0A2CB70025FDDE /* XHSelectDeviceModel.m in Sources */,
39D57E762DD445C400FACDD5 /* DXDRPlusVC.m in Sources */,
39D57E972DDADDDB00FACDD5 /* DXDRPlusCustomeView.m in Sources */,
6CAFE73A2AFB76E400C929A7 /* DXHFXVideoModel.m in Sources */,
883150CC2A0A2CB70025FDDE /* XHLableFontOrSize.m in Sources */,
883150CD2A0A2CB70025FDDE /* UIImage+HJImageExtension.m in Sources */,
......@@ -2528,6 +2622,7 @@
883150EB2A0A2CB70025FDDE /* XHHttpRequestManager.m in Sources */,
6CB327DF2AEFA1A600ABAEC3 /* DXHFXView.m in Sources */,
883150EC2A0A2CB70025FDDE /* XHDeviceListCell.m in Sources */,
39D57E802DD5BB6F00FACDD5 /* DXDRPlusSelectView.m in Sources */,
883150ED2A0A2CB70025FDDE /* XHMineSetNicNameVC.m in Sources */,
883150EE2A0A2CB70025FDDE /* main.m in Sources */,
883150EF2A0A2CB70025FDDE /* XHCollectCellModel.m in Sources */,
......@@ -2546,6 +2641,7 @@
883150FC2A0A2CB70025FDDE /* HJVerifyView.m in Sources */,
883150FD2A0A2CB70025FDDE /* XHSelectDeviceVC.m in Sources */,
883150FE2A0A2CB70025FDDE /* XHParentView.m in Sources */,
39D57E9F2DDADDEB00FACDD5 /* DXDRPlusSmartView.m in Sources */,
883150FF2A0A2CB70025FDDE /* XHDeviceValidModel.m in Sources */,
883151002A0A2CB70025FDDE /* HJScanVC.m in Sources */,
883151012A0A2CB70025FDDE /* UITableView+SDAutoTableViewCellHeight.m in Sources */,
......@@ -2613,6 +2709,7 @@
6CB139112C12DEAF00544383 /* DXAddBannerVC.m in Sources */,
88D3238A2A177CDC00334372 /* XHRegistSecondView.m in Sources */,
88DA475E2AE39D9200313BB8 /* XHDr03View.m in Sources */,
39D57E8C2DD5C84C00FACDD5 /* DXDRPlusMoel.m in Sources */,
39E082762BB3BCEF00786B9D /* DXRDSmartRec.m in Sources */,
88D3238B2A177CDC00334372 /* XHCustomTabBarController.m in Sources */,
88D3238C2A177CDC00334372 /* UIViewExt.m in Sources */,
......@@ -2635,8 +2732,11 @@
88D3239E2A177CDC00334372 /* XHCommonMethods.m in Sources */,
88D3239F2A177CDC00334372 /* UIButton+HJButton.m in Sources */,
88D323A02A177CDC00334372 /* HJScanView.m in Sources */,
39D57E942DDADDB000FACDD5 /* DXDRPlusTipsView.m in Sources */,
88D323A22A177CDC00334372 /* XHSelectDeviceModel.m in Sources */,
88D323A32A177CDC00334372 /* XHLableFontOrSize.m in Sources */,
39D57E752DD445C400FACDD5 /* DXDRPlusVC.m in Sources */,
39D57E992DDADDDB00FACDD5 /* DXDRPlusCustomeView.m in Sources */,
6CAFE73C2AFB76E500C929A7 /* DXHFXVideoModel.m in Sources */,
88D323A42A177CDC00334372 /* UIImage+HJImageExtension.m in Sources */,
88D323A52A177CDC00334372 /* XHDeviceListModel.m in Sources */,
......@@ -2677,6 +2777,7 @@
88D323C52A177CDC00334372 /* XHDeviceListCell.m in Sources */,
6CB327E12AEFA1A600ABAEC3 /* DXHFXView.m in Sources */,
88D323C62A177CDC00334372 /* XHMineSetNicNameVC.m in Sources */,
39D57E832DD5BB6F00FACDD5 /* DXDRPlusSelectView.m in Sources */,
88D323C72A177CDC00334372 /* main.m in Sources */,
88D323C82A177CDC00334372 /* XHCollectCellModel.m in Sources */,
88D323C92A177CDC00334372 /* ZXSegmentHeaderCell.m in Sources */,
......@@ -2695,6 +2796,7 @@
88D323D72A177CDC00334372 /* HJVerifyView.m in Sources */,
88D323D82A177CDC00334372 /* XHSelectDeviceVC.m in Sources */,
88D323D92A177CDC00334372 /* XHParentView.m in Sources */,
39D57E9E2DDADDEB00FACDD5 /* DXDRPlusSmartView.m in Sources */,
88D323DA2A177CDC00334372 /* XHDeviceValidModel.m in Sources */,
88D323DB2A177CDC00334372 /* HJScanVC.m in Sources */,
88D323DC2A177CDC00334372 /* UITableView+SDAutoTableViewCellHeight.m in Sources */,
......@@ -2762,6 +2864,7 @@
6CB139102C12DEAF00544383 /* DXAddBannerVC.m in Sources */,
88EE69692A04D3C900C37EE2 /* XHCountDownButton.m in Sources */,
88EE696A2A04D3C900C37EE2 /* XHMineSetSexVC.m in Sources */,
39D57E8D2DD5C84C00FACDD5 /* DXDRPlusMoel.m in Sources */,
39E082772BB3BCF000786B9D /* DXRDSmartRec.m in Sources */,
88EE696B2A04D3C900C37EE2 /* XHTabBar.m in Sources */,
88EE696C2A04D3C900C37EE2 /* UIView+SDAutoLayout.m in Sources */,
......@@ -2784,8 +2887,11 @@
88EE697D2A04D3C900C37EE2 /* XHRegistFirstVC.m in Sources */,
88EE697E2A04D3C900C37EE2 /* XHHelper.m in Sources */,
88EE69802A04D3C900C37EE2 /* XHCustomerDataModel.m in Sources */,
39D57E912DDADDB000FACDD5 /* DXDRPlusTipsView.m in Sources */,
88EE69812A04D3C900C37EE2 /* XHSportLineView.m in Sources */,
88EE69822A04D3C900C37EE2 /* XHtextfieldInputAlterView.m in Sources */,
39D57E772DD445C400FACDD5 /* DXDRPlusVC.m in Sources */,
39D57E9A2DDADDDB00FACDD5 /* DXDRPlusCustomeView.m in Sources */,
6CAFE73B2AFB76E400C929A7 /* DXHFXVideoModel.m in Sources */,
88EE69832A04D3C900C37EE2 /* XHNsstringTool.m in Sources */,
88EE69842A04D3C900C37EE2 /* HJTools.m in Sources */,
......@@ -2826,6 +2932,7 @@
88EE69A02A04D3C900C37EE2 /* XHMineViewCell.m in Sources */,
6CB327E02AEFA1A600ABAEC3 /* DXHFXView.m in Sources */,
88EE69A12A04D3C900C37EE2 /* NSString+HJCRC16Modbus.m in Sources */,
39D57E812DD5BB6F00FACDD5 /* DXDRPlusSelectView.m in Sources */,
88EE69A22A04D3C900C37EE2 /* XHSelectCommandModelView.m in Sources */,
88EE69A32A04D3C900C37EE2 /* XHMineSetSexView.m in Sources */,
88EE69A42A04D3C900C37EE2 /* XHMineViewModel.m in Sources */,
......@@ -2844,6 +2951,7 @@
88EE69B12A04D3C900C37EE2 /* XHUINavigationController.m in Sources */,
88EE69B22A04D3C900C37EE2 /* HJTipsMessageView.m in Sources */,
88EE69B32A04D3C900C37EE2 /* AppDelegate+XHAppService.m in Sources */,
39D57EA02DDADDEB00FACDD5 /* DXDRPlusSmartView.m in Sources */,
88EE69B42A04D3C900C37EE2 /* HJVerifyView.m in Sources */,
88EE69B52A04D3C900C37EE2 /* XHSelectDeviceVC.m in Sources */,
88EE69B62A04D3C900C37EE2 /* XHParentView.m in Sources */,
......@@ -2911,6 +3019,7 @@
6CB1390E2C12DEAF00544383 /* DXAddBannerVC.m in Sources */,
884E462D29A600B600A58A9A /* UIViewExt.m in Sources */,
88CAA09929B87D6300825EDC /* XHDatePickerView.m in Sources */,
39D57E8B2DD5C84C00FACDD5 /* DXDRPlusMoel.m in Sources */,
88E7FC3E29B32B3B00F8585F /* HJAlertView.m in Sources */,
88E90C9129A6FC5F009FAB0E /* XHSetHomeCell.m in Sources */,
88CAA09C29B87EC300825EDC /* XHRegistThirdVC.m in Sources */,
......@@ -2933,8 +3042,11 @@
88DA47542AE39D9200313BB8 /* XHDr03VC.m in Sources */,
884E461329A600B600A58A9A /* XHLableFontOrSize.m in Sources */,
88E7FC4429B335CB00F8585F /* UIImage+HJImageExtension.m in Sources */,
39D57E922DDADDB000FACDD5 /* DXDRPlusTipsView.m in Sources */,
88E8439429B9A63700263DB0 /* XHDeviceListModel.m in Sources */,
6CAFE7392AFB76E400C929A7 /* DXHFXVideoModel.m in Sources */,
39D57E782DD445C400FACDD5 /* DXDRPlusVC.m in Sources */,
39D57E982DDADDDB00FACDD5 /* DXDRPlusCustomeView.m in Sources */,
88CAA07329B85A8D00825EDC /* XHMSCodeLoginVC.m in Sources */,
884E460829A600B600A58A9A /* XLCircle.m in Sources */,
884E460129A600B600A58A9A /* ZXSegmentController.m in Sources */,
......@@ -2975,6 +3087,7 @@
6CB327DE2AEFA1A600ABAEC3 /* DXHFXView.m in Sources */,
88F07F2329C1CB4700B2EBE6 /* XHMineSetNicNameVC.m in Sources */,
88EF4FC6298BA4E4009835BF /* main.m in Sources */,
39D57E822DD5BB6F00FACDD5 /* DXDRPlusSelectView.m in Sources */,
88D115F129B5D3ED009445EE /* XHCollectCellModel.m in Sources */,
884E460029A600B600A58A9A /* ZXSegmentHeaderCell.m in Sources */,
88314F952A0A168A0025FDDE /* XHCustomSetTimes.m in Sources */,
......@@ -2993,6 +3106,7 @@
88E90C9B29A6FE3B009FAB0E /* XHSelectDeviceVC.m in Sources */,
88E90C8229A6FB41009FAB0E /* XHParentView.m in Sources */,
88F07F0E29C1921900B2EBE6 /* XHDeviceValidModel.m in Sources */,
39D57E9D2DDADDEB00FACDD5 /* DXDRPlusSmartView.m in Sources */,
88E7FC3229B3286C00F8585F /* HJScanVC.m in Sources */,
884E460B29A600B600A58A9A /* UITableView+SDAutoTableViewCellHeight.m in Sources */,
39E50A9E2BA81F8900D48C7D /* DXHotElectricVC.m in Sources */,
......@@ -3265,7 +3379,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImageDR;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8Z4G7AGK6D;
GCC_PREFIX_HEADER = "$(SRCROOT)/DJMHomeTY/Global/Define/PrefixHeader.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
......@@ -3290,7 +3404,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.0.7;
PRODUCT_BUNDLE_IDENTIFIER = djm.imoreme.com.DJMHomeDR;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
......@@ -3310,7 +3424,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImageDR;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8Z4G7AGK6D;
GCC_PREFIX_HEADER = "$(SRCROOT)/DJMHomeTY/Global/Define/PrefixHeader.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
......@@ -3335,7 +3449,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.2;
MARKETING_VERSION = 1.0.7;
PRODUCT_BUNDLE_IDENTIFIER = djm.imoreme.com.DJMHomeDR;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr01_stop@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr01_stop@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "DR_02_D_add@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "DR_02_D_add@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "DR_02_D_add_dis@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "DR_02_D_add_dis@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "DR_02_D_lit@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "DR_02_D_lit@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "DR_02_D_lit_dis@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "DR_02_D_lit_dis@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "bpnl_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "bpnl_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "bpnl_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "bpnl_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ccms_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ccms_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ccms_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ccms_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "csqj_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "csqj_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "csqj_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "csqj_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02BMain1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02BMain1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02_d_startc@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02_d_startc@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02_d_tipsmodel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02_d_tipsmodel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02_d_tipsmodel1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02_d_tipsmodel1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02d_cus_20m@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02d_cus_20m@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02d_cus_3m@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02d_cus_3m@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02d_diselect@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02d_diselect@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02d_header@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02d_header@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02d_select@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02d_select@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr02dcustop@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr02dcustop@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_new_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_new_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_nlbj@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_nlbj@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_nlxz@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_nlxz@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_qr@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_qr@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_qr_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_qr_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_ysj@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_ysj@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_zb@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_zb@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_zc@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_zc@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_d_zc_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_d_zc_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dr_02_segment@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dr_02_segment@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "drpicon01_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "drpicon01_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "drpicon01_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "drpicon01_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dwfb_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dwfb_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dwfb_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dwfb_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fbam_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fbam_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fbam_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fbam_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "hfcs_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "hfcs_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "hfcs_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "hfcs_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "jycy_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "jycy_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "jycy_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "jycy_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "jyfs_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "jyfs_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "jyfs_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "jyfs_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_dw@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_dw@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_dw_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_dw_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_dw_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_dw_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_gj@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_gj@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_lk_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_lk_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_lk_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_lk_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_mb_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_mb_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_mb_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_mb_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_nh_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_nh_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_nh_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_nh_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_sc_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_sc_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_sc_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_sc_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_sh_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_sh_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_sh_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_sh_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_st_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_st_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_st_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_st_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_sx@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_sx@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_yb_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_yb_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "k9_yb_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "k9_yb_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "lkgd_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "lkgd_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "lkgd_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "lkgd_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mjks_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mjks_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mjks_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mjks_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "phsy_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "phsy_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "phsy_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "phsy_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pysz_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pysz_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pysz_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pysz_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "stsx_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "stsx_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "stsx_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "stsx_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "thms_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "thms_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "thms_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "thms_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "yqcs_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "yqcs_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "yqcs_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "yqcs_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ywcs_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ywcs_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ywcs_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ywcs_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "zdyms_nol@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "zdyms_nol@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "zdyms_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "zdyms_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "组 22.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "组 22@2x.png",
"filename" : "Dr02BListImg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 22@3x.png",
"filename" : "Dr02BListImg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -62,10 +62,11 @@ typedef NS_ENUM(NSInteger, TipsTag)
/// 总剩余时间
@property (nonatomic,assign) NSInteger remaintime;
@property (nonatomic,assign) BOOL isBackground;//是否退到后台
/// 剩余启动次数
@property (nonatomic,assign) NSInteger availNumber;
/// 提示框
@property (nonatomic,strong) HJTipsView *tipsView;
@property (nonatomic,assign) NSInteger type;//:0 次数管控 1 有效期管控
@property (nonatomic,strong) ZJAnimationPopView *zjPopView;
@property (nonatomic,assign) NSInteger tipsViewIndex;
......
......@@ -457,9 +457,10 @@
[[XHHttpRequestManager shareManager] postHttpRequestURL:VerifyURL isJson:true parameters:updateDic success:^(id responseObject) {
// weakSelf.tabbarVC.tabBarView.hidden = NO;
weakSelf.dataModel = [HJDataModel mj_objectWithKeyValues:responseObject[@"data"]];
if ([responseObject[@"data"][@"orderMap"] isEqual:[NSNull null]]) {
NSLog(@"不管控");
// weakSelf.remaintime = 10;
weakSelf.remaintime = [[self defaultTime] integerValue];//
weakSelf.verificationNum = @"";
}else{
......@@ -482,6 +483,7 @@
}else{
messages = [NSString stringWithFormat:@"%@",failMessage[@"msg"]];
}
if (messages.intValue == 13001 || messages.intValue == 13002) {
weakSelf.isVerifySucceed = NO;
}else {
......@@ -510,26 +512,47 @@
{
// @try {
HJSelfWeak;
[SVProgressHUD show];
[[XHHttpRequestManager shareManager] postHttpRequestURL1:GetConLimitNumURL isJson:true parameters:@{@"deviceid":XHGetDataManager.deviceID} success:^(id responseObject) {
NSLog(@"1responseObjectresponseObjectresponseObject:%@",responseObject);
if([XHCommonMethods isEmptyOrNull:[NSString stringWithFormat:@"%@",responseObject[@"data"][@"availNumber"]]]){
GetUseTimessuccesedBlock(false);
[SVProgressHUD dismiss];
}else{
if([responseObject[@"data"][@"availNumber"] integerValue] >0){
weakSelf.dataModel.orderMap.remaintime = responseObject[@"data"][@"remaintime"];
weakSelf.remaintime = [responseObject[@"data"][@"remaintime"] integerValue];
// weakSelf.remaintime = 10;
weakSelf.verificationNum = responseObject[@"data"][@"consumableNumber"];
weakSelf.availNumber = [responseObject[@"data"][@"availNumber"] integerValue];
weakSelf.type = [responseObject[@"data"][@"type"] integerValue];
weakSelf.isVerifySucceed = YES;
GetUseTimessuccesedBlock(true);
[SVProgressHUD dismiss];
}else{
GetUseTimessuccesedBlock(false);
[SVProgressHUD dismiss];
}
}
} fail:^(id failMessage) {
NSInteger code = [failMessage[@"code"] integerValue];
if (code == 12025 || code == 12027) {
weakSelf.availNumber = 0;
weakSelf.type = 2;
// if (self.type == 0) {
//
// }else{
// weakSelf.type = 2;
// }
}
GetUseTimessuccesedBlock(false);
[SVProgressHUD dismiss];
} networkRequestsFail:^(id networkFail) {
GetUseTimessuccesedBlock(false);
[SVProgressHUD dismiss];
}];
// } @catch (NSException *exception) {
// NSLog(@"=-=-=:%@",exception);
......
......@@ -177,8 +177,8 @@
#define DR04_HFX_send_start @"06000B31020201"//发送开始
#define DR04_HFX_send_stop @"06000B31020200"//发送暂停
#define DR04_HFX_send_oldmode @"05000B310203"//发送老化
#define DR04_HFX_send_UVOpen @"06000B31020501"//发送UV开灯
#define DR04_HFX_send_UVClose @"06000B31020500"//发送UV关灯
#define DR04_HFX_send_UVOpen @"06000B31020501"//发送UV开灯06 00 0B 31 02 05 01
#define DR04_HFX_send_UVClose @"06000B31020500"//发送UV关灯06 00 0B 31 02 05 00
#define DR04_HFX_send_Upgrades @"05000B3102AA"//发送升级
#define DR04_HFX_send_xdMode @"06000B31021101"//发送消毒模式
#define DR04_HFX_send_hlMode @"06000B31021102"//发送护理模式
......@@ -220,4 +220,42 @@
#define DR05_HE_send_UpdateVersion @"0500613102aa"//升级
#define DR05_HE_send_WaveForm @"0600a6310203"//波形
#pragma =--=-==-=-DR02_D==-=-=--==-=-=-=-
#define DR_02_D_send_PowerOff @"05000B310201" // 发送关机
#define DR_02_D_send_UltrasoundRun @"06000B31020201" // 超声运行
#define DR_02_D_send_UltrasoundStop @"06000B31020200" // 超声暂停
#define DR_02_D_send_AgingMode @"05000B310203" // 进入老化模式
#define DR_02_D_send_DisinfectRun @"06000B31020501" // 消毒运行
#define DR_02_D_send_DisinfectStop @"06000B31020500" // 消毒停止
#define DR_02_D_send_Upgrade @"05000B3102AA" // 固件升级指令
#define DR_02_D_send_SetHandleParam @"0B000B310211" // 手柄参数设定(需拼接动态参数)
#define DR_02_D_send_Set3MFreq @"09000B310212" // 3M频率设置(需拼接动态参数)
#define DR_02_D_send_Set10MFreq @"09000B310213" // 10M频率设置(需拼接动态参数)
#define DR_02_D_send_Set20MFreq @"09000B310216" // 20M频率设置(需拼接动态参数)
#define DR_02_D_send_AddEnergy @"05000B330250" // 能量增加按键
#define DR_02_D_send_SubEnergy @"05000B330251" // 能量减小按键
#define DR_02_D_send_GetVersion @"05000B330253" // 获取软件版本
#define DR_02_D_send_GetDeviceID @"05000B330254" // 获取设备ID
#define DR_02_D_send_GetHandleFreq @"05000B330255" // 获取手柄频率
#define DR_02_D_send_GetDisinfect @"05000B330256" // 查询消毒状态
#define DR_02_D_send_Select3And10M @"06000B31021701" // 选择3&10M模式
#define DR_02_D_send_Select20M @"06000B31021702" // 选择20M模式
#define DR_02_D_recv_EnergyIncrease @"05000B330150" // 能量增加按键按下(设备通知,需APP判断后下发参数)
#define DR_02_D_recv_EnergyDecrease @"05000B330151" // 能量减小按键按下(设备通知,需APP判断后下发参数)
#define DR_02_D_recv_ShotPress @"05000B330149" // 开始键短按
#define DR_02_D_recv_HandleSequenceError @"07000B3301520101" // 手柄顺序错误(需弹窗提醒)
#define DR_02_D_recv_HandleStop @"06000B31010200" // 收到设备上报暂停
#define DR_02_D_recv_HandleStart @"06000B31010201" // 收到设备上报开始
#endif /* XHCommand_h */
......@@ -143,12 +143,13 @@ static NSString *const HJNotificationDisconnect = @"NotificationDisconnect";
//面龄医生-Dr faciage
#define DrDeviceFacialName @"Dr-01"//@"DEF01-1"Dr-01
#define DrDeviceDr03Name @"Dr-03"//@Dr-03
#define DrDeviceDr02BName @"Dr-02-B"//@Dr-03
#define DrDeviceDr02BName @"K9"//@Dr-03
//Dr水滴-面龄医生Dr
#define Dr02DeviceName @"Dr-02"//10档
#define Dr021DeviceName @"Dr-02-1"//4档
#define Dr022DeviceName @"Dr-02-2"//4档
#define Dr02DDeviceName @"Dr-02-D"//4档
#define Dr04DeviceName @"Dr-04"
#define Dr041DeviceName @"Dr-04-1"
#define Dr05DeviceName @"Dr-05"
......
......@@ -12,6 +12,7 @@
#define DRURL @"https://djm.imoreme.com"//正式
//#define DRURL @"http://192.168.1.168:8080"//luocong
//#define URL @"http://192.168.1.66:9012"//luocong
//#define DRURL @"http://192.168.3.13:8080"//luocong
/** 发送验证码 **/
#define VerifyCodeURL [NSString stringWithFormat:@"%@%@",DRURL,@"/ldm/api/getVerifyCode"]
......
......@@ -28,4 +28,9 @@
+ (BOOL)checkTel:(NSString *)str;
/**利用正则表达式验证邮箱*/
+ (BOOL)checkEmail:(NSString *)email;
// 读取本地JSON文件
+ (NSDictionary *)readLocalFileWithName:(NSString *)name;
@end
......@@ -230,4 +230,14 @@
return NO;
}
// 读取本地JSON文件
+ (NSDictionary *)readLocalFileWithName:(NSString *)name {
// 获取文件路径
NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"json"];
// 将文件数据化
NSData *data = [[NSData alloc] initWithContentsOfFile:path];
// 对数据进行JSON格式化并返回字典形式
return [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
}
@end
......@@ -278,7 +278,7 @@ static HJBluetoothManager *sharedinstance = nil;
break;
case 5://DrWarter
{
self.DeviceArr = @[Dr02DeviceName,Dr04DeviceName,Dr041DeviceName,Dr05DeviceName];
self.DeviceArr = @[Dr02DeviceName,Dr04DeviceName,Dr041DeviceName,Dr05DeviceName,Dr02DDeviceName];
//,Dr021DeviceName
}
break;
......@@ -305,7 +305,22 @@ static HJBluetoothManager *sharedinstance = nil;
[_centralManager connectPeripheral:peripheral options:nil];
}
}else if (XHGetDataManager.machineIndex == 2) {
if ([advertisementData[@"kCBAdvDataLocalName"] isEqualToString:Dr05DeviceName]) {
if ([advertisementData[@"kCBAdvDataLocalName"] isEqualToString:Dr02DDeviceName]) {
XHGetDataManager.deviceCode = advertisementData[@"kCBAdvDataLocalName"];
_servicePeripheral = peripheral;
[self stopScanning];
[self updateBleStatus:BluetoothStatusFoundPeripheral];
[_centralManager connectPeripheral:peripheral options:nil];
}
// if ([advertisementData[@"kCBAdvDataLocalName"] isEqualToString:Dr05DeviceName]) {
// XHGetDataManager.deviceCode = advertisementData[@"kCBAdvDataLocalName"];
// _servicePeripheral = peripheral;
// [self stopScanning];
// [self updateBleStatus:BluetoothStatusFoundPeripheral];
// [_centralManager connectPeripheral:peripheral options:nil];
// }
}else if (XHGetDataManager.machineIndex == 3){
if ([advertisementData[@"kCBAdvDataLocalName"] isEqualToString:Dr02DDeviceName]) {
XHGetDataManager.deviceCode = advertisementData[@"kCBAdvDataLocalName"];
_servicePeripheral = peripheral;
[self stopScanning];
......
......@@ -14,7 +14,8 @@ typedef NS_ENUM(NSInteger, BtnTag)
D3BtnTag = 10,
DM1BtnTag,
DR04BtnTag,
DR05BtnTag,
// DR05BtnTag,
DR02DBtnTag,
MRQ1HBtnTag,
DWF08BtnTag,
D3CopyBtnTag,
......
//
// DXDRPlusVC.h
// DJMHomeTY
//
// Created by nana on 2025/5/14.
//
#import "XHParentVC.h"
NS_ASSUME_NONNULL_BEGIN
@interface DXDRPlusVC : XHParentVC
@end
NS_ASSUME_NONNULL_END
//
// DXDRPlusVC.m
// DJMHomeTY
//
// Created by nana on 2025/5/14.
//
#import "DXDRPlusVC.h"
#import "DXDRPlusSelectView.h"
#import "DXDRPlusTipsView.h"
#import "DXDRPlusCustomeView.h"
#import "DXDRPlusSmartView.h"
@interface DXDRPlusVC ()<DXDRPlusSelectViewDelegate,DXDRPlusTipsViewDelegate,BluetoothDelegate,DXDRPlusCustomeViewDelegate,DXDRPlusSmartViewDelegate>
@property (nonatomic, strong) DXDRPlusSelectView *selectView;
@property (nonatomic, strong) DXDRPlusSubModel *currentModel;
@property (nonatomic, strong) DXDRPlusTipsView *plusTipsView;
@property (nonatomic, strong) DXDRPlusCustomeView *customeView;
@property (nonatomic, strong) DXDRPlusSmartView *smartView;
@property (nonatomic, assign) NSInteger current3MStress;
@property (nonatomic, assign) NSInteger current10MStress;
@property (nonatomic, assign) NSInteger current20MStress;
/// 计时器
@property (nonatomic,strong) NSTimer *timer;
/// 总时间
@property (nonatomic,assign) NSInteger totalTime;
/// 第一步时间
@property (nonatomic,assign) NSInteger step1Time;
//操作记录id
@property (nonatomic,strong) NSString *guestureId;
@property (nonatomic,assign) BOOL BLEConnect;//当前蓝牙是否连接上
@property (nonatomic,strong) DXHFXVideoModel *videoListModel;
@property (nonatomic,copy) NSString *deviceid;
@property (nonatomic, assign) NSInteger currentState;
@property (nonatomic, assign) BOOL isChangeHandle;
@property (nonatomic, assign) BOOL isLit;
@end
@implementation DXDRPlusVC
#pragma mark --系统方法
- (void)viewDidLoad {
[super viewDidLoad];
[HJGetBluetoothManager startScaning];
[self addNotification];
[self initData];
[self initUI];
[self requestVideoList];
}
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[HJGetBluetoothManager.delegate addBluetoothDelegate:self];
if([HJUserDefaults objectForKey:@"videoVolumeIsOn"]){
NSString *videoVolumeIsOn = [HJUserDefaults objectForKey:@"videoVolumeIsOn"];
if([videoVolumeIsOn isEqualToString:@"1"]){
self.plusTipsView.volumeBtn.selected = YES;
self.plusTipsView.playerView.currentPlayerManager.muted = NO;
self.smartView.volumeBtn.selected = YES;
self.smartView.playerView.currentPlayerManager.muted = NO;
}else{
self.plusTipsView.volumeBtn.selected = NO;
self.plusTipsView.playerView.currentPlayerManager.muted = YES;
self.smartView.volumeBtn.selected = NO;
self.smartView.playerView.currentPlayerManager.muted = YES;
}
}else{
self.plusTipsView.volumeBtn.selected = NO;
self.plusTipsView.playerView.currentPlayerManager.muted = YES;
self.smartView.volumeBtn.selected = NO;
self.smartView.playerView.currentPlayerManager.muted = YES;
}
}
-(void)dealloc {
//防止重复
HJGetBluetoothManager.noReconnect = true;
[HJGetBluetoothManager stopScanning];
[HJGetBluetoothManager stopConnect];
[HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
}
#pragma mark --初始化UI
- (void)initUI
{
// self.navigationController.navigationBar.hidden = YES;
self.smartView = [DXDRPlusSmartView new];
self.smartView.delegate = self;
[self.view addSubview:self.smartView];
[self.smartView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.equalTo(self.view).offset(HJNavHeight);
}];
self.customeView = [DXDRPlusCustomeView new];
self.customeView.delegate = self;
self.customeView.hidden = YES;
[self.view addSubview:self.customeView];
[self.customeView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.equalTo(self.view).offset(HJNavHeight +20);
}];
self.plusTipsView = [DXDRPlusTipsView new];
self.plusTipsView.delegate = self;
[self.view addSubview:_plusTipsView];
[self.plusTipsView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.equalTo(self.view).offset(HJNavHeight);
}];
self.selectView = [DXDRPlusSelectView new];
self.selectView.delegate = self;
[self.view addSubview:self.selectView];
[self.selectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.equalTo(@-90);
}];
}
#pragma mark --初始化数据
- (void)initData
{
self.current3MStress = 0;
self.current10MStress = 0;
self.current20MStress = 0;
self.currentState = 0;
self.isChangeHandle = 0;
self.isLit = 0;
}
#pragma mark --网络请求
- (void)requestData
{
}
- (void)requestVideoList{
HJSelfWeak;
NSMutableDictionary *paramsDic = [NSMutableDictionary dictionary];
[paramsDic setObject:@"0" forKey:@"type"];
if (XHGetDataManager.deviceCode) {
[paramsDic setObject:XHGetDataManager.deviceCode?XHGetDataManager.deviceCode:@"" forKey:@"deviceCode"];//A03C31B4DF95
}
// [paramsDic setObject:@"A03C31B4DF95" forKey:@"deviceCode"];
[[XHHttpRequestManager shareManager] getHttpRequestURL:HFXGetVideoList isJson:NO parameters:paramsDic success:^(id responseObject) {
[SVProgressHUD dismiss];
NSLog(@"responseObject:\n%@===%@",responseObject,responseObject[@"msg"]);
weakSelf.videoListModel = [DXHFXVideoModel mj_objectWithKeyValues:responseObject[@"data"]];
NSLog(@"%@",weakSelf.videoListModel);
} fail:^(id failMessage) {
}networkRequestsFail:^(id networkFail) {
}];
}
#pragma mark --交互方法
//- (void)setIsBack:(BOOL)isBack{
// [self.navigationController popViewControllerAnimated:YES];
//}
#pragma mark notification_Method
-(void)addNotification{
//断开连接
[HJNotificationCenter addObserver:self selector:@selector(disconnect) name:HJNotificationDisconnect object:nil];
//连接成功
[HJNotificationCenter addObserver:self selector:@selector(connect) name:HJNotificationConnect object:nil];
/// 前台
[HJNotificationCenter addObserver:self selector:@selector(appWillEnterForeground) name:HJAPPWillEnterForeground object:nil];
/// 后台
[HJNotificationCenter addObserver:self selector:@selector(appDidEnterBackground) name:HJAPPDidEnterBackground object:nil];
}
//#pragma mark ======= 前台 =======
-(void)appWillEnterForeground{
// self.isBackground = false;
}
#pragma mark ======= 切换到后台 =======
-(void)appDidEnterBackground{
// self.isBackground = true;
if(self.guestureId){
[self saveLocationRecord];
}
if(self.isStart){
[self stopDr02DAction];//暂停
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
}
}
#pragma mark ----------断开连接----------
-(void)disconnect{
if(self.totalTime > 0){
if((XHGetDataManager.deviceID || self.deviceid) && self.guestureId){
[self saveLocationRecord];
}
}
HJSelfWeak;
[SVProgressHUD showSuccessWithStatus:HJLocalizedString(@"断开连接")];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
dispatch_async(dispatch_get_main_queue(), ^{
// weakSelf.myNoconnectView.hidden = false;
[weakSelf setNavState:true];
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
[weakSelf stopDr02DAction];
weakSelf.BLEConnect = false;
weakSelf.isConnected = false;
weakSelf.isStart = false;
});
HJGetBluetoothManager.noReconnect = false;
}
#pragma mark ----------连接成功----------
-(void)connect{
if ([self.currentModel.class_type integerValue] == 16) {
//初始化档位
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@00%@00%@00%@",DR_02_D_send_SetHandleParam,[NSString ToLongHex:self.current3MStress withLength:2],[NSString ToLongHex:self.current10MStress withLength:2],[NSString ToLongHex:self.current20MStress withLength:2]] withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.02 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager writeStr:[DR_02_D_send_Select3And10M withCrc16Modbus]];
});
}else{
if ([self.currentModel.pre_parameters.stress20M integerValue] != 0) {
[HJGetBluetoothManager writeStr:[DR_02_D_send_Select20M withCrc16Modbus]];
}else{
[HJGetBluetoothManager writeStr:[DR_02_D_send_Select3And10M withCrc16Modbus]];
}
if (self.current3MStress != 0 || self.current10MStress != 0 ||self.current20MStress != 0 ) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.02 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.current20MStress == 0) {
[self deviceControlWithTag:ItemChange10M];
}else{
[self deviceControlWithTag:ItemChange20M];
}
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.04 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.isLit) {
[self changeLitStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}else{
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
});
}
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//获取UV灯状态
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_getUVState] withCrc16Modbus]];
});
self.deviceid = XHGetDataManager.deviceID.copy;
self.BLEConnect = true;
self.isConnected = true;
//
// if ([XHGetDataManager.deviceCode isEqualToString:@"Dr-04"]) {
// self.isStrengthen = NO;
// self.myView.is041 = NO;
// }else if ([XHGetDataManager.deviceCode isEqualToString:@"Dr-04-1"]){
// self.isStrengthen = YES;
// self.myView.is041 = YES;
// }else{
// self.isStrengthen = NO;
// self.myView.is041 = NO;
// }
//
//
// if (XHGetDataManager.deviceCode) {
// if (self.isStrengthen) {
// self.xdtotalTime = 50;
//
// }else {
// self.xdtotalTime = 25;
// }
// [self requestData];
// }
//
// if(self.totalTime<=0){
// [self getUseTimes:^(BOOL getTimesSuccessful) {
//
// }];
// }
//// [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_getVersion] withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.00 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//获取固件版本
// [self showUploadAlert];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR_02_D_send_GetVersion] withCrc16Modbus]];
});
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.02 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// //获取档位
// [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_getEnergy] withCrc16Modbus]];
// });
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.04 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// //获取UV灯状态
// [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_getUVState] withCrc16Modbus]];
// });
// [self requestVideoList];
}
#pragma mark ======= ble收到命令 =======
- (void)didUpdateValueForCharacteristicValue:(NSString *)value{
HJSelfWeak;
NSLog(@"valuevaluevaluevaluevalue:%@",value);
NSString *str = [value uppercaseString];
if(HJStringNSNotFound(str,DR_02_D_recv_EnergyIncrease)){//能量加
if ([self.currentModel.class_type integerValue] == 16) {
if (self.currentState == 0) {
[self deviceControlWithTag:Item3MADD];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.04 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self deviceControlWithTag:Item10MADD];
});
}else{
[self deviceControlWithTag:Item20MADD];
}
}
}else if (HJStringNSNotFound(value, DR_02_D_recv_EnergyDecrease)){//能量减
if ([self.currentModel.class_type integerValue] == 16) {
if (self.currentState == 0) {
[self deviceControlWithTag:Item3MDEC];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.04 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self deviceControlWithTag:Item10MDEC];
});
}else{
[self deviceControlWithTag:Item20MDEC];
}
}
}else if (HJStringNSNotFound(value, DR04_HFX_get_Version)){//固件版本
//版本号
NSInteger versions = strtoul([[value substringWithRange:NSMakeRange(16, 1)] UTF8String],0,16);
NSInteger versions1 = strtoul([[value substringWithRange:NSMakeRange(17, 1)] UTF8String],0,16);
XHGetDataManager.machineVersion = [NSString stringWithFormat:@"V%ld.%ld",versions,versions1];
NSLog(@"XHGetDataManager.machineVersion:%@",XHGetDataManager.machineVersion);
// if(!self.isChecked){
// [self checkDeviceVersionWithResult:^(BOOL isUpdate) {
//
// } binUrl:^(NSString *url) {
//
// }];
// }
//绑定仪器
[self bindMyDevice];
}else if (HJStringNSNotFound(value, DR_02_D_recv_HandleSequenceError)){//手柄顺序错误
[SVProgressHUD showErrorWithStatus:@"手柄顺序错误"];
}else if(HJStringNSNotFound(value,DR04_HFX_get_UVState)){//UV灯状态
NSInteger uvstate = strtoul([[value substringWithRange:NSMakeRange(17, 1)] UTF8String],0,16);
if(uvstate == 1){
self.customeView.uvBtn.selected = YES;
self.smartView.uvBtn.selected = YES;
}else{
self.customeView.uvBtn.selected = NO;
self.smartView.uvBtn.selected = NO;
}
}else if(HJStringNSNotFound(value,DR04_HFX_get_UVNewState)){//UV灯状态
NSInteger uvstate = strtoul([[value substringWithRange:NSMakeRange(17, 1)] UTF8String],0,16);
if(uvstate == 1){
self.customeView.uvBtn.selected = YES;
self.smartView.uvBtn.selected = YES;
}else{
self.customeView.uvBtn.selected = NO;
self.smartView.uvBtn.selected = NO;
}
}else if (HJStringNSNotFound(value,DR_02_D_recv_ShotPress)){
if (self.totalTime > 0) {
if ([self.currentModel.class_type integerValue] == 16) {
[self deviceControlWithTag:ItemstartOrstop];
}else{
[self deviceSmartControlWithTag:SmartstartOrstop];
}
}
}else if (HJStringNSNotFound(value,DR04_HFX_get_DeviceEnergy)){
// NSInteger energy = strtoul([[value substringWithRange:NSMakeRange(17, 1)] UTF8String],0,16);
// self.currentStress = energy;
// self.myView.currentStress = [NSString stringWithFormat:@"%ld",self.currentStress];
}else if (HJStringNSNotFound(value,DR_02_D_recv_HandleStop)){//短按
// [self stopDr02DAction];
}else if (HJStringNSNotFound(value,DR_02_D_recv_HandleStart)){//短按
// [self startAction];
}
// [self updateDeviceWithValue:value];
}
//状态
-(void)didUpdateBluetoothStatus:(BluetoothStatus)status{
HJSelfWeak;
switch (status)
{
// 连接成功
case BluetoothStatusPoweredOff:
{
[SVProgressHUD showErrorWithStatus:HJLocalizedString(@"手机未开启蓝牙,请开启蓝牙重试!")];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
}
break;
// 连接成功
case BluetoothStatusConnectOk:
{
// dispatch_async(dispatch_get_main_queue(), ^{
// weakSelf.myNoconnectView.hidden = true;
// [weakSelf setNavState:true];
// });
[SVProgressHUD showSuccessWithStatus:HJLocalizedString(@"连接成功")];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
}
break;
case BluetoothGetDeviceIDSuccessed:
{
}
break;
case BluetoothStatusDisConnect:
{
HJGetBluetoothManager.noReconnect = false;
}
break;
default:
break;
}
}
#pragma mark --委托代理
- (void)changeStressWith3M:(NSInteger)threesize And10M:(NSInteger)tensize And20M:(NSInteger)ttsize{
NSInteger strees3;
NSInteger strees10;
NSInteger strees20;
if ([self.currentModel.class_type intValue] == 16) {
if (threesize == 1) {
strees3 = 3;
}else if (threesize == 0){
strees3 = 0;
}else{
strees3 = (threesize-1) * 5;
}
if (tensize == 1) {
strees10 = 3;
}else if (tensize == 0){
strees10 = 0;
}else{
strees10 = (tensize-1) * 5;
}
if (ttsize == 1) {
strees20 = 3;
}else if (ttsize == 0){
strees20 = 0;
}else{
strees20 = (ttsize-1) * 5;
}
}else{
if (threesize == 5) {
strees3 = 3;
}else{
strees3 = threesize * 5;
}
strees10 = tensize * 5;
strees20 = ttsize * 5;
}
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@00%@00%@00%@",DR_02_D_send_SetHandleParam,[NSString ToLongHex:strees3 withLength:2],[NSString ToLongHex:strees10 withLength:2],[NSString ToLongHex:strees20 withLength:2]] withCrc16Modbus]];
}
- (void)changeLitStressWith3M:(NSInteger)threesize And10M:(NSInteger)tensize And20M:(NSInteger)ttsize{
NSInteger strees3;
NSInteger strees10;
NSInteger strees20;
if (threesize == 5) {
strees3 = 1;
}else if (threesize == 0){
strees3 = 0;
}else if (threesize == 1){
strees3 = 3;
}else if (threesize == 2){
strees3 = 5;
}else if (threesize == 3){
strees3 = 8;
}else if (threesize == 4){
strees3 = 10;
}else{
strees3 = 0;
}
if (tensize == 0){
strees10 = 0;
}else if (tensize == 1){
strees10 = 3;
}else if (tensize == 2){
strees10 = 5;
}else if (tensize == 3){
strees10 = 8;
}else if (tensize == 4){
strees10 = 10;
}else{
strees10 = 0;
}
if (ttsize == 0){
strees20 = 0;
}else if (ttsize == 1){
strees20 = 3;
}else if (ttsize == 2){
strees20 = 5;
}else if (ttsize == 3){
strees20 = 8;
}else if (ttsize == 4){
strees20 = 10;
}else{
strees20 = 0;
}
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@00%@00%@00%@",DR_02_D_send_SetHandleParam,[NSString ToLongHex:strees3 withLength:2],[NSString ToLongHex:strees10 withLength:2],[NSString ToLongHex:strees20 withLength:2]] withCrc16Modbus]];
}
- (void)deviceControlWithTag:(Dr02DitemType)type{
if (!self.isConnected) {
[SVProgressHUD showInfoWithStatus:@"设备未连接"];
return;
}
switch (type) {
case Item3MDEC:{
if(self.current3MStress>0){
self.current3MStress--;
self.customeView.stressLb.text = [self showCustomStressWithLenth:self.current3MStress];
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
}
break;
case Item3MADD:{
if (self.current3MStress < 5) {
self.current3MStress++;
self.customeView.stressLb.text = [self showCustomStressWithLenth:self.current3MStress];
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
}
break;
case Item10MDEC:{
if(self.current10MStress>0){
self.current10MStress--;
self.customeView.speedStressLb.text = [self showCustomStressWithLenth:self.current10MStress];
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
}
break;
case Item10MADD:{
if (self.current10MStress < 5) {
self.current10MStress++;
self.customeView.speedStressLb.text = [self showCustomStressWithLenth:self.current10MStress];
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
}
break;
case Item20MDEC:{
if(self.current20MStress>0){
self.current20MStress--;
self.customeView.stress20Lb.text = [self showCustomStressWithLenth:self.current20MStress];
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
}
break;
case Item20MADD:{
if (self.current20MStress < 5) {
self.current20MStress++;
self.customeView.stress20Lb.text = [self showCustomStressWithLenth:self.current20MStress];
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
}
break;
case ItemstartOrstop:{
if ([self iSDeviceID]) {
if(self.totalTime>0){
if(self.customeView.startBtn.selected){//已经开始了
// 暂停
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
[self stopDr02DAction];
}else{//
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundRun withCrc16Modbus]];
[self startAction];
//
}
}else{
HJSelfWeak;
[self getUseTimes:^(BOOL getTimesSuccessful) {
HJSelfStrong;
if(getTimesSuccessful == false){
[strongSelf deviceValidTime];
}
}];
}
}
// if (!self.customeView.startBtn.selected) {
// self.customeView.startBtn.selected = true;
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundRun withCrc16Modbus]];
// }else{
// self.customeView.startBtn.selected = false;
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];
// }
}
break;
case ItemClearTime:{
[self clearDr02DRemainingTime];
}
break;
case ItemChange10M:{
self.currentState = 0;
[HJGetBluetoothManager writeStr:[DR_02_D_send_Select3And10M withCrc16Modbus]];
}
break;
case ItemChange20M:{
self.currentState = 1;
[HJGetBluetoothManager writeStr:[DR_02_D_send_Select20M withCrc16Modbus]];
}
break;
case Itemuvchange:{
if(!self.customeView.uvBtn.selected){
[HJGetBluetoothManager writeStr:[DR04_HFX_send_UVOpen withCrc16Modbus]];
}else{
[HJGetBluetoothManager writeStr:[DR04_HFX_send_UVClose withCrc16Modbus]];
}
}
break;
default:
break;
}
}
- (void)deviceSmartControlWithTag:(Dr02DsmartType)type{
if (!self.isConnected) {
[SVProgressHUD showInfoWithStatus:@"设备未连接"];
return;
}
switch (type) {
case SmartLit:{
self.isLit = 1;
[self changeLitStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
break;
case SmartNomal:{
self.isLit = 0;
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
break;
case SmartstartOrstop:{
if ([self iSDeviceID]) {
if(self.totalTime>0){
if(self.smartView.startBtn.selected){//已经开始了
// 暂停
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
[self stopDr02DAction];
}else{//
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundRun withCrc16Modbus]];
[self startAction];
//
}
}else{
HJSelfWeak;
[self getUseTimes:^(BOOL getTimesSuccessful) {
HJSelfStrong;
if(getTimesSuccessful == false){
[strongSelf deviceValidTime];
}
}];
}
}
}
break;
case SmartClearTime:{
[self clearDr02DRemainingTime];
}
break;
case Smartuvchange:{
if(!self.smartView.uvBtn.selected){
[HJGetBluetoothManager writeStr:[DR04_HFX_send_UVOpen withCrc16Modbus]];
}else{
[HJGetBluetoothManager writeStr:[DR04_HFX_send_UVClose withCrc16Modbus]];
}
}
break;
default:
break;
}
}
- (NSString *)showCustomStressWithLenth:(NSInteger)stress{
if (stress == 1) {
return @"0.5";
}else if (stress == 0) {
return @"0";
}
else{
return [NSString stringWithFormat:@"%ld",stress - 1];
}
}
- (void)touchNextStepWithModel:(DXDRPlusSubModel *)model{
self.currentModel = model;
self.plusTipsView.selectedModel = self.currentModel;
self.current3MStress = [self.currentModel.pre_parameters.stress3M integerValue];
self.current10MStress = [self.currentModel.pre_parameters.stress10M integerValue];
self.current20MStress = [self.currentModel.pre_parameters.stress20M integerValue];
self.plusTipsView.videoModel = self.videoListModel;
if (self.isConnected) {
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
if (self.current20MStress == 0) {
[self deviceControlWithTag:ItemChange10M];
}else{
[self deviceControlWithTag:ItemChange20M];
}
}
self.title = @"使用须知";
[UIView animateWithDuration:0.3 animations:^{
[self.selectView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view);
make.top.equalTo(self.view.mas_bottom);
}];
[self.view layoutIfNeeded];
} completion:^(BOOL finished) {
}];
}
- (void)clearDr02DRemainingTime{
if(self.isConnected){
if(self.totalTime > 0){
[self updateDr02DRecord];
HJAlertView *alertView = [[HJAlertView alloc] init];
alertView.parentView = [UIApplication sharedApplication].keyWindow;
alertView.title = HJLocalizedString(@"结束");
alertView.message = HJLocalizedString(@"护理时间未结束,确认结束?");
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:HJLocalizedString(@"取消"),HJLocalizedString(@"确定"), nil]];
[alertView show];
alertView.onButtonTouchUpInside = ^(HJAlertView * _Nonnull alertView, NSInteger buttonIndex) {
if(buttonIndex == 1){//退出
// self.istimeClean = YES;
[self stopDr02DAction];
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
// HJGetBluetoothManager.noReconnect = true;
// [HJGetBluetoothManager stopScanning];
// [HJGetBluetoothManager stopConnect];
// [HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
self.totalTime = 0;
self.customeView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
self.smartView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
// if([HJUserDefaults objectForKey:@"updateDictyDr04"]){
// NSMutableDictionary *dic = [NSMutableDictionary dictionary];
// [dic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDr04"]];
// [self upData:dic];
// }
// [self.myView.playerView stop];
[self.navigationController popViewControllerAnimated:YES];
}
[alertView close];
};
}else{
[SVProgressHUD showErrorWithStatus:HJLocalizedString(@"护理未开始")];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
}
}else{
[SVProgressHUD showErrorWithStatus:HJLocalizedString(@"仪器未连接")];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
}
}
- (void)startActionWithModel:(DXDRPlusSubModel *)model{
self.title = model.name;
[self.plusTipsView.playerView stop];
if ([model.class_type intValue] == 16) {
self.customeView.hidden = NO;
self.smartView.hidden = YES;
}else{
self.customeView.hidden = YES;
self.smartView.hidden = NO;
self.smartView.selectedModel = model;
self.smartView.videoModel = self.videoListModel;
}
[self updateSmartViewWithMode:model];
[UIView animateWithDuration:0.3 animations:^{
[self.plusTipsView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view);
make.top.equalTo(self.view.mas_bottom);
}];
[self.view layoutIfNeeded];
} completion:^(BOOL finished) {
}];
}
- (void)updateSmartViewWithMode:(DXDRPlusSubModel *)model{
if ([model.pre_parameters.stress20M intValue] != 0) {
self.smartView.step1DetilsLb.text = @"20M手柄";
self.smartView.step2DetilsLb.text = @"3M/10M手柄";
}else{
self.smartView.step1DetilsLb.text = @"3M/10M手柄";
self.smartView.step2DetilsLb.text = @"20M手柄";
}
if ([model.post_parameters.time integerValue] == 0) {
self.smartView.stepCenterLine.hidden = YES;
self.smartView.step2Lb.hidden = YES;
self.smartView.step2DetilsLb.hidden = YES;
}
}
-(void)stopDr02DAction{
HJSelfWeak;
[HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
dispatch_async(dispatch_get_main_queue(), ^{
weakSelf.customeView.startBtn.selected = false;
weakSelf.smartView.startBtn.selected = false;
});
self.isStart = false;
/// 暂停计时器
[self.timer invalidate];
self.timer=nil;
}
-(void)startAction{
HJSelfWeak;
[HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundRun withCrc16Modbus]];
weakSelf.customeView.startBtn.selected = true;
weakSelf.smartView.startBtn.selected = true;
self.isStart = true;
self.isStartted = true;
// 2、开始计时器
if (self.timer == nil) {
self.timer=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(timerAction) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSDefaultRunLoopMode];
}
if((!self.isUpdate && !self.guestureId)){
[self saveDr2DRecord];
}
}
-(void)timerAction{
if(self.totalTime>0){
if (self.isChangeHandle == 0) {
if (self.totalTime == [self.currentModel.post_parameters.time integerValue]) {
self.smartView.step1Lb.backgroundColor = XHColorRGB(230, 230, 230);
self.smartView.step1Lb.textColor = XHColorRGB(51, 51, 51);
self.smartView.step2Lb.backgroundColor = XHColorRGB(164, 47, 36);
self.smartView.step2Lb.textColor = XHColorRGB(255, 255, 255);
[self stopDr02DAction];
self.current3MStress = [self.currentModel.post_parameters.stress3M integerValue];
self.current10MStress = [self.currentModel.post_parameters.stress10M integerValue];
self.current20MStress = [self.currentModel.post_parameters.stress20M integerValue];
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
if ([self.currentModel.post_parameters.stress20M integerValue] != 0) {
[HJGetBluetoothManager writeStr:[DR_02_D_send_Select20M withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.isLit) {
[self changeLitStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}else{
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
});
}else{
[HJGetBluetoothManager writeStr:[DR_02_D_send_Select3And10M withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.isLit) {
[self changeLitStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}else{
[self changeStressWith3M:self.current3MStress And10M:self.current10MStress And20M:self.current20MStress];
}
});
}
HJAlertView *alertView = [[HJAlertView alloc] init];
alertView.parentView = [UIApplication sharedApplication].keyWindow;
alertView.title = HJLocalizedString(@"提示");
alertView.message = HJLocalizedString(@"请切换手柄继续护理");
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:HJLocalizedString(@"确定"), nil]];
[alertView show];
alertView.onButtonTouchUpInside = ^(HJAlertView * _Nonnull alertView, NSInteger buttonIndex) {
[alertView close];
self.isChangeHandle = 1;
};
return;
}
}
//DR04_HFX_send_getEnergy
self.totalTime--;
self.customeView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
self.smartView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
if((self.remaintime-self.totalTime)%20==0){
[self saveLocationRecord];
}
if((self.remaintime - self.totalTime)%3==0){
/// 工作提示音
[self playSoundEffect:@"working.wav"];
}
}else{
[self updateDr02DRecord];
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
[self stopDr02DAction];
HJAlertView *alertView = [[HJAlertView alloc] init];
alertView.parentView = [UIApplication sharedApplication].keyWindow;
alertView.title = HJLocalizedString(@"提示");
alertView.message = HJLocalizedString(@"护理已完成");
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:HJLocalizedString(@"确定"), nil]];
[alertView show];
alertView.onButtonTouchUpInside = ^(HJAlertView * _Nonnull alertView, NSInteger buttonIndex) {
[alertView close];
[self.navigationController popViewControllerAnimated:YES];
};
}
}
- (void)setIsBack:(BOOL)isBack{
// if(self.remaintime-self.totalTime>0){
if(self.totalTime>0){
HJAlertView *alertView = [[HJAlertView alloc] init];
alertView.parentView = [UIApplication sharedApplication].keyWindow;
alertView.title = HJLocalizedString(@"提示");
alertView.message = HJLocalizedString(@"护理正在进行中,是否确定退出?");
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:HJLocalizedString(@"取消"),HJLocalizedString(@"确定"), nil]];
[alertView show];
alertView.onButtonTouchUpInside = ^(HJAlertView * _Nonnull alertView, NSInteger buttonIndex) {
if(buttonIndex == 1){//退出
// [HJGetBluetoothManager writeStr:[DR_02_D_send_UltrasoundStop withCrc16Modbus]];//暂停
[self stopDr02DAction];
HJGetBluetoothManager.noReconnect = true;
[HJGetBluetoothManager stopScanning];
[HJGetBluetoothManager stopConnect];
[HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
[self updateDr02DRecord];
[self.plusTipsView.playerView stop];
[self.navigationController popViewControllerAnimated:YES];
}
[alertView close];
};
}else{
HJGetBluetoothManager.noReconnect = true;
[HJGetBluetoothManager stopScanning];
[HJGetBluetoothManager stopConnect];
[HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
[self.plusTipsView.playerView stop];
[self.navigationController popViewControllerAnimated:YES];
}
}
- (void)setGestationRecordId:(NSString *)gestationRecordId{
self.guestureId = gestationRecordId;
[self saveLocationRecord];
}
-(void)setIsVerifySucceed:(BOOL)isVerifySucceed{
if (isVerifySucceed) {
if ([self.currentModel.class_type intValue] != 16) {
self.totalTime = [self.currentModel.pre_parameters.time integerValue] + [self.currentModel.post_parameters.time integerValue];
self.step1Time = [self.currentModel.pre_parameters.time integerValue];
self.smartView.timeLb.text = [[HJTools shared] minusToTime: self.totalTime];
self.remaintime = self.totalTime;
}else{
self.totalTime = self.remaintime;
self.customeView.timeLb.text = [[HJTools shared] minusToTime: self.totalTime];
}
}else {
}
}
-(void)setIsSaveSucceed:(BOOL)isSaveSucceed{
if (isSaveSucceed) {
if (super.isBack) {
[self updateDr02DRecord];
}
}
}
-(void)setIsUpdateSucceed:(BOOL)isUpdateSucceed{
if (isUpdateSucceed) {
[self.itemRecord removeAllObjects];
[HJUserDefaults removeObjectForKey:@"updateDictyDr02D"];
if ([HJUserDefaults objectForKey:@"updateDictyDr02D"]) {
self.isBack = false;
NSMutableDictionary *paramsDic = [NSMutableDictionary dictionary];
[paramsDic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDr02D"]];
[self updateRecord:paramsDic];
[HJUserDefaults removeObjectForKey:@"updateDictyDr02D"];
self.isBack = true;
}
/// 剩余时间大于0时,退出理疗,更新操作记录后,断开连接,返回上一页
if (self.isBack) {
HJGetBluetoothManager.noReconnect = true;
[HJGetBluetoothManager stopScanning];
[HJGetBluetoothManager stopConnect];
[HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
[self.plusTipsView.playerView stop];
[self.navigationController popViewControllerAnimated:YES];
}
}else{
if (self.isBack) {
HJGetBluetoothManager.noReconnect = true;
[HJGetBluetoothManager stopScanning];
[HJGetBluetoothManager stopConnect];
[HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
[self.plusTipsView.playerView stop];
[self.navigationController popViewControllerAnimated:YES];
}
}
}
#pragma mark --懒加载
//存储数据到本地
- (void)saveLocationRecord{
NSMutableDictionary *paramsDic = [NSMutableDictionary dictionary];
NSDictionary *recordDic = @{
@"x":[NSString stringWithFormat:@"%ld", self.remaintime-self.totalTime],
@"y1":[NSString stringWithFormat:@"%ld",self.current3MStress],
@"y2":[NSString stringWithFormat:@"%ld",self.current10MStress],
@"y3":[NSString stringWithFormat:@"%ld",self.current20MStress]
};
[self.itemRecord addObject:recordDic];
NSDictionary *updateDic = @{
@"devicecode":XHGetDataManager.deviceCode,
@"time":[NSString stringWithFormat:@"%ld",self.remaintime-self.totalTime],
@"program":[NSString stringWithFormat:@"%ld",self.current3MStress],
@"record":[self.itemRecord mj_JSONString],
@"date":[[HJTools shared] currentTimeStr]
};
[paramsDic addEntriesFromDictionary:updateDic];
[paramsDic setObject:[NSString stringWithFormat:@"%ld",self.remaintime] forKey:@"remaintime"];
[paramsDic setObject:[NSString stringWithFormat:@"%ld",self.totalTime] forKey:@"totalTime"];
[paramsDic setObject:self.guestureId?self.guestureId:@"0" forKey:@"guestureId"];
[paramsDic setObject:XHGetDataManager.deviceID?XHGetDataManager.deviceID:self.deviceid forKey:@"deviceid"];
[paramsDic setObject:[XHCommonMethods isEmptyOrNull:XHGetDataManager.shopId]?@"0":XHGetDataManager.shopId forKey:@"shopid"];
[paramsDic setObject:[XHCommonMethods isEmptyOrNull:XHGetDataManager.optionName]?@"0":XHGetDataManager.optionName forKey:@"optionname"];
[paramsDic setObject:[XHCommonMethods isEmptyOrNull:XHGetDataManager.optionId]?@"0":XHGetDataManager.optionId forKey:@"opid"];
[paramsDic setObject:XHGetDataManager.nickName forKey:@"clientname"];
[paramsDic setObject:[NSString stringWithFormat:@"%ld",(long)XHGetDataManager.clientId] forKey:@"customerID"];
[paramsDic setObject:@"test" forKey:@"ordernumber"];
[paramsDic setObject:[NSString isNull:self.dataModel.orderMap.verification]?@"0":self.dataModel.orderMap.verification forKey:@"ordernumber"];
[paramsDic setObject:self.guestureId forKey:@"cid"];
[paramsDic setObject:[NSString isNull:self.verificationNum]?@"0":self.verificationNum forKey:@"verificationNum"];
[HJUserDefaults setObject:paramsDic forKey:@"updateDictyDr02D"];
[HJUserDefaults synchronize];
}
-(void)saveDr2DRecord{
if ([self iSDeviceID]) {
NSDictionary *recordDic = @{@"x":[NSString stringWithFormat:@"%ld", self.remaintime-self.totalTime],
@"y1":[NSString stringWithFormat:@"%ld",self.current3MStress],
@"y2":[NSString stringWithFormat:@"%ld",self.current10MStress],
@"y3":[NSString stringWithFormat:@"%ld",self.current20MStress]};
[self.itemRecord addObject:recordDic];
NSDictionary *updateDic = @{@"devicecode":XHGetDataManager.deviceCode,
@"time":[NSString stringWithFormat:@"%ld",self.remaintime-self.totalTime],
@"program":[NSString stringWithFormat:@"%ld",self.current3MStress],
@"record":[self.itemRecord mj_JSONString],
@"date":[[HJTools shared] currentTimeStr]
};
[self saveRecord:updateDic];
}
}
-(void)updateDr02DRecord{
if (self.isConnected) {
NSDictionary *recordDic = @{@"x":[NSString stringWithFormat:@"%ld", self.remaintime-self.totalTime],
@"y1":[NSString stringWithFormat:@"%ld",self.current3MStress],
@"y2":[NSString stringWithFormat:@"%ld",self.current10MStress],
@"y3":[NSString stringWithFormat:@"%ld",self.current20MStress]};
[self.itemRecord addObject:recordDic];
NSDictionary *updateDic = @{@"devicecode":XHGetDataManager.deviceCode,
@"time":[NSString stringWithFormat:@"%ld",self.remaintime-self.totalTime],
@"program":[NSString stringWithFormat:@"%ld",self.current3MStress],
@"record":[self.itemRecord mj_JSONString
],@"date":[[HJTools shared] currentTimeStr]
};
NSMutableDictionary *paramsDic = [NSMutableDictionary dictionary];
NSMutableDictionary *upDic = [NSMutableDictionary dictionary];
[upDic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDr02D"]];
[paramsDic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDr02D"]];
[paramsDic addEntriesFromDictionary:updateDic];
[self updateRecord:paramsDic];
}
}
@end
......@@ -526,6 +526,7 @@
if (XHGetDataManager.deviceCode) {
[paramsDic setObject:XHGetDataManager.deviceCode?XHGetDataManager.deviceCode:@"" forKey:@"deviceCode"];
}
// [paramsDic setObject:@"A03C31B4DF95" forKey:@"deviceCode"];
[[XHHttpRequestManager shareManager] getHttpRequestURL:HFXGetVideoList isJson:NO parameters:paramsDic success:^(id responseObject) {
[SVProgressHUD dismiss];
NSLog(@"responseObject:\n%@===%@",responseObject,responseObject[@"msg"]);
......
......@@ -21,9 +21,11 @@
@property (nonatomic,strong) NSString *guestureId;
@property (nonatomic,assign) BOOL BLEConnect;//当前蓝牙是否连接上
@property (nonatomic,assign) BOOL istimeClean;
@property (nonatomic,copy) NSString *deviceid;
//温度提示标志位
@property (nonatomic,assign) BOOL isShow;
@property (nonatomic,assign) BOOL isFirstUse;
@end
@implementation XHDRVC
#pragma mark system_Method
......@@ -34,14 +36,60 @@
[self addNotification];
[self creatUI];
[self creatmyNoconnectView];
self.istimeClean = NO;
self.isFirstUse = YES;
// if(![HJUserDefaults isEqual:[NSNull null]] && !(HJUserDefaults == nil)){
// if([HJUserDefaults objectForKey:@"updateDictyDrFacialAge"]){
// NSMutableDictionary *dic = [NSMutableDictionary dictionary];
// [dic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDrFacialAge"]];
// [self upData:dic];
// }
// }
if(![HJUserDefaults isEqual:[NSNull null]] && !(HJUserDefaults == nil)){
if([HJUserDefaults objectForKey:@"updateDictyDrFacialAge"]){
NSMutableDictionary *dic = [NSMutableDictionary dictionary];
[dic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDrFacialAge"]];
[self upData:dic];
self.totalTime = [[dic objectForKey:@"totalTime"] integerValue];
self.remaintime = [[dic objectForKey:@"remaintime"] integerValue];
self.verificationNum = [dic objectForKey:@"verificationNum"];
self.availNumber = [[dic objectForKey:@"availNumber"] integerValue];
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime:self.totalTime];
// self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
self.guestureId = [dic objectForKey:@"guestureId"];
XHGetDataManager.deviceID = [dic objectForKey:@"deviceid"];
self.type = [[dic objectForKey:@"type"] integerValue];
if (self.type == 0) {
self.myView.usedTimeLb.hidden = NO;
self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
}else{
self.myView.usedTimeLb.hidden = YES;
}
// self.isFirstUse = NO;
// [self getUseTimes:^(BOOL getTimesSuccessful) {
// if (self.type == 0) {
//// self.isFirstUse = NO;
// self.myView.usedTimeLb.hidden = NO;
// self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
// }else{
// self.myView.usedTimeLb.hidden = YES;
// }
// }];
}
}
}
- (void)viewWillAppear:(BOOL)animated{
......@@ -83,6 +131,10 @@
- (void)startBtnAction:(UIButton *)sender{
if ([self iSDeviceID]) {
if(self.totalTime>0){
// if (self.totalTime == self.remaintime) {
// self.availNumber -= self.availNumber;
// self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
// }
if(self.myView.startBtn.selected){//已经开始了
// 暂停
// [HJGetBluetoothManager writeStr:[Dr_Facial_SendStop withCrc16Modbus]];
......@@ -97,6 +149,15 @@
HJSelfStrong;
if(getTimesSuccessful == false){
[strongSelf deviceValidTime];
}else{
if (self.type == 0) {
self.myView.usedTimeLb.hidden = NO;
self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
}else{
self.myView.usedTimeLb.hidden = YES;
}
self.totalTime = self.remaintime;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime: self.totalTime];
}
}];
}
......@@ -119,6 +180,95 @@
}
}
}
- (void)clearAction:(UIButton *)sender{
if(self.isConnected){
if(self.totalTime > 0 && self.totalTime != self.remaintime){
HJAlertView *alertView = [[HJAlertView alloc] init];
alertView.parentView = [UIApplication sharedApplication].keyWindow;
alertView.title = HJLocalizedString(@"结束");
alertView.message = HJLocalizedString(@"即将结束本次护理");
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:HJLocalizedString(@"取消"),HJLocalizedString(@"确定"), nil]];
[alertView show];
alertView.onButtonTouchUpInside = ^(HJAlertView * _Nonnull alertView, NSInteger buttonIndex) {
if(buttonIndex == 1){//退出
self.istimeClean = YES;
[self getUseTimes:^(BOOL getTimesSuccessful) {
if (self.type == 0) {
self.myView.usedTimeLb.hidden = NO;
self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
}else{
self.myView.usedTimeLb.hidden = YES;
}
self.totalTime = 0;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime:self.totalTime];
}];
[self stopDrFacialAgeAction];
// HJGetBluetoothManager.noReconnect = true;
// [HJGetBluetoothManager stopScanning];
// [HJGetBluetoothManager stopConnect];
// [HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
// if(![HJUserDefaults objectForKey:@"updateDictyDrFacialAge"] && self.guestureId){
// [self saveLocationRecord];
// }
// self.isUpdateSucceed = YES;
[self updateDrFacialAgeRecord];
self.guestureId = nil;
// if (![self.extraTimeIsUsed boolValue]) {
// if(![HJUserDefaults objectForKey:@"updateDictyDrFacialAge"] && self.guestureId){
// [self saveLocationRecord];
// }
// [self updateDr04Record];
// }else{
// self.isUpdateSucceed = YES;
// }
// if (self.currentState == 1) {
// self.extraTimeValue = @"0";
// if (self.isStrengthen) {
// self.xdtotalTime = 50;
// }else{
// self.xdtotalTime = 25;
// }
//
// self.guestureId = nil;
// self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
//
// self.currentState = 0;
// [self.myView controlWithItem:self.myView.xdBtn];
// }else {
// self.guestureId = nil;
// self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
// [self.myView controlWithItem:self.myView.hlBtn];
// }
//
// if([HJUserDefaults objectForKey:@"updateDictyDrFacialAge"]){
// NSMutableDictionary *dic = [NSMutableDictionary dictionary];
// [dic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDrFacialAge"]];
//// [self upData:dic];
// }
// [self.myView.playerView stop];
// [self.navigationController popViewControllerAnimated:YES];
}
[alertView close];
};
}else{
[SVProgressHUD showErrorWithStatus:HJLocalizedString(@"护理未开始")];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
}
}else{
[SVProgressHUD showErrorWithStatus:HJLocalizedString(@"仪器未连接")];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
}
}
#pragma mark EnterBackgroundStatus
//- (void)setIsBackground:(BOOL)isBackground{
// if(isBackground){//退到后台了
......@@ -135,6 +285,9 @@
#pragma mark ======= 切换到后台 =======
-(void)appDidEnterBackground{
// self.isBackground = true;
if(self.guestureId){
[self saveLocationRecord];
}
if(self.isStart){
[self stopDrFacialAgeAction];//暂停
}
......@@ -185,6 +338,11 @@
#pragma mark ----------断开连接----------
-(void)disconnect{
HJSelfWeak;
if(self.totalTime > 0){
if((XHGetDataManager.deviceID || self.deviceid) && self.guestureId){
[self saveLocationRecord];
}
}
[SVProgressHUD showSuccessWithStatus:HJLocalizedString(@"断开连接")];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
......@@ -203,9 +361,15 @@
-(void)connect{
self.BLEConnect = true;
self.isConnected = true;
self.deviceid = XHGetDataManager.deviceID.copy;
if(self.totalTime<=0){
[self getUseTimes:^(BOOL getTimesSuccessful) {
if (self.type == 0) {
self.myView.usedTimeLb.hidden = NO;
self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
}else{
self.myView.usedTimeLb.hidden = YES;
}
}];
}
......@@ -338,7 +502,14 @@
@"program":[NSString stringWithFormat:@"%ld",self.setStrengthNum], @"record":[self.itemRecord mj_JSONString],
};
[paramsDic addEntriesFromDictionary:updateDic];
[paramsDic setObject:XHGetDataManager.deviceID forKey:@"deviceid"];
// [paramsDic setObject:XHGetDataManager.deviceID forKey:@"deviceid"];
[paramsDic setObject:[NSString stringWithFormat:@"%ld",self.remaintime] forKey:@"remaintime"];
[paramsDic setObject:[NSString stringWithFormat:@"%ld",self.totalTime] forKey:@"totalTime"];
[paramsDic setObject:[NSString stringWithFormat:@"%ld",self.availNumber] forKey:@"availNumber"];
[paramsDic setObject:[NSString stringWithFormat:@"%ld",self.type] forKey:@"type"];
[paramsDic setObject:self.guestureId?self.guestureId:@"0" forKey:@"guestureId"];
[paramsDic setObject:XHGetDataManager.deviceID?XHGetDataManager.deviceID:self.deviceid forKey:@"deviceid"];
[paramsDic setObject:[XHCommonMethods isEmptyOrNull:XHGetDataManager.shopId]?@"0":XHGetDataManager.shopId forKey:@"shopid"];
[paramsDic setObject:[XHCommonMethods isEmptyOrNull:XHGetDataManager.optionName]?@"0":XHGetDataManager.optionName forKey:@"optionname"];
[paramsDic setObject:[XHCommonMethods isEmptyOrNull:XHGetDataManager.optionId]?@"0":XHGetDataManager.optionId forKey:@"opid"];
......@@ -347,7 +518,7 @@
[paramsDic setObject:@"test" forKey:@"ordernumber"];
[paramsDic setObject:[NSString isNull:self.dataModel.orderMap.verification]?@"0":self.dataModel.orderMap.verification forKey:@"ordernumber"];
[paramsDic setObject:self.guestureId forKey:@"cid"];
[paramsDic setObject:[NSString isNull:self.verificationNum]?@"0":self.verificationNum forKey:@"number"];
[paramsDic setObject:[NSString isNull:self.verificationNum]?@"0":self.verificationNum forKey:@"verificationNum"];
[HJUserDefaults setObject:paramsDic forKey:@"updateDictyDrFacialAge"];
[HJUserDefaults synchronize];
}
......@@ -376,7 +547,7 @@
[[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSDefaultRunLoopMode];
}
if(!self.isUpdate){
if((!self.isUpdate && !self.guestureId)){
[self saveDrFacialAgeRecord];
}
}
......@@ -395,6 +566,26 @@
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime:self.totalTime];
[self updateDrFacialAgeRecord];
[self stopDrFacialAgeAction];
HJAlertView *alertView = [[HJAlertView alloc] init];
alertView.parentView = [UIApplication sharedApplication].keyWindow;
alertView.title = HJLocalizedString(@"提示");
alertView.message = HJLocalizedString(@"当前护理已完成");
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:HJLocalizedString(@"确定"), nil]];
[alertView show];
alertView.onButtonTouchUpInside = ^(HJAlertView * _Nonnull alertView, NSInteger buttonIndex) {
self.guestureId = nil;
[self getUseTimes:^(BOOL getTimesSuccessful) {
if (self.type == 0) {
self.myView.usedTimeLb.hidden = NO;
self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
}else{
self.myView.usedTimeLb.hidden = YES;
}
self.totalTime = 0;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime:self.totalTime];
}];
[alertView close];
};
}
}
#pragma mark ----------stopDrFacialAgeAction----------
......@@ -421,6 +612,16 @@
[alertView show];
alertView.onButtonTouchUpInside = ^(HJAlertView * _Nonnull alertView, NSInteger buttonIndex) {
if(buttonIndex == 1){//退出
self.istimeClean = NO;
if(!self.istimeClean){
if((XHGetDataManager.deviceID || self.deviceid) && self.guestureId){
[self saveLocationRecord];
}
// self.deviceid = XHGetDataManager.deviceID.copy;
// NSString *ssssss = XHGetDataManager.deviceID;
// [HJUserDefaults setObject:ssssss forKey:@"noUploadDeviceID"];
// XHGetDataManager.noUploaddeviceID = XHGetDataManager.deviceID.copy;
}
[self stopDrFacialAgeAction];
HJGetBluetoothManager.noReconnect = true;
[HJGetBluetoothManager stopScanning];
......@@ -447,8 +648,91 @@
}
-(void)setIsVerifySucceed:(BOOL)isVerifySucceed{
if (isVerifySucceed) {
self.totalTime = self.remaintime;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime: self.totalTime];
if(![HJUserDefaults isEqual:[NSNull null]] && !(HJUserDefaults == nil)){
if([HJUserDefaults objectForKey:@"updateDictyDrFacialAge"]){
NSLog(@"1111111");
// NSMutableDictionary *dic = [NSMutableDictionary dictionary];
// [dic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDrFacialAge"]];
// [self upData:dic];
// [self updateRecord:dic];
// self.totalTime = [[dic objectForKey:@"totalTime"] integerValue];
// self.remaintime = [[dic objectForKey:@"remaintime"] integerValue];
// self.verificationNum = [dic objectForKey:@"verificationNum"];
// self.availNumber = [[dic objectForKey:@"availNumber"] integerValue];
// self.myView.operationTimeLb.text = [[HJTools shared] secondToTime:self.totalTime];
// // self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
// self.guestureId = [dic objectForKey:@"guestureId"];
// XHGetDataManager.deviceID = [dic objectForKey:@"deviceid"];
if (!self.istimeClean) {
self.totalTime = self.remaintime;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime: self.totalTime];
self.istimeClean = NO;
if (self.isFirstUse) {
[self getUseTimes:^(BOOL getTimesSuccessful) {
self.isFirstUse = NO;
if (self.type == 0) {
self.myView.usedTimeLb.hidden = NO;
self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
}else{
self.myView.usedTimeLb.hidden = YES;
}
}];
}
}else{
self.totalTime = self.remaintime;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime: self.totalTime];
}
}else{
if (!self.istimeClean) {
self.totalTime = self.remaintime;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime: self.totalTime];
self.istimeClean = NO;
if (self.isFirstUse) {
[self getUseTimes:^(BOOL getTimesSuccessful) {
self.isFirstUse = NO;
if (self.type == 0) {
self.myView.usedTimeLb.hidden = NO;
self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
}else{
self.myView.usedTimeLb.hidden = YES;
}
}];
}
}else{
self.totalTime = self.remaintime;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime: self.totalTime];
}
}
}else{
self.totalTime = self.remaintime;
self.myView.operationTimeLb.text = [[HJTools shared] secondToTime: self.totalTime];
self.istimeClean = NO;
if (self.isFirstUse) {
[self getUseTimes:^(BOOL getTimesSuccessful) {
self.isFirstUse = NO;
if (self.type == 0) {
self.myView.usedTimeLb.hidden = NO;
self.myView.usedTimeLb.text = [NSString stringWithFormat:@"剩余启动次数:%ld",self.availNumber];
}else{
self.myView.usedTimeLb.hidden = YES;
}
}];
}
}
}
}
-(void)setIsSaveSucceed:(BOOL)isSaveSucceed{
......@@ -471,7 +755,15 @@
self.isBack = true;
[HJUserDefaults removeObjectForKey:@"updateDictyDrFacialAge"];
}
if(!self.istimeClean){
// NSString *ssss = [HJUserDefaults objectForKey:@"noUploadDeviceID"];
if((XHGetDataManager.deviceID || self.deviceid) && self.guestureId){
[self saveLocationRecord];
}
}
/// 剩余时间大于0时,退出理疗,更新操作记录后,断开连接,返回上一页
if (self.isBack) {
HJGetBluetoothManager.noReconnect = true;
......
{
"categories": {
"多维提升": [
{
"icon_name_nol": "bpnl_nol",
"icon_name_sel": "bpnl_sel",
"name": "表皮焕新",
"subtitle": "表皮层嫩肤淡纹",
"class_type": "1",
"pre_parameters": {
"stress3M": "0",
"stress10M": "4",
"stress20M": "0",
"time": "600"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "4",
"time": "600"
},
"operation_area": "右脸、左脸",
"preparation": {
"description": "【表皮焕新用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆",
"step2:准备精华凝胶,或自己的护肤品,精华、面霜、凝胶,均匀涂抹至面部",
"step3:根据指引,进入护理页面,按操作教学开始护理",
" "
]
}
},
{
"icon_name_nol": "jycy_nol",
"icon_name_sel": "jycy_sel",
"name": "胶原充盈",
"subtitle": "真皮层嘭弹饱满",
"class_type": "2",
"pre_parameters": {
"stress3M": "2",
"stress10M": "4",
"stress20M": "0",
"time": "1200"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "右脸、左脸",
"preparation": {
"description": "【胶原充盈用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆",
"step2:准备精华凝胶,或自己的护肤品,精华、面霜、凝胶,均匀涂抹至面部",
"step3:根据指引,进入护理页面,按操作教学开始护理",
" "
]
}
},
{
"icon_name_nol": "lkgd_nol",
"icon_name_sel": "lkgd_sel",
"name": "轮廓提升",
"subtitle": "脂肪层压实紧致",
"class_type": "3",
"pre_parameters": {
"stress3M": "4",
"stress10M": "2",
"stress20M": "0",
"time": "1200"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "右脸、左脸",
"preparation": {
"description": "【轮廓提升用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆",
"step2:准备精华凝胶,或自己的护肤品,精华、面霜、凝胶,均匀涂抹至面部",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*如您是第一次使用,请谨慎操作【轮廓提升模式】,可先操作【胶原充盈模式或表皮逆龄模式】建立皮肤耐受"
]
}
}
],
"问题肌修复": [
{
"icon_name_nol": "mjks_nol",
"icon_name_sel": "mjks_sel",
"name": "敏肌提升",
"subtitle": "敏感肌多维提升",
"class_type": "4",
"pre_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "2",
"time": "360"
},
"post_parameters": {
"stress3M": "5",
"stress10M": "2",
"stress20M": "0",
"time": "360"
},
"operation_area": "右脸、左脸",
"preparation": {
"description": "【敏肌提升用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆",
"step2:准备精华凝胶,或自己的护肤品,精华、面霜、凝胶,均匀涂抹至面部",
"step3:根据指引,进入护理页面,按操作教学开始护理",
" "
]
}
},
{
"icon_name_nol": "thms_nol",
"icon_name_sel": "thms_sel",
"name": "敏肌修护",
"subtitle": "敏感肌柔护焕活",
"class_type": "5",
"pre_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "3",
"time": "600"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "右脸、左脸",
"preparation": {
"description": "【敏肌修护用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆",
"step2:准备精华凝胶,或自己的护肤品,精华、面霜、凝胶,均匀涂抹至面部",
"step3:根据指引,进入护理页面,按操作教学开始护理",
" "
]
}
},
{
"icon_name_nol": "ccms_nol",
"icon_name_sel": "ccms_sel",
"name": "轻痘调理",
"subtitle": "问题肌代谢调理",
"class_type": "6",
"pre_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "2",
"time": "240"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "2",
"stress20M": "0",
"time": "240"
},
"operation_area": "不区分部位",
"preparation": {
"description": "【轻痘调理用前须知】",
"steps": [
"step1:开始护理前,请先清洁需要操作的部位并擦干",
"step2:准备精华凝胶,或自己的轻痘抚炎产品均匀涂抹至操作部位",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*特殊情况需遵医嘱"
]
}
}
],
"肤质管理": [
{
"icon_name_nol": "pysz_nol",
"icon_name_sel": "pysz_sel",
"name": "眼部护理",
"subtitle": "淡化黑眼圈、眼纹、眼袋",
"class_type": "7",
"pre_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "2",
"time": "360"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "右眼、左眼",
"preparation": {
"description": "【眼部护理用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆",
"step2:准备精华凝胶,或自己的护肤品,精华、面霜、凝胶,均匀涂抹至面部",
"step3:根据指引,进入护理页面,按操作教学开始护理",
" "
]
}
},
{
"icon_name_nol": "jyfs_nol",
"icon_name_sel": "jyfs_sel",
"name": "均匀肤色",
"subtitle": "提亮高光肌",
"class_type": "8",
"pre_parameters": {
"stress3M": "2",
"stress10M": "2",
"stress20M": "0",
"time": "360"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "4",
"time": "360"
},
"operation_area": "右脸、左脸",
"preparation": {
"description": "【均匀肤色用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆",
"step2:准备精华凝胶,或自己的护肤品,精华、面霜、凝胶,均匀涂抹至面部",
"step3:根据指引,进入护理页面,按操作教学开始护理",
" "
]
}
},
{
"icon_name_nol": "phsy_nol",
"icon_name_sel": "phsy_sel",
"name": "平衡水油",
"subtitle": "肌肤水油调理",
"class_type": "9",
"pre_parameters": {
"stress3M": "2",
"stress10M": "2",
"stress20M": "0",
"time": "360"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "2",
"time": "360"
},
"operation_area": "右脸、左脸",
"preparation": {
"description": "【平衡水油用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆",
"step2:准备精华凝胶,或自己的护肤品,精华、面霜、凝胶,均匀涂抹至面部",
"step3:根据指引,进入护理页面,按操作教学开始护理",
" "
]
}
}
],
"专业级护理": [
{
"icon_name_nol": "csqj_nol",
"icon_name_sel": "csqj_sel",
"name": "超声清洁",
"subtitle": "毛孔、微损舒缓护理",
"class_type": "10",
"pre_parameters": {
"stress3M": "0",
"stress10M": "3",
"stress20M": "0",
"time": "300"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "3",
"time": "300"
},
"operation_area": "不区分部位",
"preparation": {
"description": "【超声清洁用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆;做超声微损护理,需提前清理操作部位",
"step2:准备官配护肤凝胶,或超声凝胶、芦荟胶等专用产品,均匀涂抹至操作部位。若想要做微损加速愈合,仅限健康肌肤组织上使用。",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*此模式可用于毛孔油脂堵塞、肌肤微损等辅助修护,特殊情况需遵医嘱"
]
}
},
{
"icon_name_nol": "hfcs_nol",
"icon_name_sel": "hfcs_sel",
"name": "护肤促渗",
"subtitle": "活性成分深透力",
"class_type": "11",
"pre_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "2",
"time": "300"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "右脸、左脸",
"preparation": {
"description": "【护肤促渗用前须知】",
"steps": [
"step1:开始护理前,请先清洁面部并擦干,有彩妆、防晒需先卸妆。",
"step2:准备需要促进吸收的护肤品,涂抹比平时稍多一些",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*此模式可利用超声波高频震动,将护肤产品分子打散,同时提升肌肤的吸收能力,强化护肤效果"
]
}
},
{
"icon_name_nol": "ywcs_nol",
"icon_name_sel": "ywcs_sel",
"name": "乳膏促渗",
"subtitle": "透皮吸收增效",
"class_type": "12",
"pre_parameters": {
"stress3M": "0",
"stress10M": "4",
"stress20M": "0",
"time": "180"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "4",
"time": "180"
},
"operation_area": "不区分部位",
"preparation": {
"description": "【乳膏促渗用前须知】",
"steps": [
"step1:开始护理前,请先清洁需护理的部位",
"step2:准备需促渗导入的搽剂,涂抹至关节等处,或其它需要护理的部位,注意避开淋巴和腺体",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*此模式可利用超声波高频震动,将搽剂乳膏分子打散,提升产品的吸收能力,强化修护效果"
]
}
}
],
"特殊模式": [
{
"icon_name_nol": "dwfb_nol",
"icon_name_sel": "dwfb_sel",
"name": "淡纹抚疤",
"subtitle": "纹理瘢痕修护",
"class_type": "13",
"pre_parameters": {
"stress3M": "2",
"stress10M": "2",
"stress20M": "0",
"time": "600"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "4",
"time": "600"
},
"operation_area": "不区分部位",
"preparation": {
"description": "【淡纹抚疤用前须知】",
"steps": [
"step1:开始护理前,请先清洁需护理的部位。",
"step2:准备官配护肤凝胶,或专业产品擦剂,涂抹至对应部位。",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*此模式可激活肌肤弹性纤维,辅助改善纹理"
]
}
},
{
"icon_name_nol": "stsx_nol",
"icon_name_sel": "stsx_sel",
"name": "身体塑形",
"subtitle": "美体曲线雕刻",
"class_type": "14",
"pre_parameters": {
"stress3M": "4",
"stress10M": "4",
"stress20M": "0",
"time": "1200"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "不区分部位",
"preparation": {
"description": "【身体塑形用前须知】",
"steps": [
"step1:开始护理前,请先清洁需护理的部位。",
"step2:准备官配护肤凝胶,或专业燃脂塑形嫩肤擦剂,涂抹至手臂、大腿、腰腹部等部位。",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*此模式可平滑脂肪团和橘皮组织,紧致拜拜肉、大腿肉、妈妈臀等"
]
}
},
{
"icon_name_nol": "yqcs_nol",
"icon_name_sel": "yqcs_sel",
"name": "痕迹修正",
"subtitle": "淤青色沉修护",
"class_type": "15",
"pre_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "4",
"time": "600"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "不区分部位",
"preparation": {
"description": "【痕迹修正用前须知】",
"steps": [
"step1:开始护理前,请先清洁需护理的部位。",
"step2:准备官配护肤凝胶,或专业修护产品擦剂,涂抹至操作部位。",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*此模式可加速加速色沉的恢复。特殊情况需遵医嘱"
]
}
},
{
"icon_name_nol": "fbam_nol",
"icon_name_sel": "fbam_sel",
"name": "腹部按摩",
"subtitle": "促进代谢循环",
"class_type": "17",
"pre_parameters": {
"stress3M": "4",
"stress10M": "4",
"stress20M": "0",
"time": "1200"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "不区分部位",
"preparation": {
"description": "【腹部按摩用前须知】",
"steps": [
"step1:开始护理前,请先清洁需护理的部位。",
"step2:准备官配护肤凝胶,或超声凝胶、护肤品、身体霜等,涂抹至腹部。",
"step3:根据指引,进入护理页面,按操作教学开始护理",
"*此模式可带动腹部振动促进肠道蠕动,和小肚腩说拜拜。特殊情况需遵医嘱"
]
}
}
],
"自定义": [
{
"icon_name_nol": "zdyms_nol",
"icon_name_sel": "zdyms_sel",
"name": "自定义模式",
"subtitle": "随心调节,个性美肤",
"class_type": "16",
"pre_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"post_parameters": {
"stress3M": "0",
"stress10M": "0",
"stress20M": "0",
"time": "0"
},
"operation_area": "不区分部位",
"preparation": {
"description": "【自定义模式用前须知】",
"steps": [
"注意事项:如您已经熟练掌握了Dr水滴高光仪2.0的用法,并掌握自己的肤质和耐受能力,可以选择自定义模式,开启个性化美肤之旅",
"注意事项:自由切换探头、选择能量档位、操作时间、操作部位",
"注意事项:采用打圈按摩、定点盖章的方式进行个性化美肤",
"注意事项:建议一个部位最长操作时间不超过30分钟"
]
}
}
]
}
}
//
// DXDRPlusMoel.h
// DJMHomeTY
//
// Created by nana on 2025/5/15.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DXStepModel : NSObject
@property (nonatomic, copy) NSString *stress3M;
@property (nonatomic, copy) NSString *stress10M;
@property (nonatomic, copy) NSString *stress20M;
@property (nonatomic, copy) NSString *time;
@end
@interface Preparation : NSObject
@property (nonatomic, copy) NSString *descriptionplus;
@property (nonatomic, strong) NSArray<NSString *> *steps;
@property (nonatomic, strong) NSArray<NSString *> *notes;
@end
// 模式模型
@interface DXDRPlusSubModel : NSObject
@property (nonatomic, copy) NSString *icon_name;
@property (nonatomic, copy) NSString *icon_name_nol;
@property (nonatomic, copy) NSString *icon_name_sel;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *subtitle;
@property (nonatomic, copy) NSString *class_type;
@property (nonatomic, strong) DXStepModel *pre_parameters;
@property (nonatomic, strong) DXStepModel *post_parameters;
@property (nonatomic, copy) NSString *operation_area;
@property (nonatomic, strong) Preparation *preparation;
@property (nonatomic, copy) NSString *isSelected;
@end
@interface DXDRPlusMoel : NSObject
@property (nonatomic, strong) NSDictionary<NSString *, NSArray<DXDRPlusSubModel *> *> *categories;
@end
NS_ASSUME_NONNULL_END
//
// DXDRPlusMoel.m
// DJMHomeTY
//
// Created by nana on 2025/5/15.
//
#import "DXDRPlusMoel.h"
@implementation DXStepModel
@end
@implementation Preparation
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
return @{ @"descriptionplus": @"description" }; // 解决关键字冲突
}
+ (NSDictionary *)mj_objectClassInArray {
return @{
@"steps": [NSString class],
@"notes": [NSString class]
};
}
@end
@implementation DXDRPlusSubModel
+ (NSDictionary *)mj_objectClassInArray {
return @{
@"pre_parameters": [NSString class],
@"post_parameters": [NSString class]
};
}
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
return @{ @"class_type": @"class_type" };
}
+ (NSDictionary *)mj_objectClassInDictionary {
return @{ @"preparation": [Preparation class] ,
@"pre_parameters":[DXStepModel class],
@"post_parameters":[DXStepModel class]};
}
@end
@implementation DXDRPlusMoel
+ (NSDictionary *)mj_objectClassInDictionary {
return @{ @"categories": [DXDRPlusSubModel class] };
}
@end
//
// DXDRPlusCustomeView.h
// DJMHomeTY
//
// Created by nana on 2025/5/19.
//
#import "XHParentView.h"
NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger{
Item3MDEC = 95533,
Item3MADD,
Item10MDEC,
Item10MADD,
Item20MDEC,
Item20MADD,
ItemstartOrstop,
ItemClearTime,
ItemChange10M,
ItemChange20M,
Itemuvchange
}Dr02DitemType;
@protocol DXDRPlusCustomeViewDelegate <NSObject>
- (void)deviceControlWithTag:(Dr02DitemType)type ;
@end
@interface DXDRPlusCustomeView : XHParentView
@property (nonatomic,weak) id <DXDRPlusCustomeViewDelegate> delegate;
@property (nonatomic,strong) UIButton *decBtn;
@property (nonatomic,strong) UIButton *addBtn;
@property (nonatomic,strong) UILabel *stressLb;
@property (nonatomic,strong) UILabel *stressTitleLb;
@property (nonatomic,strong) UIView *centerline;
@property (nonatomic,strong) UIButton *speedDecBtn;
@property (nonatomic,strong) UIButton *speedAddBtn;
@property (nonatomic,strong) UILabel *speedStressLb;
@property (nonatomic,strong) UILabel *speedStressTitleLb;
@property (nonatomic,strong) UIButton *dec20Btn;
@property (nonatomic,strong) UIButton *add20Btn;
@property (nonatomic,strong) UILabel *stress20Lb;
@property (nonatomic,strong) UILabel *stress20TitleLb;
@property (nonatomic,strong) UIButton *startBtn;
@property (nonatomic,strong) UILabel *timeLb;
@property (nonatomic,strong) UIButton *uvBtn;
@end
NS_ASSUME_NONNULL_END
//
// DXDRPlusCustomeView.m
// DJMHomeTY
//
// Created by nana on 2025/5/19.
//
#import "DXDRPlusCustomeView.h"
@interface DXDRPlusCustomeView ()
@property (nonatomic,strong) UIImageView *topImage;
@property (nonatomic,strong) UIView *bottomView;
@property (nonatomic,strong) UIImageView *timeImg;
@property (nonatomic,strong) CALayer *bottomlayer;
@property (nonatomic,strong) UILabel *xdtimeLb;
@property (nonatomic,strong) UIButton *byBtn;
@property (nonatomic,strong) UIButton *clearTimeBtn;
@property (nonatomic, strong) NSArray<UIButton *> *buttons;
@property (nonatomic, assign) NSInteger selectedIndex;
@property (nonatomic, strong) UIImageView *segBack;
@end
@implementation DXDRPlusCustomeView
- (instancetype)initWithFrame:(CGRect)frame{
if(self = [super initWithFrame:frame]){
// [self initCache];
// self.currentVideoList = [NSMutableArray array];
// self.timesBtnArray = [NSMutableArray array];
[self creatUI];
}
return self;
}
- (void)creatUI{
self.backgroundColor = XHColorRGB(247, 247, 247);
_topImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dr02dcustop"]];
[self addSubview:_topImage];
[_topImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self);
make.top.equalTo(@0);
make.height.mas_equalTo(195);
}];
_bottomView = [UIView new];
_bottomView.layer.cornerRadius = 20.f;
_bottomView.layer.masksToBounds = YES;
_bottomView.backgroundColor = XHColorRGB(255, 255, 255);
[self addSubview:_bottomView];
[_bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self);
make.bottom.equalTo(@0);
make.top.equalTo(self.topImage.mas_bottom).offset(20*IPhone6ScaleHeight);
}];
[self layoutIfNeeded];
_bottomlayer = [CALayer layer];
_bottomlayer.frame = _bottomView.frame;
_bottomlayer.shadowColor= [UIColor blackColor].CGColor;
_bottomlayer.shadowOffset = CGSizeMake(-1,-1);
_bottomlayer.shadowOpacity = 0.08;
_bottomlayer.cornerRadius = 20;
CGRect frame = _bottomView.bounds;
frame.origin.x= frame.origin.x;//向左减 向右加
frame.origin.y= frame.origin.y-3;//向上减 向下加
frame.size.width= frame.size.width;//阴影的宽度
frame.size.height= frame.size.height;//阴影的高度
_bottomlayer.shadowPath = [[UIBezierPath bezierPathWithRect:frame] CGPath ];
//这里self表示当前自定义的view
[self.layer insertSublayer:_bottomlayer below:self.bottomView.layer];
_segBack = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dr_02_segment"]];
_segBack.userInteractionEnabled = YES;
[_bottomView addSubview:_segBack];
[_segBack mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(@20);
make.centerX.equalTo(self.bottomView);
make.size.mas_equalTo(CGSizeMake(145, 41));
}];
[_bottomView layoutIfNeeded];
[_segBack layoutIfNeeded];
// 创建按钮数组
NSArray *titles = @[@"3M/10M", @"20M"];
NSMutableArray *buttons = [NSMutableArray array];
// 创建按钮
for (NSInteger i = 0; i < titles.count; i++) {
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(7 + i * ((_segBack.frame.size.width - 10)/2), 6, (_segBack.frame.size.width - 10 - 7)/2, 28);
if (i == 0) {
btn.titleLabel.font = [UIFont systemFontOfSize:12];
}else{
btn.titleLabel.font = [UIFont systemFontOfSize:14];
}
[btn setTitle:titles[i] forState:UIControlStateNormal];
btn.tag = ItemChange10M+i;
btn.layer.cornerRadius = 14;
btn.clipsToBounds = YES;
btn.contentEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 5);
[btn addTarget:self action:@selector(segmentClicked:) forControlEvents:UIControlEventTouchUpInside];
[_segBack addSubview:btn];
[buttons addObject:btn];
}
// 初始选中状态
[self updateButtonStyle:buttons selectedIndex:0];
_uvBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_uvBtn setImage:[UIImage imageNamed:@"HFX_uvlight"] forState:UIControlStateNormal];
[_uvBtn setImage:[UIImage imageNamed:@"HFX_uvopen"] forState:UIControlStateSelected];
[_uvBtn setTitle:HJLocalizedString(@"UV灯") forState:UIControlStateNormal];
[_uvBtn setTitleColor:XHColorRGB(0, 0, 0) forState:UIControlStateNormal];
_uvBtn.titleLabel.font = XHFontSize(10);
[_uvBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_uvBtn.tag = Itemuvchange;
[self addSubview:_uvBtn];
[_uvBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.segBack.mas_right).offset(40);
make.centerY.equalTo(self.segBack);
}];
[_uvBtn setTitleEdgeInsets:UIEdgeInsetsMake(_uvBtn.imageView.frame.size.height+5 ,-_uvBtn.imageView.frame.size.width, 0.0,0.0)];//文字距离上边框的距离增加imageView的高度,距离左边框减少imageView的宽度,距离下边框和右边框距离不变
[_uvBtn setImageEdgeInsets:UIEdgeInsetsMake(-_uvBtn.titleLabel.bounds.size.height-5,(_uvBtn.frame.size.width-_uvBtn.imageView.bounds.size.width)/2.0,0.0,(_uvBtn.frame.size.width-_uvBtn.imageView.bounds.size.width)/2.0)];
// _noChangeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
// [_noChangeBtn setTitle:HJLocalizedString(@"清洁设备不可调节负压、流速") forState:UIControlStateNormal];
// [_noChangeBtn setImage:[UIImage imageNamed:@"HFX_nochange"] forState:UIControlStateNormal];
// [_noChangeBtn setTitleColor:XHColorRGB_Alpha(117, 115, 115, 1) forState:UIControlStateNormal];
// _noChangeBtn.titleLabel.font = XHFontSize(13);
// _noChangeBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
// _noChangeBtn.imageEdgeInsets = UIEdgeInsetsMake(0,-5, 0, 5);
// [self.bottomView addSubview:_noChangeBtn];
// [_noChangeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerX.equalTo(self.bottomView);
// make.top.equalTo(@(20 *IPhone6ScaleHeight ));
// }];
_decBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_decBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_lit_dis"] forState:UIControlStateNormal];
[_decBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_lit"] forState:UIControlStateDisabled];
[_decBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_decBtn.tag = Item3MDEC;
[self.bottomView addSubview:_decBtn];
[_decBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@30);
make.top.equalTo(@(60 *IPhone6ScaleHeight));
}];
_addBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_addBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_add_dis"] forState:UIControlStateNormal];
[_addBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_add"] forState:UIControlStateDisabled];
[_addBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_addBtn.tag = Item3MADD;
[self.bottomView addSubview:_addBtn];
[self.addBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-30);
make.top.equalTo(@(60*IPhone6ScaleHeight));
}];
_stressLb = [UILabel new];
_stressLb.text = @"0";
_stressLb.font = [UIFont boldSystemFontOfSize:29];
_stressLb.textColor = [UIColor blackColor];
[self.bottomView addSubview:_stressLb];
[self.stressLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.top.equalTo(@(68*IPhone6ScaleHeight));
}];
_stressTitleLb = [UILabel new];
_stressTitleLb.text = HJLocalizedString(@"3M");
_stressTitleLb.font = XHFontSize(10);
_stressTitleLb.textColor = [UIColor blackColor];
[self.bottomView addSubview:_stressTitleLb];
[self.stressTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.top.equalTo(self.stressLb.mas_bottom).offset(5*IPhone6ScaleHeight);
}];
UIImageView *stre3mimg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dr02d_cus_3m"]];
[self.bottomView addSubview:stre3mimg];
[stre3mimg mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(self.stressTitleLb);
make.size.mas_equalTo(CGSizeMake(20, 20));
}];
self.centerline = [UIView new];
_centerline.backgroundColor = XHColorRGB(231, 230, 230);
[self.bottomView addSubview:_centerline];
[_centerline mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.decBtn.mas_left).offset(-2);
make.right.equalTo(self.addBtn.mas_right).offset(2);
make.top.equalTo(self.addBtn.mas_bottom).offset(10);
make.height.equalTo(@0.5);
}];
_centerline.hidden = YES;
_speedDecBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_speedDecBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_lit_dis"] forState:UIControlStateNormal];
[_speedDecBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_lit"] forState:UIControlStateDisabled];
[_speedDecBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_speedDecBtn.tag = Item10MDEC;
// _speedDecBtn.hidden = YES;
[self.bottomView addSubview:_speedDecBtn];
[_speedDecBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.decBtn);
make.top.equalTo(self.decBtn.mas_bottom).offset((20 *IPhone6ScaleHeight));
}];
_speedAddBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_speedAddBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_add_dis"] forState:UIControlStateNormal];
[_speedAddBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_add"] forState:UIControlStateDisabled];
[_speedAddBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_speedAddBtn.tag = Item10MADD;
// _speedAddBtn.hidden = YES;
[self.bottomView addSubview:_speedAddBtn];
[_speedAddBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.addBtn);
make.top.equalTo(self.decBtn.mas_bottom).offset((20 *IPhone6ScaleHeight));;
}];
_speedStressLb = [UILabel new];
_speedStressLb.text = @"0";
// _speedStressLb.hidden = YES;
_speedStressLb.font = [UIFont boldSystemFontOfSize:29];
_speedStressLb.textColor = [UIColor blackColor];
[self.bottomView addSubview:_speedStressLb];
[_speedStressLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.centerY.equalTo(self.speedDecBtn).multipliedBy(0.9);
}];
_speedStressTitleLb = [UILabel new];
// _speedStressTitleLb.hidden = YES;
_speedStressTitleLb.text = HJLocalizedString(@"10M");
_speedStressTitleLb.font = XHFontSize(10);
_speedStressTitleLb.textColor = [UIColor blackColor];
[self.bottomView addSubview:_speedStressTitleLb];
[_speedStressTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.top.equalTo(self.speedStressLb.mas_bottom).offset(5*IPhone6ScaleHeight);
}];
UIImageView *stre10mimg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dr02d_cus_3m"]];
[self.bottomView addSubview:stre10mimg];
[stre10mimg mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(self.speedStressTitleLb);
make.size.mas_equalTo(CGSizeMake(20, 20));
}];
_dec20Btn = [UIButton buttonWithType:UIButtonTypeCustom];
[_dec20Btn setBackgroundImage:[UIImage imageNamed:@"DR_02_D_lit_dis"] forState:UIControlStateNormal];
[_dec20Btn setBackgroundImage:[UIImage imageNamed:@"DR_02_D_lit"] forState:UIControlStateDisabled];
[_dec20Btn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_dec20Btn.tag = Item20MDEC;
[self.bottomView addSubview:_dec20Btn];
[_dec20Btn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@30);
make.top.equalTo(self.speedDecBtn.mas_bottom).offset((20 *IPhone6ScaleHeight));
}];
_add20Btn = [UIButton buttonWithType:UIButtonTypeCustom];
[_add20Btn setBackgroundImage:[UIImage imageNamed:@"DR_02_D_add_dis"] forState:UIControlStateNormal];
[_add20Btn setBackgroundImage:[UIImage imageNamed:@"DR_02_D_add"] forState:UIControlStateDisabled];
[_add20Btn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_add20Btn.tag = Item20MADD;
[self.bottomView addSubview:_add20Btn];
[_add20Btn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-30);
make.top.equalTo(self.speedDecBtn.mas_bottom).offset((20 *IPhone6ScaleHeight));;
}];
_stress20Lb = [UILabel new];
_stress20Lb.text = @"0";
_stress20Lb.font = [UIFont boldSystemFontOfSize:29];
_stress20Lb.textColor = XHColorRGB(193, 37, 31);
[self.bottomView addSubview:_stress20Lb];
[_stress20Lb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.centerY.equalTo(self.dec20Btn).multipliedBy(0.9);
}];
_stress20TitleLb = [UILabel new];
_stress20TitleLb.text = HJLocalizedString(@"20M");
_stress20TitleLb.font = XHFontSize(10);
_stress20TitleLb.textColor = XHColorRGB(193, 37, 31);
[self.bottomView addSubview:_stress20TitleLb];
[_stress20TitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.top.equalTo(self.stress20Lb.mas_bottom).offset(5*IPhone6ScaleHeight);
}];
UIImageView *stre20mimg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dr02d_cus_20m"]];
[self.bottomView addSubview:stre20mimg];
[stre20mimg mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(self.stress20TitleLb);
make.size.mas_equalTo(CGSizeMake(30, 30));
}];
_timeImg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"HFX_time"]];
[self.bottomView addSubview:_timeImg];
[_timeImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.decBtn);
make.top.equalTo(self.dec20Btn.mas_bottom).offset(30*IPhone6ScaleHeight);
make.size.mas_equalTo(CGSizeMake(22, 22));
}];
_timeLb = [UILabel new];
_timeLb.text = @"00:00";
_timeLb.font = [UIFont boldSystemFontOfSize:23];
_timeLb.textColor = XHColorRGB(175, 44, 35);
[self.bottomView addSubview:_timeLb];
[_timeLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.timeImg);
make.top.equalTo(self.timeImg.mas_bottom).offset(5*IPhone6ScaleHeight);
}];
// _timeLb.hidden = YES;
// _xdtimeLb = [UILabel new];
// _xdtimeLb.text = @"00:00";
// _xdtimeLb.font = [UIFont boldSystemFontOfSize:23];
// _xdtimeLb.textColor = XHColorRGB(175, 44, 35);
// [self.bottomView addSubview:_xdtimeLb];
// [_xdtimeLb mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerX.equalTo(self.timeImg);
// make.top.equalTo(self.timeImg.mas_bottom).offset(5*IPhone6ScaleHeight);
// }];
_startBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_startBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_start"] forState:UIControlStateNormal];
[_startBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_stop"] forState:UIControlStateSelected];
[_startBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_startBtn.tag = ItemstartOrstop;
[self.bottomView addSubview:_startBtn];
[_startBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.centerY.equalTo(self.timeImg).multipliedBy(1.075);
}];
_clearTimeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_clearTimeBtn setBackgroundImage:[UIImage imageNamed:@"HFX_clearTime"] forState:UIControlStateNormal];
[_clearTimeBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_clearTimeBtn.tag = ItemClearTime;
[self.bottomView addSubview:_clearTimeBtn];
[_clearTimeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.addBtn);
make.centerY.equalTo(self.startBtn);
}];
// _decBtn.enabled = YES;
// _addBtn.enabled = YES;
// _speedDecBtn.enabled = YES;
// _speedAddBtn.enabled = YES;
_dec20Btn.enabled = NO;
_add20Btn.enabled = NO;
// _stressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
// _stressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
// _speedStressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
// _speedStressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_stress20Lb.textColor = XHColorRGB_Alpha(193, 37, 31, 0.5);
_stress20TitleLb.textColor = XHColorRGB_Alpha(193, 37, 31, 0.5);
}
- (void)controlWithItem:(UIButton *)sender{
if (self.delegate && [self.delegate respondsToSelector:@selector(deviceControlWithTag:)]) {
[self.delegate deviceControlWithTag:sender.tag];
}
}
// 按钮点击事件
- (void)segmentClicked:(UIButton *)sender {
if (HJGetBluetoothManager.servicePeripheral.state == CBPeripheralStateConnected) {
if (self.startBtn.selected) {
[SVProgressHUD showInfoWithStatus:@"请暂停后操作"];
}else{
NSArray *buttons = [sender.superview subviews]; // 从容器获取所有按钮
[self updateButtonStyle:buttons selectedIndex:sender.tag - ItemChange10M];
if (sender.tag == ItemChange10M) {
_decBtn.enabled = YES;
_addBtn.enabled = YES;
_speedDecBtn.enabled = YES;
_speedAddBtn.enabled = YES;
_stressLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
_stressTitleLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
_speedStressLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
_speedStressTitleLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
_dec20Btn.enabled = NO;
_add20Btn.enabled = NO;
_stress20Lb.textColor = XHColorRGB_Alpha(193, 37, 31, 0.5);;
_stress20TitleLb.textColor = XHColorRGB_Alpha(193, 37, 31, 0.5);;
}else{
_decBtn.enabled = NO;
_addBtn.enabled = NO;
_speedDecBtn.enabled = NO;
_speedAddBtn.enabled = NO;
_dec20Btn.enabled = YES;
_add20Btn.enabled = YES;
_stressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_stressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_speedStressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_speedStressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_stress20Lb.textColor = XHColorRGB_Alpha(193, 37, 31, 1);;
_stress20TitleLb.textColor = XHColorRGB_Alpha(193, 37, 31, 1);;
}
if (self.delegate && [self.delegate respondsToSelector:@selector(deviceControlWithTag:)]) {
[self.delegate deviceControlWithTag:sender.tag];
}
}
}else{
[SVProgressHUD showInfoWithStatus:@"设备未连接"];
}
}
// 更新按钮样式
- (void)updateButtonStyle:(NSArray<UIButton *> *)buttons selectedIndex:(NSInteger)index {
[buttons enumerateObjectsUsingBlock:^(UIButton *btn, NSUInteger idx, BOOL *stop) {
if (idx == index) {
// 选中样式
[btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
btn.backgroundColor = [UIColor colorWithRed:0.64 green:0.18 blue:0.13 alpha:1.0]; // #A42D20
} else {
// 默认样式
[btn setTitleColor:[UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1.0] forState:UIControlStateNormal]; // #999999
btn.backgroundColor = [UIColor clearColor];
}
}];
// 添加动画效果
[UIView animateWithDuration:0.2 animations:^{
[self.segBack layoutIfNeeded];
}];
}
@end
//
// DXDRPlusSelectView.h
// DJMHomeTY
//
// Created by nana on 2025/5/15.
//
#import "XHParentView.h"
#import "DXDRPlusMoel.h"
NS_ASSUME_NONNULL_BEGIN
@protocol DXDRPlusSelectViewDelegate <NSObject>
- (void)touchNextStepWithModel:(DXDRPlusSubModel *)model;
@end
@interface DXDRPlusSelectView : XHParentView
@property (nonatomic,assign) id<DXDRPlusSelectViewDelegate>delegate;
@property (nonatomic, strong) DXDRPlusSubModel *selectedModel;
@end
@interface DXDRPlusSelectCell : UITableViewCell
@property (nonatomic, strong) DXDRPlusSubModel *model;
@end
@interface SegmentButton : UIButton
@property (nonatomic, strong) UIView *indicatorLine;
@end
NS_ASSUME_NONNULL_END
//
// DXDRPlusSelectView.m
// DJMHomeTY
//
// Created by nana on 2025/5/15.
//
#import "DXDRPlusSelectView.h"
#import "DXDRPlusMoel.h"
static NSString *dXDRPlusCell = @"DXDRPlusSelectCell";
@interface DXDRPlusSelectView ()<UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSArray<SegmentButton *> *segmentButtons;
@property (nonatomic, strong) NSDictionary *modelDic;
@property (nonatomic, strong) NSArray *titleArray;
@property (nonatomic, strong) DXDRPlusMoel *models;
@property (nonatomic, assign) NSInteger currentIndex;;
@property (nonatomic, strong) NSMutableArray <DXDRPlusSubModel *> *modelArray;
@end
@implementation DXDRPlusSelectView
- (instancetype)initWithFrame:(CGRect)frame{
if (self = [super initWithFrame:frame]) {
[self setupData];
[self setUI];
[self setupHeaderView];
[self setupFooterView];
}
return self;
}
#pragma mark - 数据初始化
- (void)setupData {
self.currentIndex = 0;
self.modelDic = [NSString readLocalFileWithName:@"DXDRPlus"];
self.titleArray = @[@"多维提升",@"问题肌修复",@"肤质管理",@"专业级护理",@"特殊模式",@"自定义"];
self.models = [DXDRPlusMoel mj_objectWithKeyValues:_modelDic];
self.modelArray = [DXDRPlusSubModel mj_objectArrayWithKeyValuesArray:[self.models.categories objectForKey:self.titleArray[_currentIndex]]];
for (DXDRPlusSubModel *model in self.modelArray) {
model.isSelected = @"0";
}
self.selectedModel = self.modelArray[0];
self.selectedModel.isSelected = @"1";
}
- (void)setUI{
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.rowHeight = 80;
[self addSubview:_tableView];
[_tableView registerClass:[DXDRPlusSelectCell class] forCellReuseIdentifier:dXDRPlusCell];
[_tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
}
#pragma mark - 头部视图
- (void)setupHeaderView {
UIView *header = [UIView new];
header.frame = CGRectMake(0, 0, HJScreenWidth, 404);
header.backgroundColor = [UIColor whiteColor];
// 图片区域
UIImageView *headerImage = [UIImageView new];
headerImage.contentMode = UIViewContentModeScaleAspectFill;
headerImage.clipsToBounds = YES;
headerImage.image = [UIImage imageNamed:@"dr02d_header"];
[header addSubview:headerImage];
// 标题
UILabel *titleLabel = [UILabel new];
titleLabel.text = @"选择护理方案";
titleLabel.font = [UIFont systemFontOfSize:23 weight:UIFontWeightSemibold];
titleLabel.textColor = [UIColor colorWithRed:0.13 green:0.13 blue:0.13 alpha:1];
[header addSubview:titleLabel];
UIView *conView = [UIView new];
conView.backgroundColor = XHColorRGB(239, 239, 239);
conView.layer.cornerRadius = 30.f;
conView.layer.masksToBounds = YES;
[header addSubview:conView];
UIView *conView1 = [UIView new];
conView1.backgroundColor = XHColorRGB(255, 255, 255);
conView1.layer.cornerRadius = 30.f;
conView1.layer.masksToBounds = YES;
[header addSubview:conView1];
// Segment 区域
UIView *segmentContainer = [self createSegmentButtons];
[header addSubview:segmentContainer];
// 布局
[headerImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(header);
make.top.equalTo(@0);
make.height.mas_equalTo(225);
}];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(headerImage.mas_bottom).offset(-10);
make.leading.equalTo(header).offset(16);
}];
[conView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(header);
make.top.equalTo(titleLabel.mas_bottom).offset(20);
}];
[segmentContainer mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(titleLabel.mas_bottom).offset(40);
make.leading.trailing.equalTo(header).inset(2);
// make.bottom.equalTo(header).offset(-16);
}];
[conView1 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(header);
make.top.equalTo(segmentContainer.mas_bottom).offset(10);
}];
// // 计算 header 高度
// [header layoutIfNeeded];
// CGRect frame = header.frame;
// frame.size.height = 424;
// header.frame = frame;
_tableView.tableHeaderView = header;
}
- (UIView *)createSegmentButtons {
NSArray *titles = @[@"多维提升",@"问题肌修复",@"肤质管理",@"专业级护理",@"特殊模式",@"自定义"];
NSMutableArray *buttons = [NSMutableArray new];
UIView *container = [UIView new];
// 第一行(4个按钮)
UIStackView *firstRowStack = [UIStackView new];
firstRowStack.axis = UILayoutConstraintAxisHorizontal;
firstRowStack.distribution = UIStackViewDistributionFillEqually;
firstRowStack.spacing = 10;
NSMutableArray <SegmentButton *>*firstRowButtons = [NSMutableArray new];
for (int i = 0; i < 4; i++) {
SegmentButton *btn = [self createButtonWithIndex:i title:titles[i]];
[firstRowStack addArrangedSubview:btn];
[buttons addObject:btn];
[firstRowButtons addObject:btn];
}
// 第二行按钮(直接添加到容器)
SegmentButton *btn4 = [self createButtonWithIndex:4 title:titles[4]];
SegmentButton *btn5 = [self createButtonWithIndex:5 title:titles[5]];
[buttons addObjectsFromArray:@[btn4, btn5]];
// 添加到容器
[container addSubview:firstRowStack];
[container addSubview:btn4];
[container addSubview:btn5];
// 第一行布局
[firstRowStack mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.leading.trailing.equalTo(container);
}];
// 第二行布局
[btn4 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(firstRowStack.mas_bottom).offset(8);
make.leading.equalTo(firstRowButtons[0].mas_leading).offset(4); // 对齐第一行第一个按钮
make.bottom.equalTo(container);
}];
[btn5 mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(firstRowButtons[1].mas_leading).offset(-12); // 对齐第一行第二个按钮
make.centerY.equalTo(btn4);
make.trailing.lessThanOrEqualTo(container);
}];
// 设置按钮最小宽度
[buttons enumerateObjectsUsingBlock:^(UIButton *btn, NSUInteger idx, BOOL *stop) {
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.greaterThanOrEqualTo(@80);
}];
}];
_segmentButtons = [buttons copy];
return container;
}
- (SegmentButton *)createButtonWithIndex:(NSInteger)index title:(NSString *)title {
SegmentButton *btn = [SegmentButton new];
[btn setTitle:title forState:UIControlStateNormal];
btn.tag = index;
[btn addTarget:self action:@selector(segmentButtonClicked:)
forControlEvents:UIControlEventTouchUpInside];
// 设置默认选中状态
if (index == 0) btn.selected = YES;
// 保证最小点击区域
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.greaterThanOrEqualTo(@60);
make.height.mas_equalTo(36);
}];
return btn;
}
#pragma mark - 底部按钮
- (void)setupFooterView {
UIView *footer = [UIView new];
footer.frame = CGRectMake(0, 0, self.bounds.size.width, 100);
UIButton *startButton = [UIButton buttonWithType:UIButtonTypeCustom];
// startButton.backgroundColor = [UIColor colorWithRed:0.83 green:0.13 blue:0.15 alpha:1];
[startButton setTitle:@"下一步" forState:UIControlStateNormal];
startButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightBold];
// startButton.layer.cornerRadius = 25;
[startButton setBackgroundImage:[UIImage imageNamed:@"dr02_d_startc"] forState:UIControlStateNormal];
[startButton addTarget:self action:@selector(nextStep:) forControlEvents:UIControlEventTouchUpInside];
[footer addSubview:startButton];
[startButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(footer).offset(20);
make.centerX.equalTo(footer);
make.height.mas_equalTo(50);
make.width.equalTo(footer).offset(-60);
}];
_tableView.tableFooterView = footer;
}
#pragma mark - 交互事件
- (void)nextStep:(UIButton *)sender{
if (![self.selectedModel.class_type isEqualToString:@""] && self.selectedModel.class_type) {
if (self.delegate && [self.delegate respondsToSelector:@selector(touchNextStepWithModel:)]) {
[self.delegate touchNextStepWithModel:self.selectedModel];
}
}else{
[SVProgressHUD showInfoWithStatus:@"请选择护理模式~"];
}
}
- (void)segmentButtonClicked:(SegmentButton *)sender {
// 取消之前选中状态
for (SegmentButton *btn in _segmentButtons) {
btn.selected = (btn == sender);
}
self.selectedModel = [DXDRPlusSubModel new];
self.currentIndex = sender.tag;
self.modelArray = [DXDRPlusSubModel mj_objectArrayWithKeyValuesArray:[self.models.categories objectForKey:self.titleArray[_currentIndex]]];
[self.tableView reloadData];
}
#pragma mark - UITableView 数据源
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// return [self.models.categories objectForKey:self.titleArray[_currentIndex]].count;
return self.modelArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
DXDRPlusSelectCell *cell = [tableView dequeueReusableCellWithIdentifier:dXDRPlusCell];
cell.model = self.modelArray[indexPath.row];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// 单选逻辑
for (DXDRPlusSubModel *model in self.modelArray) {
if (model == self.modelArray[indexPath.row]) {
model.isSelected = @"1";
}else{
model.isSelected = @"0";
}
}
self.selectedModel = self.modelArray[indexPath.row];
[tableView reloadData];
}
@end
//**********************************************//
@interface DXDRPlusSelectCell ()
@property (nonatomic, strong) UIImageView *iconView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *subtitleLabel;
@property (nonatomic, strong) UIImageView *checkmarkView;
@end
@implementation DXDRPlusSelectCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self setupUI];
self.selectionStyle = UITableViewCellSelectionStyleNone;
}
return self;
}
- (void)setModel:(DXDRPlusSubModel *)model{
_model = model;
_iconView.image = [model.isSelected boolValue]?[UIImage imageNamed:model.icon_name_sel]:[UIImage imageNamed:model.icon_name_nol];
_titleLabel.text = model.name;
_subtitleLabel.text = model.subtitle;
_checkmarkView.image = [model.isSelected boolValue]?[UIImage imageNamed:@"dr02d_select"]:[UIImage imageNamed:@"dr02d_diselect"];
}
- (void)setupUI {
// 图标
_iconView = [UIImageView new];
_iconView.layer.cornerRadius = 8;
_iconView.clipsToBounds = YES;
[self.contentView addSubview:_iconView];
// 文字堆栈
UIStackView *textStack = [UIStackView new];
textStack.axis = UILayoutConstraintAxisVertical;
textStack.spacing = 4;
_titleLabel = [UILabel new];
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
_subtitleLabel = [UILabel new];
_subtitleLabel.font = [UIFont systemFontOfSize:12];
_subtitleLabel.textColor = [UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1];
[textStack addArrangedSubview:_titleLabel];
[textStack addArrangedSubview:_subtitleLabel];
[self.contentView addSubview:textStack];
// 勾选图标
_checkmarkView = [UIImageView new];
[self.contentView addSubview:_checkmarkView];
// Masonry 布局
[_iconView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(self.contentView).offset(16);
make.centerY.equalTo(self.contentView);
make.size.mas_equalTo(CGSizeMake(40, 40));
}];
[textStack mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(_iconView.mas_trailing).offset(12);
make.centerY.equalTo(self.contentView);
make.trailing.lessThanOrEqualTo(_checkmarkView.mas_leading).offset(-16);
}];
[_checkmarkView mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.equalTo(self.contentView).offset(-16);
make.centerY.equalTo(self.contentView);
make.size.mas_equalTo(CGSizeMake(20, 20));
}];
}
@end
//***********************************************//
@implementation SegmentButton
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
_indicatorLine = [UIView new];
_indicatorLine.backgroundColor = [UIColor clearColor];
[self addSubview:_indicatorLine];
[_indicatorLine mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.centerX.equalTo(self);
make.height.mas_equalTo(2);
make.width.equalTo(self.titleLabel.mas_width);
}];
self.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
[self setTitleColor:[UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1] forState:UIControlStateNormal];
[self setTitleColor:[UIColor colorWithRed:0.83 green:0.13 blue:0.15 alpha:1] forState:UIControlStateSelected];
}
return self;
}
- (void)setSelected:(BOOL)selected {
[super setSelected:selected];
_indicatorLine.backgroundColor = selected ? [UIColor colorWithRed:0.83 green:0.13 blue:0.15 alpha:1] : [UIColor clearColor];
}
@end
//
// DXDRPlusSmartView.h
// DJMHomeTY
//
// Created by nana on 2025/5/19.
//
#import "XHParentView.h"
#import <KTVHTTPCache/KTVHTTPCache.h>
#import <Photos/Photos.h>
#import "ZFPlayer.h"
#import <ZFPlayer/ZFPlayerControlView.h>
#import <ZFPlayer/ZFAVPlayerManager.h>
#import "DXHFXVideoModel.h"
#import "DXDRPlusMoel.h"
NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger{
SmartLit = 19001,
SmartNomal,
SmartstartOrstop,
SmartClearTime,
Smartuvchange
}Dr02DsmartType;
@protocol DXDRPlusSmartViewDelegate <NSObject>
- (void)deviceSmartControlWithTag:(Dr02DsmartType)type ;
@end
@interface DXDRPlusSmartView : XHParentView
@property (nonatomic,weak) id <DXDRPlusSmartViewDelegate> delegate;
@property (nonatomic,strong) UIButton *volumeBtn;
@property (nonatomic,strong) ZFPlayerController *playerView;
@property (nonatomic, strong) DXDRPlusSubModel *selectedModel;
@property (nonatomic,strong) DXHFXVideoModel *videoModel;
@property (nonatomic,strong) UIButton *startBtn;
@property (nonatomic,strong) UILabel *timeLb;
@property (nonatomic,strong) UILabel *step1Lb;
@property (nonatomic,strong) UILabel *step1DetilsLb;
@property (nonatomic,strong) UILabel *step2Lb;
@property (nonatomic,strong) UILabel *step2DetilsLb;
@property (nonatomic,strong) UIView *stepCenterLine;
@property (nonatomic,strong) UIButton *uvBtn;
@end
NS_ASSUME_NONNULL_END
//
// DXDRPlusSmartView.m
// DJMHomeTY
//
// Created by nana on 2025/5/19.
//
#import "DXDRPlusSmartView.h"
#import "DXProgressBarView.h"
@interface DXDRPlusSmartView ()<DXProgressBarViewDelegate>
@property (nonatomic, strong) ZFPlayerControlView *controlView;
@property (nonatomic,strong) UIView *containerView;
@property (nonatomic,strong) NSMutableArray <DXHFXVideoDetailsModel *>*currentVideoList;
@property (nonatomic ,strong)DXProgressBarView *progressBarView;
@property (nonatomic,strong) NSMutableArray *timeArray;
@property (nonatomic,strong) UIScrollView *timeScrollView;
@property (nonatomic,strong) NSMutableArray <UIButton *> *timesBtnArray;
@property (nonatomic,strong) NSMutableArray <UIButton *> *timesrightBtnArray;
@property (nonatomic,strong) UIView *bottomView;
@property (nonatomic,strong) UIImageView *timeImg;
@property (nonatomic,strong) CALayer *bottomlayer;
@property (nonatomic,strong) UILabel *xdtimeLb;
@property (nonatomic,strong) UIButton *clearTimeBtn;
@property (nonatomic, strong) NSArray<UIButton *> *buttons;
@property (nonatomic, assign) NSInteger selectedIndex;
@property (nonatomic, strong) UIImageView *segBack;
@end
@implementation DXDRPlusSmartView
-(instancetype)initWithFrame:(CGRect)frame{
if(self = [super initWithFrame:frame]){
[self initCache];
self.currentVideoList = [NSMutableArray array];
[self creatUI];
}
return self;
}
//- (void)setSelectedModel:(DXDRPlusSubModel *)selectedModel{
// _selectedModel = selectedModel;
// _titleLb.text = selectedModel.preparation.descriptionplus;
// [self.tableView reloadData];
//}
- (void)initCache{
NSError *error = nil;
[KTVHTTPCache proxyStart:&error];
if (error) {
NSLog(@"Proxy Start Failure, %@", error);
}
// 设置缓存最大容量
long long maxLength = 300 * 1024 * 1024;
[KTVHTTPCache cacheSetMaxCacheLength:maxLength];
}
- (void)creatUI{
// self.backgroundColor = XHColorRGB(255, 255, 255);
self.backgroundColor = XHColorRGB(247, 247, 247);
_containerView = [UIView new];
// _containerView.backgroundColor = [UIColor blueColor];
[self addSubview:_containerView];
[_containerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.equalTo(@(HJScreenWidth));
make.centerX.equalTo(self);
make.height.equalTo(@((HJScreenWidth) * 0.5625));
make.top.equalTo(self).offset(IPhone6ScaleHeight);
}];
_controlView = [ZFPlayerControlView new];
_controlView.fastViewAnimated = YES;
_controlView.autoHiddenTimeInterval = 5;
_controlView.autoFadeTimeInterval = 0.5;
// _controlView.prepareShowLoading = YES;
_controlView.prepareShowControlView = NO;
// _controlView.showCustomStatusBar = YES;
// _containerView = [UIView new];
//// _containerView.backgroundColor = [UIColor blueColor];
//// _containerView.layer.cornerRadius = 10.f;
// _containerView.layer.masksToBounds = YES;
// [self addSubview:_containerView];
// [_containerView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.width.equalTo(@(HJScreenWidth));
// make.centerX.equalTo(self);
// make.height.equalTo(@((HJScreenWidth) * 0.5625));
//// make.height.equalTo(@0);
// make.top.equalTo(self).offset(IPhone6ScaleHeight);
// }];
ZFAVPlayerManager *playerManager = [[ZFAVPlayerManager alloc] init];
playerManager.shouldAutoPlay = YES;
if([HJUserDefaults objectForKey:@"videoSwitchIsOn"]){
NSString *videoSwitchIsOn = [HJUserDefaults objectForKey:@"videoSwitchIsOn"];
if([videoSwitchIsOn isEqualToString:@"1"]){
playerManager.shouldAutoPlay = YES;
}else{
playerManager.shouldAutoPlay = NO;
}
}else{
playerManager.shouldAutoPlay = YES;
}
_playerView = [[ZFPlayerController alloc]initWithPlayerManager:playerManager containerView:_containerView];
self.playerView.controlView = self.controlView;
self.playerView.allowOrentitaionRotation = NO;
self.playerView.containerView.backgroundColor = [UIColor whiteColor];
self.playerView.currentPlayerManager.scalingMode = ZFPlayerScalingModeAspectFill;
self.playerView.pauseWhenAppResignActive = YES;
self.playerView.pauseByEvent = YES;
// self.playerView.shouldAutorotate = NO;
// NSString *URLString = @"https://www.apple.com.cn/105/media/cn/airpods-pro/2022/d2deeb8e-83eb-48ea-9721-f567cf0fffa8/films/under-the-spell/airpods-pro-under-the-spell-tpl-cn-2022_16x9.m3u8";
// NSString *URLString = @"https://media.w3.org/2010/05/sintel/trailer.mp4";
// NSString *URLString = @"http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4";
// NSString *URLString = @"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4";
// NSString *filePath = [[NSBundle mainBundle] pathForResource:@"huli" ofType:@"mp4"];
// NSURL *proxyURL = [[NSURL alloc]initWithString:URLString];
// if (self.currentVideoList.count > 0) {
// NSURL *proxyURL = [KTVHTTPCache proxyURLWithOriginalURL:[NSURL URLWithString:_currentVideoList[0].videoUrl]];
//
// self.playerView.assetURL = proxyURL;
// HJSelfWeak;
// self.playerView.playerDidToEnd = ^(id _Nonnull asset) {
// weakSelf.playerView.assetURL = proxyURL;
// };
//
// self.playerView.playerPlayTimeChanged = ^(id<ZFPlayerMediaPlayback> _Nonnull asset, NSTimeInterval currentTime, NSTimeInterval duration) {
// if (!weakSelf.progressBarView.timeArray) {
// [weakSelf.progressBarView progressBarTimeArray:weakSelf.timeArray Totaltime:duration];
// NSLog(@"当前播放时间=%f",currentTime);
// }
//
// weakSelf.progressBarView.playTime = currentTime;
// };
//
// }
_volumeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_volumeBtn setImage:[UIImage imageNamed:@"HFX_novolume"] forState:UIControlStateNormal];
[_volumeBtn setImage:[UIImage imageNamed:@"HFX_volume"] forState:UIControlStateSelected];
_volumeBtn.backgroundColor = XHColorRGB_Alpha(0, 0, 0, 0.45);
[_volumeBtn addTarget:self action:@selector(changeVolume:) forControlEvents:UIControlEventTouchUpInside];
_volumeBtn.layer.cornerRadius = 16.f;
_volumeBtn.layer.masksToBounds = YES;
[_controlView addSubview:_volumeBtn];
[_volumeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.controlView);
make.right.equalTo(@-10);
make.size.mas_equalTo(CGSizeMake(32, 32));
}];
[self layoutIfNeeded];
self.progressBarView = [[DXProgressBarView alloc] initWithFrame:CGRectMake(0, self.containerView.bottom + 5, HJScreenWidth - 38, 30)];
self.progressBarView.delegate = self;
[self addSubview:self.progressBarView];
_bottomView = [UIView new];
_bottomView.layer.cornerRadius = 20.f;
_bottomView.layer.masksToBounds = YES;
_bottomView.backgroundColor = XHColorRGB(255, 255, 255);
[self addSubview:_bottomView];
[_bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self);
make.bottom.equalTo(@0);
make.top.equalTo(self.progressBarView.mas_bottom).offset(55*IPhone6ScaleHeight);
}];
[self layoutIfNeeded];
_bottomlayer = [CALayer layer];
_bottomlayer.frame = _bottomView.frame;
_bottomlayer.shadowColor= [UIColor blackColor].CGColor;
_bottomlayer.shadowOffset = CGSizeMake(-1,-1);
_bottomlayer.shadowOpacity = 0.08;
_bottomlayer.cornerRadius = 20;
CGRect frame = _bottomView.bounds;
frame.origin.x= frame.origin.x;//向左减 向右加
frame.origin.y= frame.origin.y-3;//向上减 向下加
frame.size.width= frame.size.width;//阴影的宽度
frame.size.height= frame.size.height;//阴影的高度
_bottomlayer.shadowPath = [[UIBezierPath bezierPathWithRect:frame] CGPath ];
//这里self表示当前自定义的view
[self.layer insertSublayer:_bottomlayer below:self.bottomView.layer];
UILabel *stepTitleLb = [UILabel new];
stepTitleLb.text = @"手柄使用顺序";
stepTitleLb.font = [UIFont boldSystemFontOfSize:17];
stepTitleLb.textColor = XHColorRGB(51, 51, 51);
[self.bottomView addSubview:stepTitleLb];
[stepTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(@35);
make.left.equalTo(@20);
}];
_uvBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_uvBtn setImage:[UIImage imageNamed:@"HFX_uvlight"] forState:UIControlStateNormal];
[_uvBtn setImage:[UIImage imageNamed:@"HFX_uvopen"] forState:UIControlStateSelected];
[_uvBtn setTitle:HJLocalizedString(@"UV灯") forState:UIControlStateNormal];
[_uvBtn setTitleColor:XHColorRGB(0, 0, 0) forState:UIControlStateNormal];
_uvBtn.titleLabel.font = XHFontSize(10);
[_uvBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_uvBtn.tag = Smartuvchange;
[self addSubview:_uvBtn];
[_uvBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-40);
make.centerY.equalTo(stepTitleLb);
}];
[_uvBtn setTitleEdgeInsets:UIEdgeInsetsMake(_uvBtn.imageView.frame.size.height+5 ,-_uvBtn.imageView.frame.size.width, 0.0,0.0)];//文字距离上边框的距离增加imageView的高度,距离左边框减少imageView的宽度,距离下边框和右边框距离不变
[_uvBtn setImageEdgeInsets:UIEdgeInsetsMake(-_uvBtn.titleLabel.bounds.size.height-5,(_uvBtn.frame.size.width-_uvBtn.imageView.bounds.size.width)/2.0,0.0,(_uvBtn.frame.size.width-_uvBtn.imageView.bounds.size.width)/2.0)];
_step1Lb = [UILabel new];
_step1Lb.layer.cornerRadius = 14.f;
_step1Lb.layer.masksToBounds = YES;
_step1Lb.textColor = [UIColor whiteColor];
_step1Lb.backgroundColor = XHColorRGB(164, 47, 36);
_step1Lb.text = @"1";
_step1Lb.textAlignment = 1;
_step1Lb.font = XHFontSize(17);
[self.bottomView addSubview:_step1Lb];
[_step1Lb mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(stepTitleLb);
make.size.mas_equalTo(CGSizeMake(28, 28));
make.top.equalTo(stepTitleLb.mas_bottom).offset(10);
}];
_step1DetilsLb = [UILabel new];
_step1DetilsLb.textColor = XHColorRGB(51, 51, 51);
_step1DetilsLb.text = @"3M/10M手柄";
_step1DetilsLb.textAlignment = 0;
_step1DetilsLb.font = XHFontSize(16);
[self.bottomView addSubview:_step1DetilsLb];
[_step1DetilsLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.step1Lb.mas_right).offset(10);
make.centerY.equalTo(self.step1Lb);
}];
_stepCenterLine = [UIView new];
_stepCenterLine.backgroundColor = XHColorRGB(164, 47, 36);
[self.bottomView addSubview:_stepCenterLine];
[self.stepCenterLine mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(35, 2));
make.centerY.equalTo(self.step1Lb);
make.left.equalTo(self.step1DetilsLb.mas_right).offset(25);
}];
_step2Lb = [UILabel new];
_step2Lb.layer.cornerRadius = 14.f;
_step2Lb.layer.masksToBounds = YES;
// _step2Lb.textColor = [UIColor whiteColor];
_step2Lb.textColor = XHColorRGB(51, 51, 51);
// _step2Lb.backgroundColor = XHColorRGB(164, 47, 36);
_step2Lb.backgroundColor = XHColorRGB(230, 230, 230);
_step2Lb.text = @"2";
_step2Lb.textAlignment = 1;
_step2Lb.font = XHFontSize(17);
[self.bottomView addSubview:_step2Lb];
[_step2Lb mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.stepCenterLine.mas_right).offset(25);
make.size.mas_equalTo(CGSizeMake(28, 28));
make.centerY.equalTo(self.step1Lb);
}];
_step2DetilsLb = [UILabel new];
_step2DetilsLb.textColor = XHColorRGB(51, 51, 51);
_step2DetilsLb.text = @"20M手柄";
_step2DetilsLb.textAlignment = 0;
_step2DetilsLb.font = XHFontSize(16);
[self.bottomView addSubview:_step2DetilsLb];
[_step2DetilsLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.step2Lb.mas_right).offset(10);
make.centerY.equalTo(self.step1Lb);
}];
UIView *centerLine = [UIView new];
centerLine.backgroundColor = XHColorRGB(230, 230, 230);
[self.bottomView addSubview:centerLine];
[centerLine mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@44);
make.right.equalTo(@-44);
make.height.equalTo(@1);
make.top.equalTo(self.step1Lb.mas_bottom).offset(25);
}];
UILabel *stressTitleLb = [UILabel new];
stressTitleLb.text = @"能量强度";
stressTitleLb.font = [UIFont boldSystemFontOfSize:17];
stressTitleLb.textColor = XHColorRGB(51, 51, 51);
[self.bottomView addSubview:stressTitleLb];
[stressTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(centerLine.mas_bottom).offset(25);
make.left.equalTo(@20);
}];
_segBack = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dr_02_d_nlbj"]];
_segBack.userInteractionEnabled = YES;
[_bottomView addSubview:_segBack];
[_segBack mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(stressTitleLb.mas_bottom).offset(15);
make.centerX.equalTo(self.bottomView);
make.size.mas_equalTo(CGSizeMake(HJScreenWidth - 40, 70));
}];
[_bottomView layoutIfNeeded];
[_segBack layoutIfNeeded];
// 创建按钮数组
NSArray *titles = @[@"轻柔模式", @"正常强度"];
NSArray *nomalimages = @[@"dr_02_d_qr", @"dr_02_d_zc_nol"];
NSArray *selectimages = @[@"dr_02_d_qr_sel", @"dr_02_d_zc"];
NSMutableArray *buttons = [NSMutableArray array];
// 创建按钮
for (NSInteger i = 0; i < titles.count; i++) {
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:nomalimages[i]] forState:UIControlStateNormal];
[btn setImage:[UIImage imageNamed:selectimages[i]] forState:UIControlStateSelected];
[btn setBackgroundImage:[UIImage imageNamed:@"dr_02_d_nlxz"] forState:UIControlStateSelected];
[btn setBackgroundImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
btn.imageEdgeInsets = UIEdgeInsetsMake(21, 30, 21, 100);
// btn.contentMode = UIViewContentModeScaleAspectFit;
btn.frame = CGRectMake(7 + i * ((_segBack.frame.size.width - 10)/2), 3, (_segBack.frame.size.width - 10 - 7)/2, _segBack.frame.size.height - 6);
if (i == 1) {
btn.selected = YES;
}
btn.tag = 19001+i;
btn.titleLabel.font = [UIFont boldSystemFontOfSize:15];
[btn setTitle:titles[i] forState:UIControlStateNormal];
// btn.layer.cornerRadius = 14;
// btn.clipsToBounds = YES;
// btn.contentEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 5);
[btn addTarget:self action:@selector(segmentClicked:) forControlEvents:UIControlEventTouchUpInside];
[_segBack addSubview:btn];
[buttons addObject:btn];
}
[self updateButtonStyle:buttons selectedIndex:1];
// self.buttons = buttons;
_timeImg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"HFX_time"]];
[self.bottomView addSubview:_timeImg];
[_timeImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@50);
make.top.equalTo(self.segBack.mas_bottom).offset(35*IPhone6ScaleHeight);
make.size.mas_equalTo(CGSizeMake(22, 22));
}];
_timeLb = [UILabel new];
_timeLb.text = @"00:00";
_timeLb.font = [UIFont boldSystemFontOfSize:23];
_timeLb.textColor = XHColorRGB(175, 44, 35);
[self.bottomView addSubview:_timeLb];
[_timeLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.timeImg);
make.top.equalTo(self.timeImg.mas_bottom).offset(5*IPhone6ScaleHeight);
}];
// _timeLb.hidden = YES;
// _xdtimeLb = [UILabel new];
// _xdtimeLb.text = @"00:00";
// _xdtimeLb.font = [UIFont boldSystemFontOfSize:23];
// _xdtimeLb.textColor = XHColorRGB(175, 44, 35);
// [self.bottomView addSubview:_xdtimeLb];
// [_xdtimeLb mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerX.equalTo(self.timeImg);
// make.top.equalTo(self.timeImg.mas_bottom).offset(5*IPhone6ScaleHeight);
// }];
_startBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_startBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_start"] forState:UIControlStateNormal];
[_startBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_stop"] forState:UIControlStateSelected];
[_startBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_startBtn.tag = SmartstartOrstop;
[self.bottomView addSubview:_startBtn];
[_startBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.centerY.equalTo(self.timeImg).multipliedBy(1.075);
}];
_clearTimeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_clearTimeBtn setBackgroundImage:[UIImage imageNamed:@"HFX_clearTime"] forState:UIControlStateNormal];
[_clearTimeBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_clearTimeBtn.tag = SmartClearTime;
[self.bottomView addSubview:_clearTimeBtn];
[_clearTimeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-50);
make.centerY.equalTo(self.startBtn);
}];
}
- (void)changeVolume:(UIButton *)sender{
sender.selected = !sender.selected;
self.playerView.currentPlayerManager.muted = !sender.selected;
if(sender.selected){
///不静音
[HJUserDefaults setObject:@"1" forKey:@"videoVolumeIsOn"];
}else{
//静音
[HJUserDefaults setObject:@"2" forKey:@"videoVolumeIsOn"];
}
}
- (void)controlWithItem:(UIButton *)sender{
if (self.delegate && [self.delegate respondsToSelector:@selector(deviceSmartControlWithTag:)]) {
[self.delegate deviceSmartControlWithTag:sender.tag];
}
}
- (void)segmentClicked:(UIButton *)sender {
// if (self.startBtn.selected) {
// [SVProgressHUD showInfoWithStatus:@"请暂停后操作"];
// }else{
//
// }
if (HJGetBluetoothManager.servicePeripheral.state == CBPeripheralStateConnected) {
NSArray *buttons = [sender.superview subviews]; // 从容器获取所有按钮
[self updateButtonStyle:buttons selectedIndex:sender.tag - 19001];
if (self.delegate && [self.delegate respondsToSelector:@selector(deviceSmartControlWithTag:)]) {
[self.delegate deviceSmartControlWithTag:sender.tag];
}
}else{
[SVProgressHUD showInfoWithStatus:@"设备未连接"];
}
// NSArray *buttons = [sender.superview subviews]; // 从容器获取所有按钮
//
// [self updateButtonStyle:buttons selectedIndex:sender.tag - 19001];
// [self.buttons enumerateObjectsUsingBlock:^(UIButton *btn, NSUInteger idx, BOOL *stop) {
// if (idx == btn.tag-19001) {
// // 选中样式
// [btn setTitleColor:XHColorRGB(165, 50, 39) forState:UIControlStateNormal];
// [btn setBackgroundImage:[UIImage imageNamed:@"dr_02_d_nlxz"] forState:UIControlStateSelected];
//
//// btn.backgroundColor = [UIColor colorWithRed:0.64 green:0.18 blue:0.13 alpha:1.0]; // #A42D20
// } else {
// // 默认样式
// [btn setTitleColor:XHColorRGB(51, 51, 51) forState:UIControlStateNormal]; // #999999
// [btn setBackgroundImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
//// btn.backgroundColor = [UIColor clearColor];
// }
// }];
// if (self.startBtn.selected) {
// [SVProgressHUD showInfoWithStatus:@"请暂停后操作"];
// }else{
//
// }
}
- (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize {
UIGraphicsBeginImageContextWithOptions(newSize, NO, 0.0);
[image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}
// 更新按钮样式
- (void)updateButtonStyle:(NSArray<UIButton *> *)buttons selectedIndex:(NSInteger)index {
[buttons enumerateObjectsUsingBlock:^(UIButton *btn, NSUInteger idx, BOOL *stop) {
if (idx == index) {
// 选中样式
[btn setTitleColor:XHColorRGB(165, 50, 39) forState:UIControlStateNormal];
[btn setBackgroundImage:[UIImage imageNamed:@"dr_02_d_nlxz"] forState:UIControlStateSelected];
btn.selected = YES;
} else {
// 默认样式
[btn setTitleColor:XHColorRGB(51, 51, 51) forState:UIControlStateNormal]; // #999999
[btn setBackgroundImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
btn.selected = NO;
}
}];
// 添加动画效果
[UIView animateWithDuration:0.2 animations:^{
[self.segBack layoutIfNeeded];
}];
}
-(void)playVideoTime:(CGFloat)time {
[self.playerView seekToTime:time completionHandler:^(BOOL finished) {
}];
}
- (void)setVideoModel:(DXHFXVideoModel *)videoModel{
_videoModel = videoModel;
_currentVideoList = videoModel.careVideoList;
DXHFXVideoDetailsModel *currM;
if(_currentVideoList.count > 0){
NSURL *proxyURL;
if ([self.selectedModel.class_type intValue] == 17) {
for (DXHFXVideoDetailsModel *model in _currentVideoList) {
if ([model.detail intValue] == [self.selectedModel.class_type intValue] - 1) {
proxyURL = [KTVHTTPCache proxyURLWithOriginalURL:[NSURL URLWithString:model.videoUrl]];
currM = model;
}
}
}else{
for (DXHFXVideoDetailsModel *model in _currentVideoList) {
if ([model.detail intValue] == [self.selectedModel.class_type intValue]) {
proxyURL = [KTVHTTPCache proxyURLWithOriginalURL:[NSURL URLWithString:model.videoUrl]];
currM = model;
}
}
}
// NSURL *proxyURL = [KTVHTTPCache proxyURLWithOriginalURL:[NSURL URLWithString:_currentVideoList[[self.selectedModel.class_type intValue] - 1].videoUrl]];
self.playerView.assetURL = proxyURL;
HJSelfWeak;
self.playerView.playerDidToEnd = ^(id _Nonnull asset) {
weakSelf.playerView.assetURL = proxyURL;
};
// if(_currentVideoList.count < 2){
// _allfaceBtn.hidden = YES;
// [_containerView mas_remakeConstraints:^(MASConstraintMaker *make) {
//
// make.width.equalTo(@(HJScreenWidth - 38));
// make.centerX.equalTo(self);
// make.height.equalTo(@((HJScreenWidth - 38) * 0.5625));
// make.top.equalTo(self.xdBtn.mas_bottom).offset(12*IPhone6ScaleHeight);
// }];
// [self layoutIfNeeded];
// _bottomlayer.frame = _bottomView.frame;
// }else{
// _allfaceBtn.hidden = YES;
// [_allfaceBtn setTitle:_currentVideoList[0].detail forState:UIControlStateNormal];
// }
[self setTimeLineWithString:currM.describeInfo];
self.playerView.playerPlayTimeChanged = ^(id<ZFPlayerMediaPlayback> _Nonnull asset, NSTimeInterval currentTime, NSTimeInterval duration) {
if (!weakSelf.progressBarView.timeArray) {
[weakSelf.progressBarView progressBarTimeArray:weakSelf.timeArray Totaltime:duration];
NSLog(@"当前播放时间=%f",currentTime);
}
weakSelf.progressBarView.playTime = currentTime;
};
}
}
- (NSMutableArray *)setTimeLineWithString:(NSString *)describeInfo{
self.timesBtnArray = [NSMutableArray array];
NSArray *itemTitleArray = [describeInfo componentsSeparatedByString:@","];
NSMutableArray *titleArray = [NSMutableArray array];
NSMutableArray *titleTimeArray = [NSMutableArray array];
NSMutableArray *timeArray = [NSMutableArray array];
NSMutableArray *stressArray = [NSMutableArray array];
for (int i = 0; i < itemTitleArray.count; i ++) {
NSArray *temparray = [itemTitleArray[i] componentsSeparatedByString:@":"];
[titleArray addObject:temparray[3]];
[titleTimeArray addObject:temparray[1]];
[timeArray addObject:temparray[2]];
[stressArray addObject:temparray[0]];
}
NSMutableArray *titleTimeArray1 = [NSMutableArray array];
for (__strong NSString *titleTime in titleTimeArray) {
if([titleTime intValue] < 60){
if (!titleTime || [titleTime isEqualToString:@""]) {
titleTime = @"";
// titleTime = [NSString stringWithFormat:@"%@s",titleTime];
}else{
titleTime = [NSString stringWithFormat:@"%@s",titleTime];
}
}else if([titleTime intValue] % 60 == 0){
titleTime = [NSString stringWithFormat:@"%dmins",[titleTime intValue] / 60];
}else{
titleTime = [NSString stringWithFormat:@"%dmins %ds",[titleTime intValue] / 60,[titleTime intValue] % 60];
}
[titleTimeArray1 addObject:titleTime];
}
self.progressBarView.timeArray = nil;
self.timeArray = timeArray;
if(itemTitleArray.count > 0){
_timeScrollView = [[UIScrollView alloc] init];
_timeScrollView.showsHorizontalScrollIndicator = NO;
UIView *contentView = [UIView new];
// [self insertSubview:_timeScrollView belowSubview:self.progressBarView];
[self addSubview:_timeScrollView];
[_timeScrollView addSubview:contentView];
[_timeScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.containerView.mas_bottom).offset(30*IPhone6ScaleHeight);
make.left.equalTo(@18);
make.right.equalTo(self);
make.height.equalTo(@(55*IPhone6ScaleHeight));
}];
[contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.timeScrollView);
make.height.mas_equalTo(self.timeScrollView);
}];
UIButton *lastBtn;
for (int i = 0; i < itemTitleArray.count; i ++) {
UIButton *timeItem = [UIButton buttonWithType:UIButtonTypeCustom];
[timeItem setBackgroundImage:[UIImage imageNamed:@"HFX_timeitemnomal"] forState:UIControlStateNormal];
[timeItem setBackgroundImage:[UIImage imageNamed:@"HFX_timeitemsel"] forState:UIControlStateSelected];
if (!titleTimeArray1[i] || [titleTimeArray1[i] isEqualToString:@""]) {
[timeItem setTitle:[NSString stringWithFormat:@"%@",titleArray[i]] forState:UIControlStateNormal];
}else{
// [timeItem setTitle:[NSString stringWithFormat:@" %@\n%@ | %@",stressArray[i],titleTimeArray1[i],titleArray[i]] forState:UIControlStateNormal];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@ | %@",stressArray[i],titleTimeArray1[i],titleArray[i]]];
// 创建段落样式并设置行间距
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:5]; // 行间距值(单位:磅)
[paragraphStyle setAlignment:NSTextAlignmentLeft]; // 文字居中(可选)
// 应用样式到整个文本范围
NSRange range = NSMakeRange(0, [[NSString stringWithFormat:@"%@\n%@ | %@",stressArray[i],titleTimeArray1[i],titleArray[i]] length]);
[attributedString addAttribute:NSParagraphStyleAttributeName
value:paragraphStyle
range:range];
// 设置文字颜色和字体(可选但推荐)
[attributedString addAttribute:NSForegroundColorAttributeName
value:XHColorRGB_Alpha(51, 51, 51, 0.6)
range:range];
[attributedString addAttribute:NSFontAttributeName
value:[UIFont systemFontOfSize:12]
range:range];
// 设置按钮的属性文本
[timeItem setAttributedTitle:attributedString forState:UIControlStateNormal];
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@ | %@",stressArray[i],titleTimeArray1[i],titleArray[i]]];
// 创建段落样式并设置行间距
NSMutableParagraphStyle *paragraphStyle1 = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle1 setLineSpacing:5]; // 行间距值(单位:磅)
[paragraphStyle1 setAlignment:NSTextAlignmentLeft]; // 文字居中(可选)
// 应用样式到整个文本范围
NSRange range1 = NSMakeRange(0, [[NSString stringWithFormat:@"%@\n%@ | %@",stressArray[i],titleTimeArray1[i],titleArray[i]] length]);
[attributedString1 addAttribute:NSParagraphStyleAttributeName
value:paragraphStyle1
range:range1];
// 设置文字颜色和字体(可选但推荐)
[attributedString1 addAttribute:NSForegroundColorAttributeName
value:XHColorRGB_Alpha(164, 47, 36, 1)
range:range1];
[attributedString1 addAttribute:NSFontAttributeName
value:[UIFont systemFontOfSize:12]
range:range1];
UIImage *icon = [UIImage imageNamed:@"dr_02_d_zb"]; // 替换为实际图片名
NSTextAttachment *attachment = [[NSTextAttachment alloc] init];
attachment.image = icon;
// 3. 调整图片大小(使其与文本匹配)
CGFloat fontSize = 12.0; // 匹配文本字体大小
attachment.bounds = CGRectMake(0, -4, 10, 14); // 垂直偏移微调
// 4. 将附件转为属性字符串
NSAttributedString *imageString = [NSAttributedString attributedStringWithAttachment:attachment];
// 5. 组合文本和图片(三种常见位置)
// 选项1: 图片在文字左侧
[attributedString1 insertAttributedString:imageString atIndex:0];
[attributedString1 insertAttributedString:[[NSAttributedString alloc] initWithString:@" "] atIndex:1]; // 添加空格
// 设置按钮的属性文本
[timeItem setAttributedTitle:attributedString1 forState:UIControlStateSelected];
}
timeItem.titleLabel.font = XHFontSize(12);
timeItem.titleLabel.numberOfLines = 0;
timeItem.titleLabel.lineBreakMode = NSLineBreakByCharWrapping;
timeItem.titleLabel.textAlignment = 0;
[timeItem addTarget:self action:@selector(changeViewPlayTime:) forControlEvents:UIControlEventTouchUpInside];
timeItem.tag = 96110 + [timeArray[i] integerValue];
[timeItem setTitleColor:XHColorRGB_Alpha(51, 51, 51, 0.6) forState:UIControlStateNormal];
[timeItem setTitleColor:XHColorRGB_Alpha(164, 47, 36, 1) forState:UIControlStateSelected];
// [timeItem setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
// [timeItem setImage:[UIImage imageNamed:@"dr_02_d_zb"] forState:UIControlStateSelected];
// [timeItem setImageEdgeInsets:UIEdgeInsetsMake(-10, 10, 0, 0)];
if(i == 0){
timeItem.selected = YES;
}
[self.timesBtnArray addObject:timeItem];
[contentView addSubview:timeItem];
[timeItem mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(contentView);
if(lastBtn){
make.left.equalTo(lastBtn.mas_right).offset(20);
}else{
make.left.equalTo(@0);
}
make.size.mas_equalTo(CGSizeMake(80, 45*IPhone6ScaleHeight));
}];
lastBtn = timeItem;
[contentView layoutIfNeeded];
CALayer*layer = [CALayer layer];
layer.frame = timeItem.frame;
layer.shadowColor= [UIColor blackColor].CGColor;
layer.shadowOffset = CGSizeMake(1,1);
layer.shadowOpacity = 0.08;
layer.cornerRadius = 8;
CGRect frame = timeItem.bounds;
frame.origin.x= frame.origin.x+5;//向左减 向右加
frame.origin.y= frame.origin.y+5;//向上减 向下加
frame.size.width= frame.size.width;//阴影的宽度
frame.size.height= frame.size.height;//阴影的高度
layer.shadowPath = [[UIBezierPath bezierPathWithRect:frame] CGPath ];
//这里self表示当前自定义的view
[contentView.layer insertSublayer:layer below:timeItem.layer];
UIButton *rightTopBtn = [UIButton buttonWithType:UIButtonTypeCustom];
// [rightTopBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[rightTopBtn setBackgroundImage:[UIImage imageNamed:@"dr_02_d_ysj"] forState:UIControlStateSelected];
[rightTopBtn setBackgroundImage:[self imageWithAlpha:0.5 image:[UIImage imageNamed:@"dr_02_d_ysj"]] forState:UIControlStateNormal];
[rightTopBtn setTitle:[NSString stringWithFormat:@"step%d",i+1] forState:UIControlStateNormal];
// [rightTopBtn addTarget:self action:@selector(changeViewPlayTime:) forControlEvents:UIControlEventTouchUpInside];
[rightTopBtn setTitleColor:[UIColor colorWithWhite:1 alpha:0.5] forState:UIControlStateNormal];
[rightTopBtn setTitleColor:[UIColor colorWithWhite:1 alpha:1] forState:UIControlStateSelected];
rightTopBtn.titleLabel.font = XHFontSize(7);
rightTopBtn.tag = 108;
[timeItem addSubview:rightTopBtn];
// [self.timesrightBtnArray addObject:rightTopBtn];
[rightTopBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-2);
make.top.equalTo(@2);
make.size.mas_equalTo(CGSizeMake(25, 11));
}];
if(i == 0){
rightTopBtn.selected = YES;
}
}
[contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(lastBtn.mas_right);
}];
[self layoutIfNeeded];
[_timeScrollView setContentSize:CGSizeMake(contentView.size.width, 0)];
_timeScrollView.alwaysBounceVertical = NO;
}
return timeArray;
}
- (UIImage *)imageWithAlpha:(CGFloat)alpha image:(UIImage *)image {
UIGraphicsBeginImageContextWithOptions(image.size, NO, 0.0f);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGRect area = CGRectMake(0, 0, image.size.width, image.size.height);
CGContextScaleCTM(ctx, 1, -1);
CGContextTranslateCTM(ctx, 0, -area.size.height);
CGContextSetBlendMode(ctx, kCGBlendModeMultiply);
CGContextSetAlpha(ctx, alpha);
CGContextDrawImage(ctx, area, image.CGImage);
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}
- (void)changeViewPlayTime:(UIButton *)sender{
// NSArray *stringUrlOne = [sender.titleLabel.text componentsSeparatedByString:@"s"];
// NSString *time = stringUrlOne[0];
[self.playerView seekToTime:sender.tag - 96110 completionHandler:^(BOOL finished) {
}];
for (UIButton *timeItem in self.timesBtnArray) {
if([timeItem isEqual:sender]){
timeItem.selected = YES;
((UIButton *)[timeItem viewWithTag:108]).selected = YES;
}else{
timeItem.selected = NO;
((UIButton *)[timeItem viewWithTag:108]).selected = NO;
}
}
// for (UIButton *rigItem in self.timesrightBtnArray) {
// if([rigItem isEqual:sender]){
// rigItem.selected = YES;
// }else{
// rigItem.selected = NO;
// }
// }
}
@end
//
// DXDRPlusTipsView.h
// DJMHomeTY
//
// Created by nana on 2025/5/19.
//
#import "XHParentView.h"
#import "ZFPlayer.h"
#import <ZFPlayer/ZFPlayerControlView.h>
#import <ZFPlayer/ZFAVPlayerManager.h>
#import "DXHFXVideoModel.h"
#import "DXDRPlusMoel.h"
NS_ASSUME_NONNULL_BEGIN
@protocol DXDRPlusTipsViewDelegate <NSObject>
- (void)startActionWithModel:(DXDRPlusSubModel *)model;
@end
@interface DXDRPlusTipsView : XHParentView
@property (nonatomic,weak) id <DXDRPlusTipsViewDelegate> delegate;
@property (nonatomic,strong) UIButton *volumeBtn;
@property (nonatomic,strong) ZFPlayerController *playerView;
@property (nonatomic, strong) DXDRPlusSubModel *selectedModel;
@property (nonatomic,strong) DXHFXVideoModel *videoModel;
@end
@interface DXDRPlusTipsCell : UITableViewCell
@property (nonatomic, strong) NSString *model;
@property (nonatomic, strong) UILabel *numberLabel;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *descriptionLabel;
@property (nonatomic, strong) UIImageView *illustrationImageView;
@property (nonatomic, strong) UIView *dashedLineView;
@property (nonatomic, strong) UILabel *numLb;
@property (nonatomic, strong) UIView *lineView;
@end
NS_ASSUME_NONNULL_END
//
// DXDRPlusTipsView.m
// DJMHomeTY
//
// Created by nana on 2025/5/19.
//
#import "DXDRPlusTipsView.h"
#import <KTVHTTPCache/KTVHTTPCache.h>
#import <Photos/Photos.h>
static NSString *dXDRPlusTipsCell = @"DXDRPlusTipsCell";
@interface DXDRPlusTipsView ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) ZFPlayerControlView *controlView;
@property (nonatomic,strong) UIView *containerView;
@property (nonatomic,strong) NSMutableArray <DXHFXVideoDetailsModel *>*currentVideoList;
@property (nonatomic,strong) UILabel *titleLb;
@property (nonatomic,strong) UILabel *tipsLb;
@property (nonatomic, strong) UITableView *tableView;
@end
@implementation DXDRPlusTipsView
- (instancetype)initWithFrame:(CGRect)frame{
if(self = [super initWithFrame:frame]){
[self initCache];
self.currentVideoList = [NSMutableArray array];
[self creatUI];
}
return self;
}
- (void)setSelectedModel:(DXDRPlusSubModel *)selectedModel{
_selectedModel = selectedModel;
_titleLb.text = selectedModel.preparation.descriptionplus;
if ([selectedModel.class_type integerValue] != 16) {
_tipsLb.text = selectedModel.preparation.steps.lastObject;
}
[self.tableView reloadData];
}
- (void)setVideoModel:(DXHFXVideoModel *)videoModel{
_videoModel = videoModel;
_currentVideoList = videoModel.careVideoList;
DXHFXVideoDetailsModel *currM;
if(_currentVideoList.count > 0){
NSURL *proxyURL;
for (DXHFXVideoDetailsModel *model in _currentVideoList) {
if ([model.detail intValue] == 18) {
proxyURL = [KTVHTTPCache proxyURLWithOriginalURL:[NSURL URLWithString:model.videoUrl]];
currM = model;
}
}
// NSURL *proxyURL = [KTVHTTPCache proxyURLWithOriginalURL:[NSURL URLWithString:_currentVideoList[[self.selectedModel.class_type intValue] - 1].videoUrl]];
self.playerView.assetURL = proxyURL;
HJSelfWeak;
self.playerView.playerDidToEnd = ^(id _Nonnull asset) {
weakSelf.playerView.assetURL = proxyURL;
};
}
}
- (void)initCache{
NSError *error = nil;
[KTVHTTPCache proxyStart:&error];
if (error) {
NSLog(@"Proxy Start Failure, %@", error);
}
// 设置缓存最大容量
long long maxLength = 300 * 1024 * 1024;
[KTVHTTPCache cacheSetMaxCacheLength:maxLength];
}
- (void)creatUI{
self.backgroundColor = XHColorRGB(255, 255, 255);
_containerView = [UIView new];
// _containerView.backgroundColor = [UIColor blueColor];
[self addSubview:_containerView];
[_containerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.equalTo(@(HJScreenWidth));
make.centerX.equalTo(self);
make.height.equalTo(@((HJScreenWidth) * 0.5625));
make.top.equalTo(self).offset(17*IPhone6ScaleHeight);
}];
_controlView = [ZFPlayerControlView new];
_controlView.fastViewAnimated = YES;
_controlView.autoHiddenTimeInterval = 5;
_controlView.autoFadeTimeInterval = 0.5;
// _controlView.prepareShowLoading = YES;
_controlView.prepareShowControlView = NO;
// _controlView.showCustomStatusBar = YES;
ZFAVPlayerManager *playerManager = [[ZFAVPlayerManager alloc] init];
playerManager.shouldAutoPlay = YES;
if([HJUserDefaults objectForKey:@"videoSwitchIsOn"]){
NSString *videoSwitchIsOn = [HJUserDefaults objectForKey:@"videoSwitchIsOn"];
if([videoSwitchIsOn isEqualToString:@"1"]){
playerManager.shouldAutoPlay = YES;
}else{
playerManager.shouldAutoPlay = NO;
}
}else{
playerManager.shouldAutoPlay = YES;
}
_playerView = [[ZFPlayerController alloc]initWithPlayerManager:playerManager containerView:_containerView];
self.playerView.controlView = self.controlView;
self.playerView.allowOrentitaionRotation = NO;
self.playerView.containerView.backgroundColor = [UIColor whiteColor];
self.playerView.currentPlayerManager.scalingMode = ZFPlayerScalingModeAspectFill;
self.playerView.pauseWhenAppResignActive = YES;
self.playerView.pauseByEvent = YES;
// self.playerView.shouldAutorotate = NO;
// NSString *URLString = @"https://www.apple.com.cn/105/media/cn/airpods-pro/2022/d2deeb8e-83eb-48ea-9721-f567cf0fffa8/films/under-the-spell/airpods-pro-under-the-spell-tpl-cn-2022_16x9.m3u8";
// NSString *URLString = @"https://media.w3.org/2010/05/sintel/trailer.mp4";
// NSString *URLString = @"http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4";
// NSString *URLString = @"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4";
// NSString *filePath = [[NSBundle mainBundle] pathForResource:@"huli" ofType:@"mp4"];
// NSURL *proxyURL = [[NSURL alloc]initWithString:URLString];
// NSURL *proxyURL = [KTVHTTPCache proxyURLWithOriginalURL:[NSURL URLWithString:_currentVideoList[0].videoUrl]];
// self.playerView.assetURL = proxyURL;
// HJSelfWeak;
// self.playerView.playerDidToEnd = ^(id _Nonnull asset) {
// weakSelf.playerView.assetURL = proxyURL;
// };
//
// self.playerView.playerPlayTimeChanged = ^(id<ZFPlayerMediaPlayback> _Nonnull asset, NSTimeInterval currentTime, NSTimeInterval duration) {
//// if (!weakSelf.progressBarView.timeArray) {
//// [weakSelf.progressBarView progressBarTimeArray:weakSelf.timeArray Totaltime:duration];
//// NSLog(@"当前播放时间=%f",currentTime);
//// }
////
//// weakSelf.progressBarView.playTime = currentTime;
// };
_volumeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_volumeBtn setImage:[UIImage imageNamed:@"HFX_novolume"] forState:UIControlStateNormal];
[_volumeBtn setImage:[UIImage imageNamed:@"HFX_volume"] forState:UIControlStateSelected];
_volumeBtn.backgroundColor = XHColorRGB_Alpha(0, 0, 0, 0.45);
[_volumeBtn addTarget:self action:@selector(changeVolume:) forControlEvents:UIControlEventTouchUpInside];
_volumeBtn.layer.cornerRadius = 16.f;
_volumeBtn.layer.masksToBounds = YES;
[_controlView addSubview:_volumeBtn];
[_volumeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.controlView);
make.right.equalTo(@-10);
make.size.mas_equalTo(CGSizeMake(32, 32));
}];
_titleLb = [UILabel new];
_titleLb.font = [UIFont boldSystemFontOfSize:18];
[self addSubview:_titleLb];
[_titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@16);
make.top.equalTo(self.containerView.mas_bottom).offset(25);
// make.top.equalTo(self).offset(17*IPhone6ScaleHeight);
}];
_tipsLb = [UILabel new];
_tipsLb.font = [UIFont systemFontOfSize:13];
_tipsLb.textColor = XHColorRGB(121, 121, 121);
_tipsLb.numberOfLines = 0;
[self addSubview:_tipsLb];
[_tipsLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.titleLb);
// make.top.equalTo(self.containerView.mas_bottom).offset(25);17*IPhone6ScaleHeight
make.top.equalTo(self.titleLb.mas_bottom).offset(5);
make.width.mas_lessThanOrEqualTo(HJScreenWidth - 32);
}];
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.rowHeight = 135;
[_tableView registerClass:[DXDRPlusTipsCell class] forCellReuseIdentifier:dXDRPlusTipsCell];
[self addSubview:_tableView];
[_tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self);
make.bottom.equalTo(@-70);
make.top.equalTo(self.tipsLb.mas_bottom).offset(20);
}];
UIButton *startButton = [UIButton buttonWithType:UIButtonTypeCustom];
// startButton.backgroundColor = [UIColor colorWithRed:0.83 green:0.13 blue:0.15 alpha:1];
[startButton setTitle:@"开始护理" forState:UIControlStateNormal];
[startButton setBackgroundImage:[UIImage imageNamed:@"dr02_d_startc"] forState:UIControlStateNormal];
startButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightBold];
// startButton.layer.cornerRadius = 25;
[startButton addTarget:self action:@selector(startAction:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:startButton];
[startButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self).offset(-20);
make.centerX.equalTo(self);
make.height.mas_equalTo(50);
make.width.equalTo(self).offset(-60);
}];
}
- (void)changeVolume:(UIButton *)sender{
sender.selected = !sender.selected;
self.playerView.currentPlayerManager.muted = !sender.selected;
if(sender.selected){
///不静音
[HJUserDefaults setObject:@"1" forKey:@"videoVolumeIsOn"];
}else{
//静音
[HJUserDefaults setObject:@"2" forKey:@"videoVolumeIsOn"];
}
}
- (void)startAction:(UIButton *)sender{
if (self.delegate && [self.delegate respondsToSelector:@selector(startActionWithModel:)]) {
[self.delegate startActionWithModel:self.selectedModel];
}
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if ([self.selectedModel.class_type integerValue] != 16) {
return self.selectedModel.preparation.steps.count - 1;
}else{
return self.selectedModel.preparation.steps.count;
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 0 || indexPath.row == 1) {
if ([self.selectedModel.class_type integerValue] != 16){
return 135;
}else{
return 90;
}
}else{
return 65;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
DXDRPlusTipsCell *cell = [tableView dequeueReusableCellWithIdentifier:dXDRPlusTipsCell forIndexPath:indexPath];
BOOL isFirst = indexPath.row == 0;
BOOL isLast = indexPath.row == self.selectedModel.preparation.steps.count - 1 - 1;
if ([self.selectedModel.class_type integerValue] != 16){
if (indexPath.row == 0) {
cell.illustrationImageView.image = [UIImage imageNamed:@"dr02_d_tipsmodel"];
}else if (indexPath.row == 1){
cell.illustrationImageView.image = [UIImage imageNamed:@"dr02_d_tipsmodel1"];
}else{
cell.lineView.hidden = YES;
cell.illustrationImageView.hidden = YES;
[cell.descriptionLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(cell.titleLabel);
make.top.equalTo(cell.titleLabel.mas_bottom).offset(10);
make.width.mas_lessThanOrEqualTo(320);
}];
}
}else{
cell.lineView.hidden = YES;
cell.illustrationImageView.hidden = YES;
[cell.descriptionLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(cell.titleLabel);
make.top.equalTo(cell.titleLabel.mas_bottom).offset(10);
make.width.mas_lessThanOrEqualTo(320);
}];
}
cell.numLb.text = [NSString stringWithFormat:@"%ld",indexPath.row + 1];
cell.model = self.selectedModel.preparation.steps[indexPath.row];
// [cell configureWithStep:self.selectedModel.preparation.steps[indexPath.row] isFirst:isFirst isLast:isLast];
return cell;
}
@end
@interface DXDRPlusTipsCell ()
@end
@implementation DXDRPlusTipsCell{
BOOL _isFirst;
BOOL _isLast;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self setupUI];
self.selectionStyle = UITableViewCellSelectionStyleNone;
}
return self;
}
- (void)setModel:(NSString *)model{
_model = model;
NSRange colonRange = [model rangeOfString:@":"];
if (colonRange.location != NSNotFound) {
NSString *stepNumber = [model substringToIndex:colonRange.location + 1]; // +1 包含冒号
NSString *content = [model substringFromIndex:colonRange.location + 1];
self.titleLabel.text = stepNumber;
self.descriptionLabel.text = content;
}
}
- (void)setupUI {
// 虚线视图
_dashedLineView = [UIView new];
[self.contentView addSubview:_dashedLineView];
// 编号圆圈
_numberLabel = [UILabel new];
_numberLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_numberLabel.textColor = [UIColor colorWithRed:0.831 green:0.125 blue:0.149 alpha:1];
_numberLabel.textAlignment = NSTextAlignmentCenter;
_numberLabel.layer.cornerRadius = 10;
_numberLabel.layer.borderWidth = 1;
_numberLabel.layer.borderColor = [UIColor colorWithRed:0.831 green:0.125 blue:0.149 alpha:1].CGColor;
_numberLabel.clipsToBounds = YES;
[self.contentView addSubview:_numberLabel];
_numLb = [UILabel new];
_numLb.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_numLb.textColor = [UIColor whiteColor];
_numLb.backgroundColor = XHColorRGB(197, 56, 51);
_numLb.textAlignment = NSTextAlignmentCenter;
_numLb.layer.cornerRadius = 8;
_numLb.clipsToBounds = YES;
[self.contentView addSubview:_numLb];
_lineView = [UIView new];
_lineView.backgroundColor = XHColorRGB(197, 56, 51);
_lineView.layer.cornerRadius = 2.f;
[self.contentView addSubview:_lineView];
// 标题
_titleLabel = [UILabel new];
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
_titleLabel.textColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1];
_titleLabel.numberOfLines = 0;
[self.contentView addSubview:_titleLabel];
// 描述
_descriptionLabel = [UILabel new];
_descriptionLabel.font = [UIFont systemFontOfSize:14];
_descriptionLabel.textColor = [UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:1];
_descriptionLabel.numberOfLines = 0;
[self.contentView addSubview:_descriptionLabel];
// 插图
_illustrationImageView = [UIImageView new];
_illustrationImageView.image = [UIImage imageNamed:@"dr02_d_tipsmodel"];
_illustrationImageView.contentMode = UIViewContentModeScaleAspectFit;
[self.contentView addSubview:_illustrationImageView];
// Masonry布局
[_dashedLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentView).offset(25);
make.top.bottom.equalTo(self.contentView);
make.width.mas_equalTo(1);
}];
[_numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(_dashedLineView);
make.top.equalTo(self.contentView).offset(12);
make.width.height.mas_equalTo(20);
}];
[_numLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(self.numberLabel);
make.size.mas_equalTo(CGSizeMake(16, 16));
}];
[_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.numberLabel.mas_right).offset(15);
make.centerY.equalTo(_numberLabel);
// make.right.lessThanOrEqualTo(_illustrationImageView.mas_left).offset(-16);
}];
[_illustrationImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.titleLabel).offset(-5);
make.top.equalTo(self.titleLabel.mas_bottom).offset(20);
make.size.mas_equalTo(CGSizeMake(60, 76));
// make.width.mas_equalTo(60);
// make.height.mas_equalTo(60);
}];
[_descriptionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(_illustrationImageView.mas_right).offset(15);
make.top.equalTo(_illustrationImageView);
make.width.mas_lessThanOrEqualTo(250);
}];
[_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(_illustrationImageView.mas_right).offset(8);
make.top.equalTo(_illustrationImageView);
make.size.mas_equalTo(CGSizeMake(4, 15));
}];
}
- (void)layoutSubviews {
[super layoutSubviews];
[self updateDashedLine];
}
- (void)updateDashedLine {
CAShapeLayer *shapeLayer = (CAShapeLayer *)_dashedLineView.layer.sublayers.firstObject;
if (!shapeLayer) {
shapeLayer = [CAShapeLayer layer];
shapeLayer.strokeColor = [UIColor colorWithRed:0.831 green:0.125 blue:0.149 alpha:1].CGColor;
shapeLayer.lineWidth = 1;
shapeLayer.lineDashPattern = @[@4, @4];
[_dashedLineView.layer addSublayer:shapeLayer];
}
UIBezierPath *path = [UIBezierPath bezierPath];
CGFloat startY = 0;
CGFloat endY = CGRectGetHeight(_dashedLineView.bounds);
// 转换坐标到虚线视图
CGRect numberRect = [_dashedLineView convertRect:_numberLabel.frame fromView:self.contentView];
CGFloat numberCenterY = CGRectGetMidY(numberRect);
if (_isFirst) {
startY = numberCenterY;
}
if (_isLast) {
endY = numberCenterY;
}
[path moveToPoint:CGPointMake(0, startY)];
[path addLineToPoint:CGPointMake(0, endY)];
shapeLayer.path = path.CGPath;
}
@end
......@@ -398,11 +398,22 @@
make.bottom.equalTo(_nlSlider.mas_top).offset(-10);
}];
NSArray *array11 = @[@"水电泳",@"模式 M",@"模式 M3",@"模式 M6",@"预留波形"];
for (int i = 0; i<5; i++) {
UIScrollView *scrollView = [[UIScrollView alloc] init];
scrollView.showsHorizontalScrollIndicator = NO;
[self addSubview:scrollView];
[scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.xdBtn.mas_bottom).offset(30*IPhone6ScaleHeight);
make.height.mas_equalTo(30);
make.left.mas_equalTo(20);
make.right.mas_equalTo(-40);
}];
NSArray *array11 = @[@"模式 M",@"模式 M3",@"模式 M6",@"水电泳",@"EPT",@"SNE",@"MAS"];
for (int i = 0; i<7; i++) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setTitle:[NSString stringWithFormat:@" %@ ",[array11 objectAtIndex:i]] forState:UIControlStateNormal];
if (i == 0) {
if (i == 3) {
[button setBackgroundColor:XHColorRGB(175, 44, 35)];
button.selected = YES;
self.selectButton = button;
......@@ -418,23 +429,26 @@
button.titleLabel.font = [UIFont systemFontOfSize:13];
button.layer.borderColor = XHColorRGB(175, 44, 35).CGColor;
[button addTarget:self action:@selector(selectModelType:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
[scrollView addSubview:button];
if (i == 0) {
[button mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(20);
make.top.equalTo(self.xdBtn.mas_bottom).offset(30*IPhone6ScaleHeight);
make.left.mas_equalTo(0);
make.top.equalTo(@0);
make.height.mas_equalTo(30);
}];
}else {
[button mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.nextButton.mas_right).offset(15);
make.top.equalTo(self.xdBtn.mas_bottom).offset(30*IPhone6ScaleHeight);
make.top.equalTo(@0);
make.height.mas_equalTo(30);
}];
}
self.nextButton = button;
}
[self layoutIfNeeded];
[scrollView setContentSize:CGSizeMake(self.nextButton.right, 0)];
_timeImg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"HFX_time"]];
[bottomView addSubview:_timeImg];
......
......@@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
-(void)startBtnAction:(UIButton*)sender;
-(void)addOrDecAction:(UIButton*)sender;
-(void)clearAction:(UIButton*)sender;
@end
@interface XHDRView : XHParentView
@property (nonatomic,assign) id<XHDRViewDelegate> delegate;
......@@ -22,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
//温度显示
@property(nonatomic,strong)UIImageView *tempratureImg;
@property(nonatomic,strong)UILabel *tempratureLb;
@property (nonatomic,strong) UIButton *clearTimeBtn;
@property(nonatomic,strong)UILabel *usedTimeLb;
@end
NS_ASSUME_NONNULL_END
......@@ -59,7 +59,7 @@
UIImageView *deviceImg = [UIImageView myUIImageViewSuperView:self withImageName:@"Ps2_Device_Img"];
[deviceImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb.mas_bottom).offset(97*IPhone6ScaleHeight);
make.top.mas_equalTo(strengthLb.mas_bottom).offset(57*IPhone6ScaleHeight);
make.centerX.mas_equalTo(self);
}];
......@@ -78,6 +78,20 @@
}];
self.startBtn = startBtn;
_clearTimeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_clearTimeBtn setBackgroundImage:[UIImage imageNamed:@"dr01_stop"] forState:UIControlStateNormal];
[_clearTimeBtn addTarget:self action:@selector(clearTimeAction:) forControlEvents:UIControlEventTouchUpInside];
// _clearTimeBtn.tag = ItemClearTime;
[self addSubview:_clearTimeBtn];
[_clearTimeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-35);
make.centerY.equalTo(self.startBtn);
make.size.mas_equalTo(CGSizeMake(44, 44));
}];
UILabel *timeLb = [UILabel myUILabelSuperView:self withNSTextAlignment:NSTextAlignmentLeft withContent:HJLocalizedString(HJLocalizedString(@"00:00:00")) withFont:XHFontSizeBold(27) withTextColor:XHBtnTextColor withResize:true];
[timeLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
......@@ -85,6 +99,17 @@
make.height.mas_equalTo(30*IPhone6ScaleHeight);
}];
self.operationTimeLb = timeLb;
UILabel *usedTimeLb = [UILabel myUILabelSuperView:self withNSTextAlignment:NSTextAlignmentCenter withContent:HJLocalizedString(@"") withFont:XHFontSize(16) withTextColor:XHTextFieldTextPlaceholderColor withResize:true];
[usedTimeLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.operationTimeLb);
make.bottom.equalTo(self.operationTimeLb.mas_top).offset(-10);
}];
self.usedTimeLb = usedTimeLb;
self.usedTimeLb.hidden = YES;
}
-(void)addOrDecreceBtnAction:(UIButton*)sender{
if ([self.delegate respondsToSelector:@selector(addOrDecAction:)]){
......@@ -96,4 +121,9 @@
[self.delegate startBtnAction:sender];
}
}
- (void)clearTimeAction:(UIButton *)sender{
if ([self.delegate respondsToSelector:@selector(clearAction:)]){
[self.delegate clearAction:sender];
}
}
@end
......@@ -13,6 +13,7 @@
#import "DXHFXVC.h"
#import "DXBannerVC.h"
#import "DXHotElectricVC.h"
#import "DXDRPlusVC.h"
#import "DXAddBannerVC.h"
#import "XHUINavigationController.h"
static NSString *dxmachineCell = @"DXDeviceListCell";
......@@ -229,6 +230,12 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
}
-(void)initDataDr02{//Dr水滴
NSArray *arr = @[
@{@"DeviceType":@"Dr.水滴高光仪 2.0",
@"DeviceCode":@"Dr-02-D",
@"DeviceId":@"Dr-02-D",
@"imgName":@"dr_02_d_icon",
@"tag":@(DR02DBtnTag)
},
@{@"DeviceType":HJLocalizedString(@"Dr.水滴高光仪"),
@"DeviceCode":Dr02DeviceName,
@"DeviceId":@"LS01",
......@@ -240,13 +247,14 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
@"DeviceId":@"Dr-04",
@"imgName":@"DXDr_HFX",
@"tag":@(DR04BtnTag)
},
}
// @{@"DeviceType":@"Dr.热电仪",
// @"DeviceCode":@"Dr-05",
// @"DeviceId":@"Dr-05",
// @"imgName":@"DXDr_HFX",
// @"tag":@(DR05BtnTag)
// }
// },
];
self.dataArr = [XHDeviceListModel mj_objectArrayWithKeyValuesArray:arr];
[self.myTabView reloadData];
......@@ -259,9 +267,9 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
@"imgName":@"DR_DeviceListCellBgImg",
@"tag":@(D3BtnTag)
},
@{@"DeviceType":HJLocalizedString(@"高光水滴仪"),
@{@"DeviceType":HJLocalizedString(@"时光机"),
@"DeviceCode":DrDeviceDr02BName,
@"DeviceId":@"Dr-02-B",
@"DeviceId":@"K9",
@"imgName":@"Dr02BListImg",
@"tag":@(DM1BtnTag)
}
......@@ -333,7 +341,8 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
XHGetDataManager.isFirstInto =false;
break;
case 5:
self.myVCArr = @[[[DXHFXVC alloc]init],[[XHMainVC1 alloc]init],[[DXHotElectricVC alloc]init]];
// self.myVCArr = @[[[DXHFXVC alloc]init],[[XHMainVC1 alloc]init],[[DXHotElectricVC alloc]init],[[DXDRPlusVC alloc]init]];
self.myVCArr = @[[[DXDRPlusVC alloc]init],[[DXHFXVC alloc]init],[[XHMainVC1 alloc]init]];
break;
default:
break;
......@@ -352,7 +361,8 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
switch (TargetType) {
case 1:
case 5:
self.myVCArr = @[[[XHMainVC1 alloc]init],[[DXHFXVC alloc]init],[[DXHotElectricVC alloc]init]];
// self.myVCArr = @[[[XHMainVC1 alloc]init],[[DXHFXVC alloc]init],[[DXHotElectricVC alloc]init],[[DXDRPlusVC alloc]init]];
self.myVCArr = @[[[XHMainVC1 alloc]init],[[DXHFXVC alloc]init],[[DXDRPlusVC alloc]init]];
break;
case 4:
self.myVCArr = @[[[XHDRVC alloc]init],[[XHMainVC1 alloc]init]];
......@@ -374,6 +384,10 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
DXHotElectricVC *hfxvc = [[DXHotElectricVC alloc]init];
hfxvc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:hfxvc animated:false];
}else if ([VC isKindOfClass:[DXDRPlusVC class]]) {
DXDRPlusVC *hfxvc = [[DXDRPlusVC alloc]init];
hfxvc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:hfxvc animated:false];
}
else{
[self.navigationController pushViewController:VC animated:false];
......
......@@ -149,9 +149,9 @@ static NSString *machineCell = @"XHDeviceListCell";
@"imgName":@"DR_DeviceListCellBgImg",
@"tag":@(D3BtnTag)
},
@{@"DeviceType":HJLocalizedString(@"高光水滴仪"),
@{@"DeviceType":HJLocalizedString(@"时光机"),
@"DeviceCode":DrDeviceDr02BName,
@"DeviceId":@"Dr-02-B",
@"DeviceId":@"K9",
@"imgName":@"Dr02BListImg",
@"tag":@(DM1BtnTag)
}
......
......@@ -14,7 +14,7 @@
@property (nonatomic,strong) UILabel *titleIdLb;
@property (nonatomic,strong) UIImageView *deviceImg;
@property (nonatomic,strong) UIImageView *bgImg;
@property (nonatomic,strong) UIImageView *rightImg;
@end
......@@ -46,12 +46,20 @@
// self.layer.shadowOpacity = .3f;
// self.contentView.layer.cornerRadius = 10.0f;
UIImageView *rightImg = [UIImageView myUIImageViewSuperView:self.contentView withImageName:@"dr_02_d_new_icon"];
[rightImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.equalTo(bgImg).offset(15);
make.height.mas_equalTo(70*IPhone6ScaleWidth);
make.width.mas_equalTo(70*IPhone6ScaleWidth);
}];
self.rightImg = rightImg;
self.rightImg.hidden = YES;
UIImageView *DeviceImg = [UIImageView myUIImageViewSuperView:self.contentView withImageName:@""];
[DeviceImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self);
make.left.mas_equalTo(self).offset(57*IPhone6ScaleWidth);
// make.height.mas_equalTo(97*IPhone6ScaleWidth);
// make.width.mas_equalTo(97*IPhone6ScaleWidth);
make.height.mas_equalTo(97*IPhone6ScaleWidth);
make.width.mas_equalTo(97*IPhone6ScaleWidth);
}];
self.deviceImg = DeviceImg;
......@@ -133,6 +141,9 @@
self.titleLb.text = model.DeviceType;
self.titleIdLb.text = model.DeviceCode;
self.deviceImg.image = [UIImage imageNamed:model.imgName];
if (model.tag == DR02DBtnTag) {
self.rightImg.hidden = NO;
}
}
@end
......@@ -49,10 +49,14 @@
@property (nonatomic,strong) NSTimer *timer;
/// 总时间
@property (nonatomic,assign) NSInteger totalTime;
/// 子时间
@property (nonatomic,assign) NSInteger subtotalTime;
/// 运行时间
@property (nonatomic,assign) NSInteger runningTime;
/// 记录运行时间
@property (nonatomic,assign) NSInteger recordTime;
/// 子记录运行时间
@property (nonatomic,assign) NSInteger subrecordTime;
//3M强度
@property (nonatomic,assign) NSInteger set3MStrengthNum;
//10M强度
......@@ -80,17 +84,41 @@
#pragma mark - ==========懒加载==========
-(NSArray *)programArr{
if (_programArr == nil) {
//0/3/4/5/7
// _programArr = @[
// @[@{@"totaltimes":@720,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
// @[@{@"totaltimes":@1440,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@5,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@3}],
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@10,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@8}],
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@5,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@5}],
// @[@{@"totaltimes":@1440,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@5,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@5}]
// ];
// _programArr = @[
// @[@{@"totaltimes":@720,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],//眼部护理
//
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],//轮廓清晰
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],//面部饱满
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@5,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@3}],// 褪红舒敏
//
// @[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@10,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@8}]// 嫩滑提亮
_programArr = @[
@[@{@"totaltimes":@720,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
@[@{@"totaltimes":@1440,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@5,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@3}],
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@20,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@10,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@8}],
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@5,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@5}],
@[@{@"totaltimes":@1440,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@5,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@5}]
@[@{@"totaltimes":@720,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@10,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@0}],//眼部护理
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],//轮廓清晰
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@10,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@10}],//面部饱满
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@5,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@5}],// 褪红舒敏
@[@{@"totaltimes":@1080,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],// 嫩滑提亮
@[@{@"totaltimes":@1200,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@10,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@10}],// 关节淡化
@[@{@"totaltimes":@1800,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}],// 身体塑形
@[@{@"totaltimes":@1800,@"10MTimes":@3,@"10MEnergy":@7,@"10MTakt":@15,@"3MTimes":@3,@"3MEnergy":@3,@"3MTakt":@15}]// 身体淡纹
];
}
return _programArr;
......@@ -106,7 +134,7 @@
if (TargetType != 5) {
if(TargetType == 4){
XHGetDataManager.deviceCode = DrDeviceDr02BName;
self.title = @"Dr-02-B";
self.title = @"K9";
}else{
NSArray *arr = @[TYDeviceName,PS2DeviceName,@"",DrDeviceFacialName,Dr02DeviceName,PS2DeviceName];
XHGetDataManager.deviceCode = arr[TargetType-1];
......@@ -147,6 +175,16 @@
if(self.topTitleBtn.hidden == true){
self.topTitleBtn.hidden = false;
}
// if ([XHGetDataManager.deviceCode isEqualToString:@"K9"]) {
//
// self.topTitleBtn.hidden = true;
//
// }else{
// if(self.topTitleBtn.hidden == true){
// self.topTitleBtn.hidden = false;
// }
// }
}
}
......@@ -227,6 +265,15 @@
weakSelf.myCustomView.hidden = false;
weakSelf.mySmartView.hidden = true;
weakSelf.myNoconnectView.hidden = true;
// if ([XHGetDataManager.deviceCode isEqualToString:@"K9"]) {
// weakSelf.mySwitchModelBtn.hidden = true;
// weakSelf.topTitleBtn.hidden = true;
// weakSelf.titLb.hidden = true;
// }else{
// weakSelf.mySwitchModelBtn.hidden = false;
// weakSelf.topTitleBtn.hidden = false;
// weakSelf.titLb.hidden = false;
// }
}
[weakSelf setNavState:false];
......@@ -244,6 +291,15 @@
weakSelf.mySwitchModelBtn.hidden = true;
weakSelf.topTitleBtn.hidden = true;
}
// if ([XHGetDataManager.deviceCode isEqualToString:@"K9"]) {
// weakSelf.mySwitchModelBtn.hidden = true;
// weakSelf.topTitleBtn.hidden = true;
// weakSelf.titLb.hidden = true;
// }else{
// weakSelf.mySwitchModelBtn.hidden = false;
// weakSelf.topTitleBtn.hidden = false;
// weakSelf.titLb.hidden = false;
// }
}
}
......@@ -272,11 +328,16 @@
self.titLb = [UILabel myUILabelSuperView:self.view withNSTextAlignment:NSTextAlignmentCenter withContent:state?HJLocalizedString(@"自定义模式"):HJLocalizedString(@"智能模式") withFont:XHFontSize(12) withTextColor:XHColorHex(0x939393) withResize:true];
[self.titLb mas_makeConstraints:^(MASConstraintMaker *make) {
if(state){
make.centerX.mas_equalTo(self.view.centerX).offset(-12*IPhone6ScaleWidth);
if ([XHGetDataManager.deviceCode isEqualToString:@"K9"]) {
make.centerX.mas_equalTo(self.view.centerX).offset(-12*IPhone6ScaleWidth);
}else{
make.centerX.mas_equalTo(self.view.centerX).offset(-12*IPhone6ScaleWidth);
}
}else{
make.centerX.mas_equalTo(self.view.centerX).offset(-7*IPhone6ScaleWidth);
}
make.top.mas_equalTo(self.view.mas_top).offset(HJNavHeight-12);
make.top.mas_equalTo(self.view.mas_top).offset(HJNavHeight + 10);
}];
UIButton *mySwitchModelBtn = [UIButton myUIButtonSuperView:self.view withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(SwitchModelBtn:) withTag:10000 withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
......@@ -296,11 +357,12 @@
self.titLb.hidden = true;
self.mySwitchModelBtn.hidden = true;
self.mySwitchModelBtn.enabled = false;
// self.mySwitchModelBtn.enabled = false;
UIButton *SwitchModelBtn = [UIButton myUIButtonSuperView:self.navigationController.navigationBar withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(SwitchModelBtn:) withTag:100000 withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
[SwitchModelBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.centerX.mas_equalTo(self.navigationController.navigationBar);
// make.centerY.centerX.mas_equalTo(self.titLb);
make.height.mas_equalTo(64*IPhone6ScaleHeight);
make.width.mas_equalTo(CGSizeMake(self.titLb.width+25*IPhone6ScaleWidth, 64*IPhone6ScaleHeight));
}];
......@@ -330,6 +392,7 @@
}];
self.mySwitchModelBtn = mySwitchModelBtn;
self.mySwitchModelBtn.selected = true;
// self.mySwitchModelBtn.selected = false;
self.titLb.hidden = true;
self.mySwitchModelBtn.hidden = true;
}
......@@ -356,6 +419,12 @@
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
}
-(void)SwitchModelBtn:(UIButton*)sender{
// self.myCustomView.strengthLb1.text = _s3MStrengthNum==0?@"0":[NSString stringWithFormat:@"%.f",_s3MStrengthNum];
// self.myCustomView.strengthLb2.text = _s10MStrengthNum==0?@"0":[NSString stringWithFormat:@"%.f",_s10MStrengthNum];
self.subrecordTime = 0;
self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
self.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
self.myCustomView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
if(!self.isStartted){
NSLog(@"=-==-:%d",sender.selected);
[self hideAutoOrCustomView:sender.selected];
......@@ -375,8 +444,59 @@
[self initMyData:sender.selected];
}
}else{
[self showError:HJLocalizedString(@"当前模式正在进行中,请结束后再切换模式!")];
// [self showError:HJLocalizedString(@"当前模式正在进行中,请结束后再切换模式!")];
if (self.remaintime>0) {
if (self.isStart) {
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"06000B31020200"] withCrc16Modbus]];//暂停
[self hideAutoOrCustomView:sender.selected];
self.titLb.text = sender.selected?HJLocalizedString(@"自定义模式"):HJLocalizedString(@"智能模式");
[self.titLb mas_updateConstraints:^(MASConstraintMaker *make) {
if(!sender.selected){
make.centerX.mas_equalTo(self.view.centerX).offset(-12*IPhone6ScaleWidth);
}else{
// make.centerX.mas_equalTo(self.view.centerX).offset(-7*IPhone6ScaleWidth);
make.centerX.mas_equalTo(self.view.centerX).offset(-10*IPhone6ScaleWidth);
}
}];
sender.selected = !sender.selected;
XHGetDataManager.isOrNotOutoModel = !sender.selected;
NSLog(@"=-=-:%d",XHGetDataManager.isOrNotOutoModel);
if (sender.selected) {//自定义模式
[self initMyData:sender.selected];
}
}else{
[self hideAutoOrCustomView:sender.selected];
self.titLb.text = sender.selected?HJLocalizedString(@"自定义模式"):HJLocalizedString(@"智能模式");
[self.titLb mas_updateConstraints:^(MASConstraintMaker *make) {
if(!sender.selected){
make.centerX.mas_equalTo(self.view.centerX).offset(-12*IPhone6ScaleWidth);
}else{
// make.centerX.mas_equalTo(self.view.centerX).offset(-7*IPhone6ScaleWidth);
make.centerX.mas_equalTo(self.view.centerX).offset(-10*IPhone6ScaleWidth);
}
}];
sender.selected = !sender.selected;
XHGetDataManager.isOrNotOutoModel = !sender.selected;
NSLog(@"=-=-:%d",XHGetDataManager.isOrNotOutoModel);
if (sender.selected) {//自定义模式
[self initMyData:sender.selected];
}
}
}else{
// HJSelfWeak;
// [self getUseTimes:^(BOOL getTimesSuccessful) {
// HJSelfStrong;
// if(getTimesSuccessful == false){
// [strongSelf deviceValidTime];
// }
// }];
}
}
[self initMyData:sender.selected];
}
#pragma mark UI 显示ModelVie
-(void)showModelView{
......@@ -384,28 +504,89 @@
self.mySelectModelView.selectModelIIndex = self.modelSelectindex;
[self.view addSubview:self.mySelectModelView];
HJSelfWeak;
// __block NSInteger tag = 0;
__block NSInteger index = weakSelf.modelSelectindex;
self.mySelectModelView.sendModelBlock = ^(UIButton * _Nonnull sender) {
if(sender.tag!=Home_SelectModelSureBtntag){
weakSelf.modelSelectindex = sender.tag-Home_SelectModel1Btntag;
// tag = 1;
if (sender.tag != Home_SelectModelSureBtntag) {
index = sender.tag-Home_SelectModel1Btntag;
NSLog(@"");
}else{
[weakSelf.mySelectModelView dismissAlert];
[weakSelf updateUI];
if (index == weakSelf.modelSelectindex) {
if (index == 0 && self.subrecordTime == 0) {
weakSelf.modelSelectindex = index;
weakSelf.subrecordTime = 0;
[weakSelf.mySelectModelView dismissAlert];
[weakSelf updateUI];
}else{
[weakSelf.mySelectModelView dismissAlert];
}
}else{
weakSelf.modelSelectindex = index;
weakSelf.subrecordTime = 0;
[weakSelf.mySelectModelView dismissAlert];
[weakSelf updateUI];
}
}
// if(sender.tag!=Home_SelectModelSureBtntag){
// weakSelf.modelSelectindex = sender.tag-Home_SelectModel1Btntag;
// NSLog(@"");
// }else{
// if (weakSelf.modelSelectindex != sender.tag - Home_SelectModel1Btntag) {
// weakSelf.subrecordTime = 0;
// }
//
// [weakSelf.mySelectModelView dismissAlert];
// [weakSelf updateUI];
// }
};
}
-(void)updateUI{
__block XHMainVC1 *mainVC = self;
mainVC.mySmartView.SelectModeOrNot = true;
mainVC.mySmartView.seletModelIndex = self.modelSelectindex;
mainVC.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:[mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue]];
mainVC.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
mainVC.totalTime = [mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue];
mainVC.subtotalTime = [mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue];
// mainVC.set3MStrengthNum = [mainVC.programArr[mainVC.modelSelectindex][0][@"3MTakt"] integerValue];
mainVC.set3MStrengthNum = 0;
mainVC.set3MStrengthNum = [mainVC.programArr[mainVC.modelSelectindex][0][@"3MTakt"] integerValue];
// mainVC.set3MStrengthNum = 0;
mainVC.set10MStrengthNum = [mainVC.programArr[mainVC.modelSelectindex][0][@"10MTakt"] integerValue];
if (self.modelSelectindex == 5 || self.modelSelectindex == 6 || self.modelSelectindex == 7) {
if (self.modelSelectindex == 5) {
self.mySmartView.faceImage.image = [UIImage imageNamed:@"k9_gj"];
}else if (self.modelSelectindex == 6){
self.mySmartView.faceImage.image = [UIImage imageNamed:@"k9_sx"];
}else if (self.modelSelectindex == 7){
self.mySmartView.faceImage.image = [UIImage imageNamed:@"k9_dw"];
}
mainVC.mySmartView.centerLine.hidden = YES;
mainVC.mySmartView.operationItemLb.text = HJLocalizedString(@"");
[mainVC.mySmartView.operationTimeLb mas_remakeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(mainVC.mySmartView.faceImage.mas_top).offset(-20*IPhone6ScaleHeight);
make.centerX.mas_equalTo(mainVC.mySmartView.SelectModelView);
}];
}else{
self.mySmartView.faceImage.image = [UIImage imageNamed:@"Home_Face"];
mainVC.mySmartView.centerLine.hidden = NO;
mainVC.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
[mainVC.mySmartView.operationTimeLb mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(mainVC.mySmartView.centerLine.mas_right).offset(10*IPhone6ScaleWidth);
make.centerY.mas_equalTo(mainVC.mySmartView.centerLine);
make.height.mas_equalTo(mainVC.mySmartView.centerLine);
}];
}
//20230608向上取整取结果
if(TargetType ==5 ||TargetType == 4){
if([XHGetDataManager.deviceCode isEqual:Dr021DeviceName]||[XHGetDataManager.deviceCode isEqual:Dr02DeviceName]||[XHGetDataManager.deviceCode isEqual:Dr022DeviceName]||[XHGetDataManager.deviceCode isEqual:DrDeviceDr02BName]){
......@@ -446,10 +627,11 @@
}
if (sender.tag ==Home_SelectPlanBtnTag) {
if(self.isStartted){//方案已经开始不能切换
[self showError:HJLocalizedString(@"请结束当前方案后再切换")];
return;
}
// if(self.isStartted){//方案已经开始不能切换
// [self showError:HJLocalizedString(@"请结束当前方案后再切换")];
// return;
// }
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"06000B31020200"] withCrc16Modbus]];//暂停
[self showModelView];
}else if (sender.tag ==Home_customSetFrequecytBtnTag){
[self showCustomView];
......@@ -507,13 +689,24 @@
self.runningTime = 0;
self.recordTime = 0;
self.remaintime = 0;
self.subrecordTime = 0;
self.subtotalTime = 0;
if(XHGetDataManager.isOrNotOutoModel){
self.myCustomView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
self.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
self.myCustomView.endedBtn.hidden = true;
self.mySmartView.endedBtn.hidden = true;
}else{
self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
if (self.modelSelectindex != 5 && self.modelSelectindex != 6 && self.modelSelectindex != 7) {
self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
}
self.mySmartView.endedBtn.hidden = true;
self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
self.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
self.myCustomView.endedBtn.hidden = true;
self.mySmartView.endedBtn.hidden = true;
self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
}
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"06000B31020200"] withCrc16Modbus]];//暂停
[self stopAction];
......@@ -823,9 +1016,20 @@
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.02 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(weakSelf.titLb.hidden){
weakSelf.titLb.hidden = false;
// weakSelf.titLb.hidden = false;
// if ([XHGetDataManager.deviceCode isEqualToString:@"K9"]) {
// weakSelf.mySwitchModelBtn.hidden = true;
// weakSelf.topTitleBtn.hidden = true;
// weakSelf.titLb.hidden = true;
// }else{
// weakSelf.mySwitchModelBtn.hidden = false;
// weakSelf.topTitleBtn.hidden = false;
// weakSelf.titLb.hidden = false;
// }
weakSelf.mySwitchModelBtn.hidden = false;
weakSelf.topTitleBtn.hidden = false;
weakSelf.titLb.hidden = false;
}
//获取手柄连接状态
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"05000B330252"] withCrc16Modbus]];
......@@ -1300,7 +1504,7 @@
[paramsDic setObject:@"test" forKey:@"ordernumber"];
[paramsDic setObject:[NSString isNull:self.dataModel.orderMap.verification]?@"0":self.dataModel.orderMap.verification forKey:@"ordernumber"];
// [paramsDic setObject:XHGetDataManager.clientId forKey:@"customerID"];
[paramsDic setObject:self.guestureId forKey:@"cid"];
[paramsDic setObject:self.guestureId?self.guestureId:@"0" forKey:@"cid"];
[paramsDic setObject:[NSString isNull:self.verificationNum]?@"0":self.verificationNum forKey:@"number"];
NSLog(@"=-=-=---=-=-=-=paramsDicparamsDicparamsDic2:%@",updateDic);
[HJUserDefaults setObject:paramsDic forKey:@"updateDictyTYLDM"];
......@@ -1352,6 +1556,7 @@
}
}else{
self.myCustomView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
[SVProgressHUD showInfoWithStatus:@"护理已结束"];
[self updateLDMRecord];
#pragma mark RequirementChangeRecord_h
self.myCustomView.endedBtn.hidden = true;
......@@ -1365,48 +1570,123 @@
}
}else{
if(self.totalTime-self.recordTime>0){
self.runningTime++;
self.recordTime++;
if(self.recordTime%20==0){
[self saveLocationRecord];
}
if(self.recordTime%3==0){
/// 工作提示音
[self playSoundEffect:@"working.wav"];
}
if(self.runningTime>=1){
if(self.runningTime==1){//10M 3min钟
[self upenergyLbMixOrNot:0];
}else if(self.runningTime==treatTimes){//混合3min钟
[self upenergyLbMixOrNot:1];
}else if((self.runningTime==(self.totalTime/2))||(((self.runningTime%(2*treatTimes))== 0)&& (self.runningTime !=0))){
self.runningTime = 0;
if (self.subtotalTime == self.subrecordTime) {
[SVProgressHUD showInfoWithStatus:@"护理已结束"];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"06000B31020200"] withCrc16Modbus]];//暂停
[self stopAction];
__block XHMainVC1 *mainVC = self;
self.subrecordTime = 0;
mainVC.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:[mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue]];
self.subtotalTime = [mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue];
if (self.modelSelectindex != 5 && self.modelSelectindex != 6 && self.modelSelectindex != 7) {
self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
}
if((self.recordTime==(self.totalTime/2))){
//20230612切换
self.runningTime = 0;
self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作右脸");
[self playSoundEffect:@"tips.wav"];
// self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
}else{
self.runningTime++;
self.subrecordTime++;
self.recordTime++;
if(self.subrecordTime%20==0){
[self saveLocationRecord];
}
if(self.subrecordTime%3==0){
/// 工作提示音
[self playSoundEffect:@"working.wav"];
}
if(self.runningTime>=1){
if(self.runningTime==1){//10M 3min钟
[self upenergyLbMixOrNot:0];
}else if(self.runningTime==treatTimes){//混合3min钟
[self upenergyLbMixOrNot:1];
}else if((self.runningTime==(self.subtotalTime/2))||(((self.runningTime%(2*treatTimes))== 0)&& (self.runningTime !=0))){
self.runningTime = 0;
}
if((self.subrecordTime==(self.subtotalTime/2))){
//20230612切换
self.runningTime = 0;
if (self.modelSelectindex != 5 && self.modelSelectindex != 6 && self.modelSelectindex != 7) {
self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作右脸");
}
// self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作右脸");
[self playSoundEffect:@"tips.wav"];
}
}
self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
self.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
}
self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
}else{
}else{
self.isStartted = false;
self.isStart = false;
[self updateLDMRecord];
self.runningTime = 0;
self.recordTime = 0;
self.remaintime = 0;
self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
self.subrecordTime = 0;
self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
self.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
// self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
if (self.modelSelectindex != 5 && self.modelSelectindex != 6 && self.modelSelectindex != 7) {
self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
}
#pragma mark RequirementChangeRecord_h
self.mySmartView.endedBtn.hidden = true;
[self upenergyLbMixOrNot:0];
[SVProgressHUD showInfoWithStatus:@"护理已结束"];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"06000B31020200"] withCrc16Modbus]];//暂停
[self stopAction];
}
// if(self.subtotalTime-self.subrecordTime>0){
// self.runningTime++;
// self.subrecordTime++;
// self.recordTime++;
// if(self.subrecordTime%20==0){
// [self saveLocationRecord];
// }
// if(self.subrecordTime%3==0){
// /// 工作提示音
// [self playSoundEffect:@"working.wav"];
// }
// if(self.runningTime>=1){
// if(self.runningTime==1){//10M 3min钟
// [self upenergyLbMixOrNot:0];
// }else if(self.runningTime==treatTimes){//混合3min钟
// [self upenergyLbMixOrNot:1];
// }else if((self.runningTime==(self.subtotalTime/2))||(((self.runningTime%(2*treatTimes))== 0)&& (self.runningTime !=0))){
// self.runningTime = 0;
// }
// if((self.subrecordTime==(self.subtotalTime/2))){
// //20230612切换
// self.runningTime = 0;
// self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作右脸");
// [self playSoundEffect:@"tips.wav"];
// }
// }
// self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
// self.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
// }else{
//
// self.isStartted = false;
// self.isStart = false;
// [self updateLDMRecord];
// self.runningTime = 0;
// self.recordTime = 0;
// self.remaintime = 0;
// self.subrecordTime = 0;
// self.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:(self.subtotalTime-self.subrecordTime)];
// self.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:(self.totalTime-self.recordTime)];
// self.mySmartView.operationItemLb.text = HJLocalizedString(@"请操作左脸");
//#pragma mark RequirementChangeRecord_h
// self.mySmartView.endedBtn.hidden = true;
// [self upenergyLbMixOrNot:0];
// [SVProgressHUD showInfoWithStatus:@"护理已结束"];
// [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"06000B31020200"] withCrc16Modbus]];//暂停
// [self stopAction];
// }
}
}
/// 是否混合 20230612
......@@ -1417,14 +1697,20 @@
self.set10MStrengthNum = [self.programArr[self.modelSelectindex][0][@"10MTakt"] integerValue];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"09000B310211%@%@%@%@",[NSString ToLongHex:(treat3MEnergy) withLength:2],[NSString ToLongHex:(self.set3MStrengthNum) withLength:2],[NSString ToLongHex:(treat10MEnergy) withLength:2],[NSString ToLongHex:(self.set10MStrengthNum) withLength:2]] withCrc16Modbus]];
}else{
self.set3MStrengthNum = 0;
self.set3MStrengthNum = [self.programArr[self.modelSelectindex][0][@"3MTakt"] integerValue];
self.set10MStrengthNum = [self.programArr[self.modelSelectindex][0][@"10MTakt"] integerValue];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"09000B310211%@%@%@%@",[NSString ToLongHex:(0) withLength:2],[NSString ToLongHex:(0) withLength:2],[NSString ToLongHex:(treat10MEnergy) withLength:2],[NSString ToLongHex:(self.set10MStrengthNum) withLength:2]] withCrc16Modbus]];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"09000B310211%@%@%@%@",[NSString ToLongHex:(treat3MEnergy) withLength:2],[NSString ToLongHex:(self.set3MStrengthNum) withLength:2],[NSString ToLongHex:(treat10MEnergy) withLength:2],[NSString ToLongHex:(self.set10MStrengthNum) withLength:2]] withCrc16Modbus]];
// self.set3MStrengthNum = 0;
// self.set10MStrengthNum = [self.programArr[self.modelSelectindex][0][@"10MTakt"] integerValue];
// [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"09000B310211%@%@%@%@",[NSString ToLongHex:(0) withLength:2],[NSString ToLongHex:(0) withLength:2],[NSString ToLongHex:(treat10MEnergy) withLength:2],[NSString ToLongHex:(self.set10MStrengthNum) withLength:2]] withCrc16Modbus]];
}
// if((self.recordTime != 1)||(self.recordTime != 0)){
// [self playSoundEffect:@"tips.wav"];
// }
if(TargetType ==5||TargetType ==4){
if([XHGetDataManager.deviceCode isEqual:Dr021DeviceName]||[XHGetDataManager.deviceCode isEqual:Dr02DeviceName]||[XHGetDataManager.deviceCode isEqual:Dr022DeviceName]||[XHGetDataManager.deviceCode isEqual:DrDeviceDr02BName]){
self.mySmartView.strengthLb1.text =self.set3MStrengthNum==0?@"0":[NSString stringWithFormat:@"%.f",ceilf(self.set3MStrengthNum/5.0)];
self.mySmartView.strengthLb2.text =self.set10MStrengthNum==0?@"0":[NSString stringWithFormat:@"%.f",ceilf(self.set10MStrengthNum/5.0)];
......@@ -1443,8 +1729,10 @@
dispatch_async(dispatch_get_main_queue(), ^{
if (XHGetDataManager.isOrNotOutoModel) {
weakSelf.myCustomView.strengStartBtn.selected = false;
weakSelf.mySmartView.startBtn.selected = false;
}else{
weakSelf.mySmartView.startBtn.selected = false;
weakSelf.myCustomView.strengStartBtn.selected = false;
}
});
self.isStart = false;
......@@ -1488,9 +1776,28 @@
}
-(void)setIsVerifySucceed:(BOOL)isVerifySucceed{
if (isVerifySucceed) {
// if(XHGetDataManager.isOrNotOutoModel){
//
//
// }
if(XHGetDataManager.isOrNotOutoModel){
// self.remaintime = self.remaintime;
// self.totalTime = self.remaintime;
self.subtotalTime = self.remaintime;
self.remaintime = self.remaintime;
self.totalTime = self.remaintime;
__block XHMainVC1 *mainVC = self;
mainVC.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:[mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue]];
mainVC.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:self.remaintime];
mainVC.subtotalTime = [mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue];
}else{
self.subtotalTime = self.remaintime;
self.remaintime = self.remaintime;
self.totalTime = self.remaintime;
__block XHMainVC1 *mainVC = self;
mainVC.mySmartView.operationTimeLb.text = [[HJTools shared] secondToTime:[mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue]];
mainVC.mySmartView.totalTimeLb.text = [[HJTools shared] secondToTime:self.remaintime];
mainVC.subtotalTime = [mainVC.programArr[self.modelSelectindex][0][@"totaltimes"] integerValue];
}
}
}
......
......@@ -161,24 +161,30 @@
make.height.mas_equalTo(10*IPhone6ScaleHeight);
make.width.mas_equalTo(20*IPhone6ScaleHeight);
}];//
UIImageView *faceImg = [UIImageView myUIImageViewSuperView:myView withImageName:(TargetType==5)?@"DrTY_DeviceConnectedImg":(TargetType==4)?@"dr02BMain":@"Main_device"];//
UIImageView *faceImg = [UIImageView myUIImageViewSuperView:myView withImageName:(TargetType==5)?@"DrTY_DeviceConnectedImg":(TargetType==4)?@"dr02BMain1":@"Main_device"];//
[faceImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(myView);
make.top.mas_equalTo(strengthLb2Bottom.mas_bottom).offset(53*IPhone6ScaleHeight);
make.height.mas_equalTo(127.25*IPhone6ScaleHeight);
make.width.mas_equalTo(110*IPhone6ScaleWidth);
// make.height.mas_equalTo(127.25*IPhone6ScaleHeight);
// make.width.mas_equalTo(110*IPhone6ScaleWidth);
make.size.mas_equalTo(CGSizeMake(203, 123));
}];
self.faceImage = faceImg;
UILabel *rightLb = [UILabel myUILabelSuperView:myView withNSTextAlignment:NSTextAlignmentLeft withContent:HJLocalizedString(HJLocalizedString(@"00:12:00")) withFont:XHFontSize(16) withTextColor:XHBtnTextColor withResize:true];
[rightLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(myView);
make.top.mas_equalTo(faceImg.mas_bottom).offset(15*IPhone6ScaleHeight);
make.height.mas_equalTo(16.5*IPhone6ScaleHeight);
}];
self.operationTimeLb = rightLb;
// UILabel *rightLb = [UILabel myUILabelSuperView:myView withNSTextAlignment:NSTextAlignmentLeft withContent:HJLocalizedString(HJLocalizedString(@"00:12:00")) withFont:XHFontSize(16) withTextColor:XHBtnTextColor withResize:true];
// [rightLb mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerX.mas_equalTo(myView);
// make.top.mas_equalTo(faceImg.mas_bottom).offset(15*IPhone6ScaleHeight);
// make.height.mas_equalTo(16.5*IPhone6ScaleHeight);
//
// }];
// self.operationTimeLb = rightLb;
UIButton *startBtn = [UIButton myUIButtonSuperView:myView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(selectPlanOrSatrtAction:) withTag:Home_StartBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
if((TargetType == 2)){
......@@ -195,14 +201,37 @@
[startBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.height.width.mas_equalTo(85*IPhone6ScaleWidth);
make.top.mas_equalTo(rightLb.mas_bottom).offset(29.5*IPhone6ScaleHeight);
// make.top.mas_equalTo(rightLb.mas_bottom).offset(29.5*IPhone6ScaleHeight);
make.bottom.mas_equalTo(-110*IPhone6ScaleHeight);
}];
self.strengStartBtn = startBtn;
UILabel *totalTitleLb = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:HJLocalizedString(HJLocalizedString(@"剩余总时长")) withFont:XHFontSize(15) withTextColor:XHTextFieldTextPlaceholderColor withResize:true];
[totalTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.SelectModelView);
make.bottom.equalTo(self.strengStartBtn.mas_top).offset(-70);
}];
_operationTimeLb = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:HJLocalizedString(HJLocalizedString(@"00:12:00")) withFont:XHFontSizeBold(24) withTextColor:XHBtnTextColor withResize:true];
[_operationTimeLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.SelectModelView);
make.top.equalTo(totalTitleLb.mas_bottom).offset(10);
}];
UIButton *disinfectBtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(selectPlanOrSatrtAction:) withTag:10000001 withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
if((TargetType == 2)||(TargetType == 4)){
[disinfectBtn setImage:HJSetImg(@"djm_dr02_disinfect_off") forState:UIControlStateNormal];
[disinfectBtn setImage:HJSetImg(@"djm_dr02_disinfect_on") forState:UIControlStateSelected];
}else{
[disinfectBtn setImage:HJSetImg(@"DrTY_Disinfect_Nor") forState:UIControlStateNormal];
[disinfectBtn setImage:HJSetImg(@"DrTY_Disinfect_Sel") forState:UIControlStateSelected];
......@@ -213,7 +242,11 @@
make.right.mas_equalTo(startBtn.mas_left).offset(-29.5*IPhone6ScaleWidth);
}];
self.disinfectBtn = disinfectBtn;
if ([XHGetDataManager.deviceCode isEqualToString:@"K9"]) {
self.disinfectBtn.hidden = true;
}else{
self.disinfectBtn.hidden = false;
}
#pragma mark RequirementChangeRecord_h
UIButton *endedBtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(selectPlanOrSatrtAction:) withTag:10000002 withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
if((TargetType == 2)||(TargetType == 4)){
......
......@@ -38,9 +38,9 @@
[lb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
if([[UIDevice currentDevice].name containsString:@"14 Pro"]||[[UIDevice currentDevice].name containsString:@"15"]){
make.top.mas_equalTo(self.mas_top).offset(HJNavHeight);
make.top.mas_equalTo(self.mas_top).offset(HJNavHeight + 10);
}else{
make.top.mas_equalTo(self.mas_top).offset(HJNavHeight-12);
make.top.mas_equalTo(self.mas_top).offset(HJNavHeight+10);
}
}];
......@@ -50,9 +50,10 @@
make.top.mas_equalTo(self).mas_equalTo(159*IPhone6ScaleHeight);
}];
//DrTY_DisconnectLogo
UIImageView *deviceImg = [UIImageView myUIImageViewSuperView:img withImageName:(TargetType==5)?@"DrTY_DisconnectLogo":(TargetType==4&&XHGetDataManager.machineIndex==0)?@"Ps2_Device_Img": (TargetType==4&&XHGetDataManager.machineIndex==1)?@"dr02BNo":@"Home_DeviceLogo"];//Ps2_Device_Img //
UIImageView *deviceImg = [UIImageView myUIImageViewSuperView:img withImageName:(TargetType==5)?@"DrTY_DisconnectLogo":(TargetType==4&&XHGetDataManager.machineIndex==0)?@"Ps2_Device_Img": (TargetType==4&&XHGetDataManager.machineIndex==1)?@"dr02BMain1":@"Home_DeviceLogo"];//Ps2_Device_Img //
[deviceImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(statusLb.mas_bottom).offset(40.5*IPhone6ScaleHeight);
make.size.mas_equalTo(CGSizeMake(203, 123));
make.centerX.mas_equalTo(self);
}];
......
......@@ -30,7 +30,7 @@
bgV.layer.shadowRadius = 20;
bgV.layer.cornerRadius = 12;
[bgV mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self).offset(160*IPhone6ScaleHeight);
make.top.mas_equalTo(self).offset(210*IPhone6ScaleHeight);
make.left.mas_equalTo(self).offset(15*IPhone6ScaleWidth);
make.right.mas_equalTo(self).offset(-15*IPhone6ScaleWidth);
make.bottom.mas_equalTo(self).offset(-35*IPhone6ScaleWidth);
......@@ -57,9 +57,18 @@
NSArray *itemSelArrimg;
NSArray *itemArr;
if((TargetType == 2)||(TargetType == 4)){
itemNorArrimg = @[@"Home_Slect_eye_n",@"Home_Slect_deepGrain_n",@"Home_Slect_up_n",@"Home_Slect_face_n",@"Home_Slect_skin_n",@"Home_Slect_newskin_n",@"Home_Slect_anti-aging_n",@"Home_Slect_absorption_n",@"Home_Slect_acne_n",@"Home_Slect_papules_n"];
itemSelArrimg = @[@"Home_Slect_eye_s",@"Home_Slect_deepGrain_s",@"Home_Slect_up_s",@"Home_Slect_face_s",@"Home_Slect_skin_s",@"Home_Slect_newskin_s",@"Home_Slect_anti-aging_s",@"Home_Slect_absorption_s",@"Home_Slect_acne_s",@"Home_Slect_papules_s"];
itemArr = @[HJLocalizedString(@"眼纹"),HJLocalizedString(@"深纹"),HJLocalizedString(@"提升"),HJLocalizedString(@"面部紧致"),HJLocalizedString(@"皮肤焕新"),HJLocalizedString(@"敏感性皮肤焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"辅助面部吸收"),HJLocalizedString(@"粉刺痤疮"),HJLocalizedString(@"丘疹脓疱性痤疮")];
// itemNorArrimg = @[@"Home_Slect_eye_n",@"Home_Slect_deepGrain_n",@"Home_Slect_up_n",@"Home_Slect_face_n",@"Home_Slect_skin_n",@"Home_Slect_newskin_n",@"Home_Slect_anti-aging_n",@"Home_Slect_absorption_n",@"Home_Slect_acne_n",@"Home_Slect_papules_n"];
// itemSelArrimg = @[@"Home_Slect_eye_s",@"Home_Slect_deepGrain_s",@"Home_Slect_up_s",@"Home_Slect_face_s",@"Home_Slect_skin_s",@"Home_Slect_newskin_s",@"Home_Slect_anti-aging_s",@"Home_Slect_absorption_s",@"Home_Slect_acne_s",@"Home_Slect_papules_s"];
// itemArr = @[HJLocalizedString(@"眼部护理"),HJLocalizedString(@"深纹"),HJLocalizedString(@"提升"),HJLocalizedString(@"轮廓清晰"),HJLocalizedString(@"面部饱满"),HJLocalizedString(@"褪红舒敏"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"嫩滑提亮"),HJLocalizedString(@"粉刺痤疮"),HJLocalizedString(@"丘疹脓疱性痤疮")];
// itemNorArrimg = @[@"Home_Slect_eye_n",@"Home_Slect_face_n",@"Home_Slect_skin_n",@"Home_Slect_newskin_n",@"Home_Slect_absorption_n",@"Home_Slect_absorption_n",@"Home_Slect_absorption_n",@"Home_Slect_absorption_n"];
// itemSelArrimg = @[@"Home_Slect_eye_s",@"Home_Slect_face_s",@"Home_Slect_skin_s",@"Home_Slect_newskin_s",@"Home_Slect_absorption_s",@"Home_Slect_absorption_s",@"Home_Slect_absorption_s",@"Home_Slect_absorption_s"];
itemNorArrimg = @[@"k9_yb_nol",@"k9_lk_nol",@"k9_mb_nol",@"k9_sh_nol",@"k9_nh_nol",@"k9_sc_nol",@"k9_st_nol",@"k9_dw_nol"];
itemSelArrimg = @[@"k9_yb_sel",@"k9_lk_sel",@"k9_mb_sel",@"k9_sh_sel",@"k9_nh_sel",@"k9_sc_sel",@"k9_st_sel",@"k9_dw_sel"];
itemArr = @[HJLocalizedString(@"眼部护理"),HJLocalizedString(@"轮廓清晰"),HJLocalizedString(@"面部饱满"),HJLocalizedString(@"褪红舒敏"),HJLocalizedString(@"嫩滑提亮"),HJLocalizedString(@"关节色沉淡化"),HJLocalizedString(@"身体塑形"),HJLocalizedString(@"身体淡纹")];
}else{
itemNorArrimg = @[@"Home_Slect_eye_n_r",@"Home_Slect_deepGrain_n_r",@"Home_Slect_up_n_r",@"Home_Slect_face_n_r",@"Home_Slect_skin_n_r",@"Home_Slect_newskin_n_r",@"Home_Slect_anti-aging_n_r",@"Home_Slect_absorption_n_r",@"Home_Slect_acne_n_r",@"Home_Slect_papules_n_r"];
......@@ -70,7 +79,7 @@
for (int i = 0; i<itemArr.count; i++) {
UIButton *btn = [UIButton myUIButtonSuperView:bgV withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(SelectActionOrSureBtn:) withTag:Home_SelectModel1Btntag+i withNormalImg:HJSetImg(itemNorArrimg[i]) withSelectedImg:HJSetImg(itemSelArrimg[i]) withHighlightedImg:nil withTitle:HJLocalizedString(itemArr[i]) withFont:XHFontSize(9) withTitleNormalColor:XHColorHex(0x939393) withTitleSelectedColor:XHColorHex(0x000000)];//
if((TargetType == 2)||(TargetType == 4)){
[btn layoutButtonWithEdgeInsetsStyle:HJButtonEdgeInsetsStyleTop imageTitleSpace:85.0f];
[btn layoutButtonWithEdgeInsetsStyle:HJButtonEdgeInsetsStyleTop imageTitleSpace:160.0f];
}else{
[btn layoutButtonWithEdgeInsetsStyle:HJButtonEdgeInsetsStyleTop imageTitleSpace:160.0f];
}
......@@ -86,13 +95,13 @@
make.left.mas_equalTo(self).offset((HJScreenWidth-112*IPhone6ScaleWidth*2-60*IPhone6ScaleWidth)/2 +(60*IPhone6ScaleWidth+52*IPhone6ScaleWidth)*(i%3));
}];
}
UIButton *btn = [self viewWithTag:Home_SelectModel10Btntag];
UIButton *btn = [self viewWithTag:Home_SelectModel8Btntag];
UIButton *sureBtn = [UIButton myUIButtonSuperView:bgV withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(SelectActionOrSureBtn:) withTag:Home_SelectModelSureBtntag withNormalImg:nil withSelectedImg:nil withHighlightedImg:nil withTitle:@"确定" withFont:XHFontSize(17) withTitleNormalColor:XHColorHex(0xffffff) withTitleSelectedColor:XHColorHex(0xffffff)];
sureBtn.backgroundColor = XHBtnColor;
sureBtn.layer.cornerRadius = 10.0f;
[sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(bgV);
make.top.mas_equalTo(btn.mas_bottom).offset(23*IPhone6ScaleHeight);
make.top.mas_equalTo(btn.mas_bottom).offset(60*IPhone6ScaleHeight);
make.height.mas_equalTo(45*IPhone6ScaleHeight);
make.width.mas_equalTo(300*IPhone6ScaleWidth);
......@@ -102,6 +111,8 @@
self.selBtn.selected = NO;
self.selBtn= button;
button.selected = YES;
if (self.sendModelBlock) {
self.sendModelBlock(button);
}
......
......@@ -26,6 +26,11 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark RequirementChangeRecord_h
@property (nonatomic,strong) UIButton *endedBtn;
@property (nonatomic,strong) UIButton *disinfectBtn;//消毒
@property (nonatomic,strong) UILabel *totalTimeLb;//总时间
@property (nonatomic,strong) UIImageView *faceImage;//
@property (nonatomic,strong) UIButton *selectPlanBtn;
@property (nonatomic,strong) UIView *SelectModelView;//已选择模式
@property (nonatomic,strong) UIView *centerLine;
@end
NS_ASSUME_NONNULL_END
......@@ -9,14 +9,14 @@
@interface XHSmartView ()
@property (nonatomic,strong) UIView *noSelectModelView;//未选择模式
@property (nonatomic,strong) UIView *SelectModelView;//已选择模式
@property (nonatomic,strong) UIImageView *faceImage;//
@property (nonatomic,strong) NSArray *modelArr;
@property (nonatomic,strong) UIButton *selectPlanBtn;
@end
......@@ -32,7 +32,9 @@
if(TargetType == 5){
self.modelArr = @[HJLocalizedString(@"明眸淡纹"),HJLocalizedString(@"抚平舒纹"),HJLocalizedString(@"童颜提拉"),HJLocalizedString(@"轮廓紧致"),HJLocalizedString(@"美肌焕新"),HJLocalizedString(@"舒敏焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"嫩颜促吸"),HJLocalizedString(@"平痘护肤"),HJLocalizedString(@"平痘抑菌")];
}else{
self.modelArr = @[HJLocalizedString(@"眼纹"),HJLocalizedString(@"深纹"),HJLocalizedString(@"提升"),HJLocalizedString(@"面部紧致"),HJLocalizedString(@"皮肤焕新"),HJLocalizedString(@"敏感性皮肤焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"辅助面部吸收"),HJLocalizedString(@"粉刺痤疮"),HJLocalizedString(@"丘疹脓疱性痤疮")];
// self.modelArr = @[HJLocalizedString(@"眼纹"),HJLocalizedString(@"深纹"),HJLocalizedString(@"提升"),HJLocalizedString(@"面部紧致"),HJLocalizedString(@"皮肤焕新"),HJLocalizedString(@"敏感性皮肤焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"辅助面部吸收"),HJLocalizedString(@"粉刺痤疮"),HJLocalizedString(@"丘疹脓疱性痤疮")];
// self.modelArr = @[HJLocalizedString(@"眼纹"),HJLocalizedString(@"深纹"),HJLocalizedString(@"提升"),HJLocalizedString(@"面部紧致"),HJLocalizedString(@"皮肤焕新"),HJLocalizedString(@"敏感性皮肤焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"辅助面部吸收"),HJLocalizedString(@"粉刺痤疮"),HJLocalizedString(@"丘疹脓疱性痤疮")];
self.modelArr = @[HJLocalizedString(@"眼部护理"),HJLocalizedString(@"轮廓清晰"),HJLocalizedString(@"面部饱满"),HJLocalizedString(@"褪红舒敏"),HJLocalizedString(@"嫩滑提亮"),HJLocalizedString(@"关节色沉淡化"),HJLocalizedString(@"身体塑形"),HJLocalizedString(@"身体淡纹")];
}
[self creatNoSelectModelView];
......@@ -66,14 +68,15 @@
UIImageView *deviceImg = [UIImageView myUIImageViewSuperView:myView withImageName:(TargetType==5)?@"DrTY_DeviceConnectedImg":(TargetType==4)?@"dr02BMain":@"Main_device"];
UIImageView *deviceImg = [UIImageView myUIImageViewSuperView:myView withImageName:(TargetType==5)?@"DrTY_DeviceConnectedImg":(TargetType==4)?@"dr02BMain1":@"Main_device"];
[deviceImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(selectPlan.mas_bottom).offset(85*IPhone6ScaleHeight);
make.centerX.mas_equalTo(self);
make.size.mas_equalTo(CGSizeMake(203, 123));
}];
UIButton *startBtn = [UIButton myUIButtonSuperView:myView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(selectPlanOrSatrtAction:) withTag:Home_StartBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
UIButton *startBtn = [UIButton myUIButtonSuperView:myView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(selectPlanOrSatrtAction:) withTag:Home_SelectPlanBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
// startBtn.layer.cornerRadius = 42.5f*IPhone6ScaleWidth;
// startBtn.layer.backgroundColor = XHColorHex(0x8C8C8C).CGColor;
if((TargetType == 2)||(TargetType == 4)){
......@@ -83,7 +86,7 @@
[startBtn setImage:HJSetImg(@"DrTY_Stop") forState:UIControlStateNormal];
[startBtn setImage:HJSetImg(@"DrTY_Start") forState:UIControlStateSelected];
}
startBtn.enabled = false;
// startBtn.enabled = false;
[startBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.height.width.mas_equalTo(85*IPhone6ScaleWidth);
......@@ -127,139 +130,139 @@
make.top.mas_equalTo(self).offset(110*IPhone6ScaleHeight);
}];
self.selectPlanBtn = selectPlan;
UILabel *strengthLb = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:@"0" withFont:XHFontSizeBold(40) withTextColor:XHBtnTextColor withResize:true];
[strengthLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(selectPlan.mas_bottom).offset(43*IPhone6ScaleHeight);
make.centerX.mas_equalTo(self.SelectModelView);
make.height.mas_equalTo(30*IPhone6ScaleHeight);
make.width.mas_equalTo(80*IPhone6ScaleWidth);
}];
self.strengthLb1 = strengthLb;
UIButton *left3Mbtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(addOrDecreceBtnAction:) withTag:Home_SmartStrength3MDecBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
if((TargetType == 2)||(TargetType == 4)){
[left3Mbtn setImage:HJSetImg(@"btn_less") forState:UIControlStateNormal];
[left3Mbtn setImage:HJSetImg(@"btn_less") forState:UIControlStateSelected];
}else{
[left3Mbtn setImage:HJSetImg(@"DrTY_N_Dec") forState:UIControlStateNormal];
[left3Mbtn setImage:HJSetImg(@"DrTY_N_Dec") forState:UIControlStateSelected];
}
[left3Mbtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(strengthLb);
make.right.mas_equalTo(strengthLb.mas_left).offset(-30*IPhone6ScaleWidth);
make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
}];
UIButton *right3Mbtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(addOrDecreceBtnAction:) withTag:Home_SmartStrength3MAddBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
if((TargetType == 2)||(TargetType == 4)){
[right3Mbtn setImage:HJSetImg(@"btn_plus") forState:UIControlStateNormal];
[right3Mbtn setImage:HJSetImg(@"btn_plus") forState:UIControlStateSelected];
}else{
[right3Mbtn setImage:HJSetImg(@"DrTY_N_Add") forState:UIControlStateNormal];
[right3Mbtn setImage:HJSetImg(@"DrTY_N_Add") forState:UIControlStateSelected];
}
[right3Mbtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(strengthLb);
make.left.mas_equalTo(strengthLb.mas_right).offset(30*IPhone6ScaleWidth);
make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
}];
UILabel *strengthLb1Bottom = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?HJLocalizedString(@"3M 档位"):HJLocalizedString(@"3M 强度(W/cm²)") withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true];
[strengthLb1Bottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb.mas_bottom).offset(0*IPhone6ScaleHeight);
make.centerX.mas_equalTo(self.SelectModelView);
make.height.mas_equalTo(13*IPhone6ScaleHeight);
make.width.mas_equalTo(strengthLb);
}];
UIImageView *myImg1 = [UIImageView myUIImageViewSuperView:self.SelectModelView withImageName:@"Home_circle"];
[myImg1 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb.mas_bottom).offset(0*IPhone6ScaleHeight);
if(iPhone6||iPhone6P||iPhoneSE){
if(TargetType == 5){
make.left.mas_equalTo(strengthLb1Bottom.mas_left).offset(10*IPhone6ScaleWidth);
}else{
make.left.mas_equalTo(strengthLb1Bottom).offset(-0.5*IPhone6ScaleWidth);
}
}else{
if(TargetType == 5){
make.left.mas_equalTo(strengthLb1Bottom.mas_left).offset(14*IPhone6ScaleWidth);
}else{
make.left.mas_equalTo(strengthLb1Bottom).offset(-0.5*IPhone6ScaleWidth);
}
}
make.height.mas_equalTo(10*IPhone6ScaleHeight);
make.width.mas_equalTo(20*IPhone6ScaleHeight);
}];
UILabel *strengthLb2 = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:@"0" withFont:XHFontSizeBold(40) withTextColor:XHBtnTextColor withResize:true];
[strengthLb2 mas_makeConstraints:^(MASConstraintMaker *make) {
if(iPhone6||iPhone6P||iPhoneSE){
make.top.mas_equalTo(strengthLb.mas_bottom).offset(59.5*IPhone6ScaleHeight);
}else{
make.top.mas_equalTo(strengthLb.mas_bottom).offset(29.5*IPhone6ScaleHeight);
}
make.centerX.mas_equalTo(self.SelectModelView);
make.height.mas_equalTo(30*IPhone6ScaleHeight);
make.width.mas_equalTo(80*IPhone6ScaleWidth);
}];
self.strengthLb2 = strengthLb2;
UIButton *left10Mbtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(addOrDecreceBtnAction:) withTag:Home_SmartStrength10MDecBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
if((TargetType == 2)||(TargetType == 4)){
[left10Mbtn setImage:HJSetImg(@"btn_less") forState:UIControlStateNormal];
[left10Mbtn setImage:HJSetImg(@"btn_less") forState:UIControlStateSelected];
}else{
[left10Mbtn setImage:HJSetImg(@"DrTY_N_Dec") forState:UIControlStateNormal];
[left10Mbtn setImage:HJSetImg(@"DrTY_N_Dec") forState:UIControlStateSelected];
}
[left10Mbtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(strengthLb2);
make.right.mas_equalTo(strengthLb2.mas_left).offset(-30*IPhone6ScaleWidth);
make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
}];
UIButton *right10Mbtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(addOrDecreceBtnAction:) withTag:Home_SmartStrength10MAddBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
if((TargetType == 2)||(TargetType == 4)){
[right10Mbtn setImage:HJSetImg(@"btn_plus") forState:UIControlStateNormal];
[right10Mbtn setImage:HJSetImg(@"btn_plus") forState:UIControlStateSelected];
}else{
[right10Mbtn setImage:HJSetImg(@"DrTY_N_Add") forState:UIControlStateNormal];
[right10Mbtn setImage:HJSetImg(@"DrTY_N_Add") forState:UIControlStateSelected];
}
[right10Mbtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(strengthLb2);
make.left.mas_equalTo(strengthLb2.mas_right).offset(30*IPhone6ScaleWidth);
make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
}];
UILabel *strengthLb2Bottom = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?HJLocalizedString(@"10M 档位"):HJLocalizedString(@"10M 强度(W/cm²)") withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true];
[strengthLb2Bottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb2.mas_bottom).offset(0*IPhone6ScaleHeight);
make.centerX.mas_equalTo(self.SelectModelView);
make.height.mas_equalTo(13*IPhone6ScaleHeight);
make.width.mas_equalTo(strengthLb);
}];
UIImageView *myImg = [UIImageView myUIImageViewSuperView:self.SelectModelView withImageName:@"Home_circle"];
[myImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb2.mas_bottom).offset(0*IPhone6ScaleHeight);
// make.left.mas_equalTo(strengthLb2Bottom).offset(-0.5*IPhone6ScaleWidth);
make.centerX.mas_equalTo(myImg1);
make.height.mas_equalTo(10*IPhone6ScaleHeight);
make.width.mas_equalTo(20*IPhone6ScaleHeight);
}];
// UILabel *strengthLb = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:@"0" withFont:XHFontSizeBold(40) withTextColor:XHBtnTextColor withResize:true];
// [strengthLb mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(selectPlan.mas_bottom).offset(43*IPhone6ScaleHeight);
// make.centerX.mas_equalTo(self.SelectModelView);
// make.height.mas_equalTo(30*IPhone6ScaleHeight);
// make.width.mas_equalTo(80*IPhone6ScaleWidth);
// }];
// self.strengthLb1 = strengthLb;
//
// UIButton *left3Mbtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(addOrDecreceBtnAction:) withTag:Home_SmartStrength3MDecBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
// if((TargetType == 2)||(TargetType == 4)){
// [left3Mbtn setImage:HJSetImg(@"btn_less") forState:UIControlStateNormal];
// [left3Mbtn setImage:HJSetImg(@"btn_less") forState:UIControlStateSelected];
// }else{
// [left3Mbtn setImage:HJSetImg(@"DrTY_N_Dec") forState:UIControlStateNormal];
// [left3Mbtn setImage:HJSetImg(@"DrTY_N_Dec") forState:UIControlStateSelected];
// }
//
// [left3Mbtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerY.mas_equalTo(strengthLb);
// make.right.mas_equalTo(strengthLb.mas_left).offset(-30*IPhone6ScaleWidth);
// make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
// }];
//
//
// UIButton *right3Mbtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(addOrDecreceBtnAction:) withTag:Home_SmartStrength3MAddBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
// if((TargetType == 2)||(TargetType == 4)){
// [right3Mbtn setImage:HJSetImg(@"btn_plus") forState:UIControlStateNormal];
// [right3Mbtn setImage:HJSetImg(@"btn_plus") forState:UIControlStateSelected];
// }else{
// [right3Mbtn setImage:HJSetImg(@"DrTY_N_Add") forState:UIControlStateNormal];
// [right3Mbtn setImage:HJSetImg(@"DrTY_N_Add") forState:UIControlStateSelected];
// }
//
// [right3Mbtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerY.mas_equalTo(strengthLb);
// make.left.mas_equalTo(strengthLb.mas_right).offset(30*IPhone6ScaleWidth);
// make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
// }];
//
//
// UILabel *strengthLb1Bottom = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?HJLocalizedString(@"3M 档位"):HJLocalizedString(@"3M 强度(W/cm²)") withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true];
// [strengthLb1Bottom mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(strengthLb.mas_bottom).offset(0*IPhone6ScaleHeight);
// make.centerX.mas_equalTo(self.SelectModelView);
// make.height.mas_equalTo(13*IPhone6ScaleHeight);
// make.width.mas_equalTo(strengthLb);
// }];
// UIImageView *myImg1 = [UIImageView myUIImageViewSuperView:self.SelectModelView withImageName:@"Home_circle"];
// [myImg1 mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(strengthLb.mas_bottom).offset(0*IPhone6ScaleHeight);
// if(iPhone6||iPhone6P||iPhoneSE){
// if(TargetType == 5){
// make.left.mas_equalTo(strengthLb1Bottom.mas_left).offset(10*IPhone6ScaleWidth);
// }else{
// make.left.mas_equalTo(strengthLb1Bottom).offset(-0.5*IPhone6ScaleWidth);
// }
// }else{
// if(TargetType == 5){
// make.left.mas_equalTo(strengthLb1Bottom.mas_left).offset(14*IPhone6ScaleWidth);
// }else{
// make.left.mas_equalTo(strengthLb1Bottom).offset(-0.5*IPhone6ScaleWidth);
// }
// }
// make.height.mas_equalTo(10*IPhone6ScaleHeight);
// make.width.mas_equalTo(20*IPhone6ScaleHeight);
// }];
// UILabel *strengthLb2 = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:@"0" withFont:XHFontSizeBold(40) withTextColor:XHBtnTextColor withResize:true];
// [strengthLb2 mas_makeConstraints:^(MASConstraintMaker *make) {
// if(iPhone6||iPhone6P||iPhoneSE){
// make.top.mas_equalTo(strengthLb.mas_bottom).offset(59.5*IPhone6ScaleHeight);
// }else{
// make.top.mas_equalTo(strengthLb.mas_bottom).offset(29.5*IPhone6ScaleHeight);
// }
//
// make.centerX.mas_equalTo(self.SelectModelView);
// make.height.mas_equalTo(30*IPhone6ScaleHeight);
// make.width.mas_equalTo(80*IPhone6ScaleWidth);
// }];
// self.strengthLb2 = strengthLb2;
//
// UIButton *left10Mbtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(addOrDecreceBtnAction:) withTag:Home_SmartStrength10MDecBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
// if((TargetType == 2)||(TargetType == 4)){
// [left10Mbtn setImage:HJSetImg(@"btn_less") forState:UIControlStateNormal];
// [left10Mbtn setImage:HJSetImg(@"btn_less") forState:UIControlStateSelected];
// }else{
// [left10Mbtn setImage:HJSetImg(@"DrTY_N_Dec") forState:UIControlStateNormal];
// [left10Mbtn setImage:HJSetImg(@"DrTY_N_Dec") forState:UIControlStateSelected];
// }
//
// [left10Mbtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerY.mas_equalTo(strengthLb2);
// make.right.mas_equalTo(strengthLb2.mas_left).offset(-30*IPhone6ScaleWidth);
// make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
// }];
//
// UIButton *right10Mbtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(addOrDecreceBtnAction:) withTag:Home_SmartStrength10MAddBtnTag withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
//
// if((TargetType == 2)||(TargetType == 4)){
// [right10Mbtn setImage:HJSetImg(@"btn_plus") forState:UIControlStateNormal];
// [right10Mbtn setImage:HJSetImg(@"btn_plus") forState:UIControlStateSelected];
// }else{
// [right10Mbtn setImage:HJSetImg(@"DrTY_N_Add") forState:UIControlStateNormal];
// [right10Mbtn setImage:HJSetImg(@"DrTY_N_Add") forState:UIControlStateSelected];
// }
//
//
// [right10Mbtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerY.mas_equalTo(strengthLb2);
// make.left.mas_equalTo(strengthLb2.mas_right).offset(30*IPhone6ScaleWidth);
// make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
// }];
//
// UILabel *strengthLb2Bottom = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?HJLocalizedString(@"10M 档位"):HJLocalizedString(@"10M 强度(W/cm²)") withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true];
// [strengthLb2Bottom mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(strengthLb2.mas_bottom).offset(0*IPhone6ScaleHeight);
// make.centerX.mas_equalTo(self.SelectModelView);
// make.height.mas_equalTo(13*IPhone6ScaleHeight);
// make.width.mas_equalTo(strengthLb);
// }];
// UIImageView *myImg = [UIImageView myUIImageViewSuperView:self.SelectModelView withImageName:@"Home_circle"];
// [myImg mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(strengthLb2.mas_bottom).offset(0*IPhone6ScaleHeight);
//// make.left.mas_equalTo(strengthLb2Bottom).offset(-0.5*IPhone6ScaleWidth);
// make.centerX.mas_equalTo(myImg1);
// make.height.mas_equalTo(10*IPhone6ScaleHeight);
// make.width.mas_equalTo(20*IPhone6ScaleHeight);
// }];
UIImageView *faceImg = [UIImageView myUIImageViewSuperView:self.SelectModelView withImageName:((TargetType ==1)||(TargetType ==4))?@"Home_Face":@"DrTY_Face"];
// faceImg.backgroundColor = [UIColor lightGrayColor];
[faceImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.SelectModelView);
make.top.mas_equalTo(strengthLb2Bottom.mas_bottom).offset(33*IPhone6ScaleHeight);
make.top.mas_equalTo(selectPlan.mas_bottom).offset(90*IPhone6ScaleHeight);
make.height.mas_equalTo(194*IPhone6ScaleWidth);
make.width.mas_equalTo(117*IPhone6ScaleWidth);
}];
......@@ -267,12 +270,12 @@
UIView *centerLine = [UIView myUIViewSuperView:self.SelectModelView withBackgroundColor:XHBtnTextColor];
[centerLine mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(faceImg.mas_bottom).offset(9*IPhone6ScaleHeight);
make.bottom.mas_equalTo(faceImg.mas_top).offset(-20*IPhone6ScaleHeight);
make.centerX.mas_equalTo(self.SelectModelView);
make.width.mas_equalTo(1.0*IPhone6ScaleWidth);
make.height.mas_equalTo(16.5*IPhone6ScaleHeight);
}];
self.centerLine = centerLine;
UILabel *leftLb = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentRight withContent:HJLocalizedString(HJLocalizedString(@"请操作左脸")) withFont:XHFontSize(16) withTextColor:XHBtnTextColor withResize:true];
[leftLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(centerLine.mas_right).offset(-10*IPhone6ScaleWidth);
......@@ -305,7 +308,7 @@
[startBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.height.width.mas_equalTo(85*IPhone6ScaleWidth);
make.top.mas_equalTo(rightLb.mas_bottom).offset(29.5*IPhone6ScaleHeight);
make.bottom.mas_equalTo(-110*IPhone6ScaleHeight);
}];
self.startBtn = startBtn;
......@@ -325,7 +328,11 @@
make.right.mas_equalTo(startBtn.mas_left).offset(-29.5*IPhone6ScaleWidth);
}];
self.disinfectBtn = disinfectBtn;
if ([XHGetDataManager.deviceCode isEqualToString:@"K9"]) {
self.disinfectBtn.hidden = true;
}else{
self.disinfectBtn.hidden = false;
}
#pragma mark RequirementChangeRecord_h
UIButton *endedBtn = [UIButton myUIButtonSuperView:self.SelectModelView withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(selectPlanOrSatrtAction:) withTag:10000002 withNormalImg:HJSetImg(@"") withSelectedImg:HJSetImg(@"") withHighlightedImg:HJSetImg(@"")];
if((TargetType == 2)||(TargetType == 4)){
......@@ -346,11 +353,24 @@
endedBtn.hidden = true;
self.SelectModelView.hidden = true;
UILabel *totalTitleLb = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:HJLocalizedString(HJLocalizedString(@"剩余总时长")) withFont:XHFontSize(15) withTextColor:XHTextFieldTextPlaceholderColor withResize:true];
[totalTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.SelectModelView);
make.bottom.equalTo(self.startBtn.mas_top).offset(-70);
}];
_totalTimeLb = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:HJLocalizedString(HJLocalizedString(@"00:00:00")) withFont:XHFontSizeBold(24) withTextColor:XHBtnTextColor withResize:true];
[_totalTimeLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.SelectModelView);
make.top.equalTo(totalTitleLb.mas_bottom).offset(10);
}];
#pragma mark 20231019 RequirementChangeRecord
left3Mbtn.hidden = true;
left10Mbtn.hidden = true;
right3Mbtn.hidden = true;
right10Mbtn.hidden = true;
// left3Mbtn.hidden = true;
// left10Mbtn.hidden = true;
// right3Mbtn.hidden = true;
// right10Mbtn.hidden = true;
}
-(void)selectPlanOrSatrtAction:(UIButton*)sender{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment