Commit 56ee1736 by 路少雄

1.2.1线上版本

parent e41afef7
...@@ -3105,7 +3105,7 @@ ...@@ -3105,7 +3105,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImageWater; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImageWater;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 8Z4G7AGK6D; DEVELOPMENT_TEAM = 8Z4G7AGK6D;
GCC_PREFIX_HEADER = "$(SRCROOT)/DJMHomeTY/Global/Define/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/DJMHomeTY/Global/Define/PrefixHeader.pch";
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
...@@ -3130,7 +3130,7 @@ ...@@ -3130,7 +3130,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.1.3; MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = djm.imoreme.com.DJMDrWater; PRODUCT_BUNDLE_IDENTIFIER = djm.imoreme.com.DJMDrWater;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
...@@ -3150,7 +3150,7 @@ ...@@ -3150,7 +3150,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImageWater; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImageWater;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 8Z4G7AGK6D; DEVELOPMENT_TEAM = 8Z4G7AGK6D;
GCC_PREFIX_HEADER = "$(SRCROOT)/DJMHomeTY/Global/Define/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/DJMHomeTY/Global/Define/PrefixHeader.pch";
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
...@@ -3175,7 +3175,7 @@ ...@@ -3175,7 +3175,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.1.3; MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = djm.imoreme.com.DJMDrWater; PRODUCT_BUNDLE_IDENTIFIER = djm.imoreme.com.DJMDrWater;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "HFX_041_stop@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "HFX_041_stop@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -427,6 +427,7 @@ ...@@ -427,6 +427,7 @@
weakSelf.remaintime = [[self defaultTime] integerValue];// weakSelf.remaintime = [[self defaultTime] integerValue];//
weakSelf.verificationNum = @""; weakSelf.verificationNum = @"";
}else{ }else{
// weakSelf.remaintime = 10;
weakSelf.remaintime = [weakSelf.dataModel.orderMap.remaintime integerValue]; weakSelf.remaintime = [weakSelf.dataModel.orderMap.remaintime integerValue];
weakSelf.verificationNum = weakSelf.dataModel.consumableMap.consumablenumber; weakSelf.verificationNum = weakSelf.dataModel.consumableMap.consumablenumber;
} }
......
...@@ -25,13 +25,13 @@ ...@@ -25,13 +25,13 @@
-(void)initCtrl:(CGRect)frame -(void)initCtrl:(CGRect)frame
{ {
UIButton *btnCancel = [[UIButton alloc ] initWithFrame:CGRectMake(0, 0, 80, 40)]; UIButton *btnCancel = [[UIButton alloc ] initWithFrame:CGRectMake(0, 0, 80, 40)];
[btnCancel setTitle:@"取消" forState:UIControlStateNormal]; [btnCancel setTitle:HJLocalizedString(@"取消") forState:UIControlStateNormal];
[btnCancel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [btnCancel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[btnCancel addTarget:self action:@selector(onButtonCancel) forControlEvents:UIControlEventTouchUpInside]; [btnCancel addTarget:self action:@selector(onButtonCancel) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:btnCancel]; [self addSubview:btnCancel];
UIButton *btnFinish = [[UIButton alloc ] initWithFrame:CGRectMake(self.frame.size.width-80, 0, 80, 40)]; UIButton *btnFinish = [[UIButton alloc ] initWithFrame:CGRectMake(self.frame.size.width-80, 0, 80, 40)];
[btnFinish setTitle:@"完成" forState:UIControlStateNormal]; [btnFinish setTitle:HJLocalizedString(@"完成") forState:UIControlStateNormal];
[btnFinish setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [btnFinish setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[btnFinish addTarget:self action:@selector(onButtonFinish) forControlEvents:UIControlEventTouchUpInside]; [btnFinish addTarget:self action:@selector(onButtonFinish) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:btnFinish]; [self addSubview:btnFinish];
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
@property (nonatomic,assign) NSInteger userID; @property (nonatomic,assign) NSInteger userID;
//token //token
@property (nonatomic,copy) NSString *token; @property (nonatomic,copy) NSString *token;
/// 上次操作流速
@property (nonatomic,assign) NSInteger currentspeed;
/// 密码 /// 密码
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define Sex @"sex" #define Sex @"sex"
#define Age @"age" #define Age @"age"
#define Currentspeed @"currentspeed"
#define ClientId @"clientId" #define ClientId @"clientId"
...@@ -148,6 +148,16 @@ ...@@ -148,6 +148,16 @@
return [[self userDefaults] integerForKey:Sex]; return [[self userDefaults] integerForKey:Sex];
} }
-(void)setCurrentspeed:(NSInteger)currentspeed{
[[self userDefaults] setInteger:currentspeed forKey:Currentspeed];
[[self userDefaults] synchronize];
}
-(NSInteger)currentspeed{
return [[self userDefaults] integerForKey:Currentspeed];
}
-(void)setAge:(NSString *)age{ -(void)setAge:(NSString *)age{
[[self userDefaults] setObject:age forKey:Age]; [[self userDefaults] setObject:age forKey:Age];
[[self userDefaults] synchronize]; [[self userDefaults] synchronize];
......
...@@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface DXHFXUpkeepVC : XHParentVC @interface DXHFXUpkeepVC : XHParentVC
@property (nonatomic,assign) BOOL isStrengthen;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -177,8 +177,13 @@ ...@@ -177,8 +177,13 @@
NSArray *tipsArray;
if (self.isStrengthen) {
tipsArray = @[HJLocalizedString(@"取空瓶灌装 30℃左右的温水,安装在精华液瓶的位置,并安装好废水瓶"),HJLocalizedString(@"在手柄上把流量调节到最大,点击“▶”进行保养"),HJLocalizedString(@"清洁件用透明盖子或手指堵住探头,间隔一段时间松开"),HJLocalizedString(@"50秒后结束保养,请卸下瓶子"),HJLocalizedString(@"最后,请记得清洗废水瓶")];
}else{
tipsArray = @[HJLocalizedString(@"取空瓶灌装 30℃左右的温水,安装在精华液瓶的位置,并安装好废水瓶"),HJLocalizedString(@"在手柄上把流量调节到最大,点击“▶”进行保养"),HJLocalizedString(@"清洁件用透明盖子或手指堵住探头,间隔一段时间松开"),HJLocalizedString(@"45秒后结束保养,请卸下瓶子"),HJLocalizedString(@"最后,请记得清洗废水瓶")];
}
NSArray *tipsArray = @[HJLocalizedString(@"取空瓶灌装 30℃左右的温水,安装在精华液瓶的位置,并安装好废水瓶"),HJLocalizedString(@"在手柄上把流量调节到最大,点击“▶”进行保养"),HJLocalizedString(@"清洁件用透明盖子或手指堵住探头,间隔一段时间松开"),HJLocalizedString(@"45秒后结束保养,请卸下瓶子"),HJLocalizedString(@"最后,请记得清洗废水瓶")];
UILabel *lastLb; UILabel *lastLb;
for (int i = 0; i < tipsArray.count; i ++) { for (int i = 0; i < tipsArray.count; i ++) {
UILabel *numLb = [UILabel new]; UILabel *numLb = [UILabel new];
...@@ -288,7 +293,9 @@ ...@@ -288,7 +293,9 @@
NSMutableDictionary *paramsDic = [NSMutableDictionary dictionary]; NSMutableDictionary *paramsDic = [NSMutableDictionary dictionary];
[paramsDic setObject:@"1" forKey:@"type"]; [paramsDic setObject:@"1" forKey:@"type"];
if (XHGetDataManager.deviceCode) {
[paramsDic setObject:XHGetDataManager.deviceCode?XHGetDataManager.deviceCode:@"" forKey:@"deviceCode"];
}
[[XHHttpRequestManager shareManager] getHttpRequestURL:HFXGetVideoList isJson:NO parameters:paramsDic success:^(id responseObject) { [[XHHttpRequestManager shareManager] getHttpRequestURL:HFXGetVideoList isJson:NO parameters:paramsDic success:^(id responseObject) {
[SVProgressHUD dismiss]; [SVProgressHUD dismiss];
NSLog(@"responseObject:\n%@===%@",responseObject,responseObject[@"msg"]); NSLog(@"responseObject:\n%@===%@",responseObject,responseObject[@"msg"]);
...@@ -341,12 +348,40 @@ ...@@ -341,12 +348,40 @@
if (XHGetDataManager.deviceID) { if (XHGetDataManager.deviceID) {
sender.selected = !sender.selected; sender.selected = !sender.selected;
if(self.totalTime == 0){ if(self.totalTime == 0){
self.totalTime = 45; if (self.isStrengthen) {
self.totalTime = 50;
}else{
self.totalTime = 45;
}
} }
if(sender.selected){ if(sender.selected){
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_start] withCrc16Modbus]];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_bymode] withCrc16Modbus]]; if (self.isStrengthen) {
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:4 withLength:2]] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_start] withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_bymode] withCrc16Modbus]];
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:4 withLength:2]] withCrc16Modbus]];
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self pumpStart];
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.8 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changePumpSpeedWithSize:100];
});
}else{
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_start] withCrc16Modbus]];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_bymode] withCrc16Modbus]];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:4 withLength:2]] withCrc16Modbus]];
}
if (self.timer1 == nil) { if (self.timer1 == nil) {
self.timer1=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(timerAction1) userInfo:nil repeats:YES]; self.timer1=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(timerAction1) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:self.timer1 forMode:NSDefaultRunLoopMode]; [[NSRunLoop mainRunLoop] addTimer:self.timer1 forMode:NSDefaultRunLoopMode];
...@@ -371,7 +406,9 @@ ...@@ -371,7 +406,9 @@
[self requestData]; [self requestData];
}else{ }else{
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_stop] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_stop] withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self pumpStop];
});
[self.timer1 invalidate]; [self.timer1 invalidate];
self.timer1=nil; self.timer1=nil;
} }
...@@ -422,7 +459,9 @@ ...@@ -422,7 +459,9 @@
[self.timer1 invalidate]; [self.timer1 invalidate];
self.timer1=nil; self.timer1=nil;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self pumpStop];
});
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
...@@ -465,6 +504,24 @@ ...@@ -465,6 +504,24 @@
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
} }
/// 调节蠕动泵速度
- (void)changePumpSpeedWithSize:(NSInteger)size{
if (size != 100) {
size += 20;
}
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_pumpSpeedChange,[[HJTools shared] ToLongHex:size withLength:2]] withCrc16Modbus]];
}
/// 蠕动泵开启
- (void)pumpStart{
[HJGetBluetoothManager writeStr:[DR04_HFX_send_pumpStart withCrc16Modbus]];
}
/// 蠕动泵关闭
- (void)pumpStop{
[HJGetBluetoothManager writeStr:[DR04_HFX_send_pumpStop withCrc16Modbus]];
}
#pragma mark --委托代理 #pragma mark --委托代理
#pragma mark --懒加载 #pragma mark --懒加载
......
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
@property (nonatomic,strong) NSString *localIsupkeep; @property (nonatomic,strong) NSString *localIsupkeep;
@property (nonatomic,assign) BOOL isStrengthen; @property (nonatomic,assign) BOOL isStrengthen;
@property (nonatomic,strong) NSString *extraTimeIsUsed;//额外时间是否使用
@property (nonatomic,strong)NSString *extraTimeValue;//额外时长
@end @end
...@@ -92,8 +94,54 @@ ...@@ -92,8 +94,54 @@
self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime]; self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
self.guestureId = [dic objectForKey:@"guestureId"]; self.guestureId = [dic objectForKey:@"guestureId"];
self.localIsupkeep = [dic objectForKey:@"isUpkeep"]; self.localIsupkeep = [dic objectForKey:@"isUpkeep"];
self.extraTimeIsUsed = [dic objectForKey:@"extraTimeIsUsed"];
self.extraTimeValue = [dic objectForKey:@"extraTimeValue"];
if (self.totalTime > 0 && self.remaintime > 0 && self.remaintime > self.totalTime) {
if (XHGetDataManager.currentspeed != 0) {
self.currentspeed = XHGetDataManager.currentspeed;
self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed];
}else{
self.currentspeed = 10;
self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed];
}
[self changePumpSpeedWithSize:self.currentspeed];
self.myView.xdtimeLb.text = [[HJTools shared] minusToTime:self.xdtotalTime];
[self.xdtimer invalidate];
self.xdtimer=nil;
[HJGetBluetoothManager writeStr:[DR04_HFX_send_stop withCrc16Modbus]];
// [self alertXDTipsWithString:@"设备清洁已完成,请开始护理洁面" isPop:NO];
self.myView.timeLb.hidden = NO;
self.myView.xdtimeLb.hidden = YES;
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]];
[HJGetBluetoothManager writeStr:[DR04_HFX_send_hlMode withCrc16Modbus]];
self.myView.xdBtn.selected = NO;
self.myView.hlBtn.selected = YES;
// self.myView.xdBtn.imageView.tintColor = XHColorRGB(175, 44, 35);
// self.myView.hlBtn.imageView.tintColor = XHColorRGB(255, 255, 255);
self.myView.decBtn.enabled = YES;
self.myView.addBtn.enabled = YES;
self.myView.stressLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
self.myView.stressTitleLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
self.myView.speedDecBtn.enabled = YES;
self.myView.speedAddBtn.enabled = YES;
self.myView.speedStressLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
self.myView.speedStressTitleLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
self.currentState = 1;
[self.myView controlWithItem:self.myView.hlBtn];
}
}else{
self.extraTimeIsUsed = @"0";
self.extraTimeValue = @"300";
} }
}else{
self.extraTimeIsUsed = @"0";
self.extraTimeValue = @"300";
} }
// [self checkDeviceVersionWithResult:^(BOOL isUpdate) { // [self checkDeviceVersionWithResult:^(BOOL isUpdate) {
...@@ -200,7 +248,14 @@ ...@@ -200,7 +248,14 @@
- (void)initData - (void)initData
{ {
self.currentStress = 0; self.currentStress = 0;
self.currentspeed = 10; if (XHGetDataManager.currentspeed != 0) {
self.currentspeed = XHGetDataManager.currentspeed;
self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed];
}else{
self.currentspeed = 10;
self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed];
}
self.isNeedUpkeep = NO; self.isNeedUpkeep = NO;
self.isStrengthen = NO; self.isStrengthen = NO;
self.istimeClean = NO; self.istimeClean = NO;
...@@ -256,6 +311,9 @@ ...@@ -256,6 +311,9 @@
[paramsDic setObject:@"0" forKey:@"type"]; [paramsDic setObject:@"0" forKey:@"type"];
if (XHGetDataManager.deviceCode) {
[paramsDic setObject:XHGetDataManager.deviceCode?XHGetDataManager.deviceCode:@"" forKey:@"deviceCode"];
}
[[XHHttpRequestManager shareManager] getHttpRequestURL:HFXGetVideoList isJson:NO parameters:paramsDic success:^(id responseObject) { [[XHHttpRequestManager shareManager] getHttpRequestURL:HFXGetVideoList isJson:NO parameters:paramsDic success:^(id responseObject) {
[SVProgressHUD dismiss]; [SVProgressHUD dismiss];
NSLog(@"responseObject:\n%@===%@",responseObject,responseObject[@"msg"]); NSLog(@"responseObject:\n%@===%@",responseObject,responseObject[@"msg"]);
...@@ -281,8 +339,8 @@ ...@@ -281,8 +339,8 @@
HJSelfWeak; HJSelfWeak;
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
float percentage = (float)index / total; float percentage = (float)index / total;
[SVProgressHUD showProgress:percentage status:[NSString stringWithFormat:@"正在升级固件\n(已完成%.2f%%)\n请勿断开蓝牙",percentage * 100]]; // [SVProgressHUD showProgress:percentage status:[NSString stringWithFormat:@"正在升级固件\n(已完成%.2f%%)\n请勿断开蓝牙",percentage * 100]];
[SVProgressHUD showProgress:percentage status:[NSString stringWithFormat:@"%@\n(%@ %.2f%%)\n%@",HJLocalizedString(@"正在升级固件"),HJLocalizedString(@"已完成"),percentage * 100,HJLocalizedString(@"请勿断开蓝牙")]];
}); });
...@@ -297,6 +355,7 @@ ...@@ -297,6 +355,7 @@
} }
} }
DXHFXUpkeepVC *upkeepVC = [DXHFXUpkeepVC new]; DXHFXUpkeepVC *upkeepVC = [DXHFXUpkeepVC new];
upkeepVC.isStrengthen = self.isStrengthen;
[self.navigationController pushViewController:upkeepVC animated:YES]; [self.navigationController pushViewController:upkeepVC animated:YES];
} }
break; break;
...@@ -305,7 +364,12 @@ ...@@ -305,7 +364,12 @@
[HJGetBluetoothManager writeStr:[DR04_HFX_send_stop withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[DR04_HFX_send_stop withCrc16Modbus]];
if(self.totalTime > 0){ if(self.totalTime > 0){
self.xdtotalTime = 25; if (self.isStrengthen) {
self.xdtotalTime = 50;
}else{
self.xdtotalTime = 25;
}
} }
self.myView.timeLb.hidden = YES; self.myView.timeLb.hidden = YES;
...@@ -313,7 +377,10 @@ ...@@ -313,7 +377,10 @@
self.currentStress = 4; self.currentStress = 4;
self.myView.currentStress = [NSString stringWithFormat:@"%ld",self.currentStress]; self.myView.currentStress = [NSString stringWithFormat:@"%ld",self.currentStress];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]];
[HJGetBluetoothManager writeStr:[DR04_HFX_send_xdMode withCrc16Modbus]]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager writeStr:[DR04_HFX_send_xdMode withCrc16Modbus]];
});
} }
self.currentState = 0; self.currentState = 0;
} }
...@@ -358,7 +425,7 @@ ...@@ -358,7 +425,7 @@
break; break;
case Itemdec:{ case Itemdec:{
if(self.currentStress>0){ if(self.currentStress>1){
self.currentStress--; self.currentStress--;
self.myView.currentStress = [NSString stringWithFormat:@"%ld",self.currentStress]; self.myView.currentStress = [NSString stringWithFormat:@"%ld",self.currentStress];
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]];
...@@ -384,7 +451,7 @@ ...@@ -384,7 +451,7 @@
self.currentspeed--; self.currentspeed--;
self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed]; self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed];
[self changePumpSpeedWithSize:self.currentspeed]; [self changePumpSpeedWithSize:self.currentspeed];
XHGetDataManager.currentspeed = self.currentspeed;
} }
} }
...@@ -394,6 +461,7 @@ ...@@ -394,6 +461,7 @@
self.currentspeed++; self.currentspeed++;
self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed]; self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed];
[self changePumpSpeedWithSize:self.currentspeed]; [self changePumpSpeedWithSize:self.currentspeed];
XHGetDataManager.currentspeed = self.currentspeed;
} }
} }
...@@ -454,14 +522,30 @@ ...@@ -454,14 +522,30 @@
// [HJGetBluetoothManager stopScanning]; // [HJGetBluetoothManager stopScanning];
// [HJGetBluetoothManager stopConnect]; // [HJGetBluetoothManager stopConnect];
// [HJGetBluetoothManager.delegate removeBluetoothDelegate:self]; // [HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
if(![HJUserDefaults objectForKey:@"updateDictyDr04"] && self.guestureId){
[self saveLocationRecord]; if (![self.extraTimeIsUsed boolValue]) {
if(![HJUserDefaults objectForKey:@"updateDictyDr04"] && self.guestureId){
[self saveLocationRecord];
}
[self updateDr04Record];
}else{
self.isUpdateSucceed = YES;
} }
[self updateDr04Record];
self.totalTime = 0; self.totalTime = 0;
self.xdtotalTime = 25; // self.extraTimeValue = @"0";
if (self.isStrengthen) {
self.xdtotalTime = 50;
}else{
self.xdtotalTime = 25;
}
self.guestureId = nil; self.guestureId = nil;
self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime]; self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
self.currentState = 0;
[self.myView controlWithItem:self.myView.xdBtn];
// if([HJUserDefaults objectForKey:@"updateDictyDr04"]){ // if([HJUserDefaults objectForKey:@"updateDictyDr04"]){
// NSMutableDictionary *dic = [NSMutableDictionary dictionary]; // NSMutableDictionary *dic = [NSMutableDictionary dictionary];
// [dic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDr04"]]; // [dic addEntriesFromDictionary:[HJUserDefaults objectForKey:@"updateDictyDr04"]];
...@@ -649,6 +733,7 @@ ...@@ -649,6 +733,7 @@
//获取UV灯状态 //获取UV灯状态
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_getUVState] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:DR04_HFX_send_getUVState] withCrc16Modbus]];
}); });
[self requestVideoList];
} }
#pragma mark ======= ble收到命令 ======= #pragma mark ======= ble收到命令 =======
- (void)didUpdateValueForCharacteristicValue:(NSString *)value{ - (void)didUpdateValueForCharacteristicValue:(NSString *)value{
...@@ -751,7 +836,7 @@ ...@@ -751,7 +836,7 @@
} }
} }
}else{ }else{
[SVProgressHUD showInfoWithStatus:@"请扫描耗材二维码"]; [SVProgressHUD showInfoWithStatus:HJLocalizedString(@"请扫描耗材二维码")];
} }
} }
...@@ -788,7 +873,7 @@ ...@@ -788,7 +873,7 @@
weakSelf.UploadAlert.message = [NSString stringWithFormat:@"%.2f",much]; weakSelf.UploadAlert.message = [NSString stringWithFormat:@"%.2f",much];
}else{ }else{
weakSelf.UploadAlert.message = [NSString stringWithFormat:@"更新完成"]; weakSelf.UploadAlert.message = [NSString stringWithFormat:HJLocalizedString(@"更新完成")];
} }
if(![message isEqualToString:@""] && message!=nil) if(![message isEqualToString:@""] && message!=nil)
...@@ -870,6 +955,8 @@ ...@@ -870,6 +955,8 @@
[paramsDic setObject:self.guestureId forKey:@"cid"]; [paramsDic setObject:self.guestureId forKey:@"cid"];
[paramsDic setObject:[NSString isNull:self.verificationNum]?@"0":self.verificationNum forKey:@"verificationNum"]; [paramsDic setObject:[NSString isNull:self.verificationNum]?@"0":self.verificationNum forKey:@"verificationNum"];
[paramsDic setObject:self.localIsupkeep?self.localIsupkeep:@"0" forKey:@"isUpkeep"]; [paramsDic setObject:self.localIsupkeep?self.localIsupkeep:@"0" forKey:@"isUpkeep"];
[paramsDic setObject:self.extraTimeIsUsed?self.extraTimeIsUsed:@"0" forKey:@"extraTimeIsUsed"];
[paramsDic setObject:self.extraTimeValue?self.extraTimeValue:@"0" forKey:@"extraTimeValue"];
[HJUserDefaults setObject:paramsDic forKey:@"updateDictyDr04"]; [HJUserDefaults setObject:paramsDic forKey:@"updateDictyDr04"];
[HJUserDefaults synchronize]; [HJUserDefaults synchronize];
} }
...@@ -886,16 +973,28 @@ ...@@ -886,16 +973,28 @@
if (!self.isStrengthen) { if (!self.isStrengthen) {
if (self.xdtotalTime == 25) { if (self.xdtotalTime == 25) {
[self alertXDTipsWithString:@"清洁中..." isPop:NO]; [self alertXDTipsWithString:HJLocalizedString(@"清洁中...") isPop:NO];
}else if (self.xdtotalTime == 0){ }else if (self.xdtotalTime == 0){
[SVProgressHUD showInfoWithStatus:@"请验证耗材有效性"]; [SVProgressHUD showInfoWithStatus:HJLocalizedString(@"请验证耗材有效性")];
return; return;
} }
self.currentStress = 4; self.currentStress = 4;
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]];
[HJGetBluetoothManager writeStr:[DR04_HFX_send_xdMode withCrc16Modbus]];
if (self.xdtotalTime != 0 && self.xdtotalTime <= 8) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager writeStr:[DR04_HFX_send_hlMode withCrc16Modbus]];
});
}else{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager writeStr:[DR04_HFX_send_xdMode withCrc16Modbus]];
});
}
if (self.xdtimer == nil) { if (self.xdtimer == nil) {
self.xdtimer=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(xdtimerAction) userInfo:nil repeats:YES]; self.xdtimer=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(xdtimerAction) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:self.xdtimer forMode:NSDefaultRunLoopMode]; [[NSRunLoop mainRunLoop] addTimer:self.xdtimer forMode:NSDefaultRunLoopMode];
...@@ -903,25 +1002,34 @@ ...@@ -903,25 +1002,34 @@
} }
}else{ }else{
if (self.xdtotalTime == 50) { if (self.xdtotalTime == 50) {
[self alertXDTipsWithString:@"清洁中..." isPop:NO]; [self alertXDTipsWithString:HJLocalizedString(@"清洁中...") isPop:NO];
}else if (self.xdtotalTime == 0){ }else if (self.xdtotalTime == 0){
[SVProgressHUD showInfoWithStatus:@"请验证耗材有效性"]; [SVProgressHUD showInfoWithStatus:HJLocalizedString(@"请验证耗材有效性")];
return; return;
} }
self.currentStress = 4; self.currentStress = 4;
[HJGetBluetoothManager writeStr:[DR04_HFX_send_xdMode withCrc16Modbus]]; self.myView.currentSpeed = @"10";
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self pumpStart]; if (self.xdtotalTime != 0 && self.xdtotalTime <= 35) {
}); [HJGetBluetoothManager writeStr:[DR04_HFX_send_hlMode withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]];
}); });
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.9 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changePumpSpeedWithSize:100]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
}); [self pumpStart];
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changePumpSpeedWithSize:100];
});
}else{
[HJGetBluetoothManager writeStr:[DR04_HFX_send_xdMode withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]];
});
}
if (self.xdtimer == nil) { if (self.xdtimer == nil) {
self.xdtimer=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(xdtimerAction) userInfo:nil repeats:YES]; self.xdtimer=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(xdtimerAction) userInfo:nil repeats:YES];
...@@ -936,6 +1044,15 @@ ...@@ -936,6 +1044,15 @@
//发档位 //发档位
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]];
[HJGetBluetoothManager writeStr:[DR04_HFX_send_hlMode withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[DR04_HFX_send_hlMode withCrc16Modbus]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self pumpStart];
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changePumpSpeedWithSize:self.currentspeed];
});
// 2、开始计时器 // 2、开始计时器
if (self.timer == nil) { if (self.timer == nil) {
self.timer=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(timerAction) userInfo:nil repeats:YES]; self.timer=[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(timerAction) userInfo:nil repeats:YES];
...@@ -968,9 +1085,14 @@ ...@@ -968,9 +1085,14 @@
if (self.isStrengthen) { if (self.isStrengthen) {
if (self.xdtotalTime == 35) { if (self.xdtotalTime == 35) {
[HJGetBluetoothManager writeStr:[DR04_HFX_send_hlMode withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[DR04_HFX_send_hlMode withCrc16Modbus]];
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(200 * NSEC_PER_MSEC)), dispatch_get_main_queue(), ^{
// [HJGetBluetoothManager writeStr:[DR04_HFX_send_start withCrc16Modbus]]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// }); [self pumpStart];
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self changePumpSpeedWithSize:100];
});
} }
}else{ }else{
...@@ -986,12 +1108,19 @@ ...@@ -986,12 +1108,19 @@
self.myView.xdtimeLb.text = [[HJTools shared] minusToTime:self.xdtotalTime]; self.myView.xdtimeLb.text = [[HJTools shared] minusToTime:self.xdtotalTime];
}else{ }else{
[self changePumpSpeedWithSize:10]; if (XHGetDataManager.currentspeed != 0) {
self.currentspeed = XHGetDataManager.currentspeed;
self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed];
}else{
self.currentspeed = 10;
self.myView.currentSpeed = [NSString stringWithFormat:@"%ld",self.currentspeed];
}
[self changePumpSpeedWithSize:self.currentspeed];
self.myView.xdtimeLb.text = [[HJTools shared] minusToTime:self.xdtotalTime]; self.myView.xdtimeLb.text = [[HJTools shared] minusToTime:self.xdtotalTime];
[self.xdtimer invalidate]; [self.xdtimer invalidate];
self.xdtimer=nil; self.xdtimer=nil;
[HJGetBluetoothManager writeStr:[DR04_HFX_send_stop withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[DR04_HFX_send_stop withCrc16Modbus]];
[self alertXDTipsWithString:@"清洁完成" isPop:NO]; [self alertXDTipsWithString:HJLocalizedString(@"设备清洁已完成,请开始护理洁面") isPop:NO];
self.myView.timeLb.hidden = NO; self.myView.timeLb.hidden = NO;
self.myView.xdtimeLb.hidden = YES; self.myView.xdtimeLb.hidden = YES;
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"%@%@",DR04_HFX_send_energy,[[HJTools shared] ToLongHex:self.currentStress withLength:2]] withCrc16Modbus]];
...@@ -1002,14 +1131,14 @@ ...@@ -1002,14 +1131,14 @@
// self.myView.hlBtn.imageView.tintColor = XHColorRGB(255, 255, 255); // self.myView.hlBtn.imageView.tintColor = XHColorRGB(255, 255, 255);
self.myView.decBtn.enabled = YES; self.myView.decBtn.enabled = YES;
self.myView.addBtn.enabled = YES; self.myView.addBtn.enabled = YES;
self.myView.stressLb.textColor = XHColorRGB_Alpha(0, 0, 0, 1); self.myView.stressLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
self.myView.stressTitleLb.textColor = XHColorRGB_Alpha(0, 0, 0, 1); self.myView.stressTitleLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
self.myView.speedDecBtn.enabled = YES; self.myView.speedDecBtn.enabled = YES;
self.myView.speedAddBtn.enabled = YES; self.myView.speedAddBtn.enabled = YES;
self.myView.speedStressLb.textColor = XHColorRGB_Alpha(0, 0, 0, 1); self.myView.speedStressLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
self.myView.speedStressTitleLb.textColor = XHColorRGB_Alpha(0, 0, 0, 1); self.myView.speedStressTitleLb.textColor = XHColorRGB_Alpha(51, 51, 51, 1);
self.currentState = 1; self.currentState = 1;
[self.myView controlWithItem:self.myView.hlBtn]; [self.myView controlWithItem:self.myView.hlBtn];
...@@ -1019,10 +1148,10 @@ ...@@ -1019,10 +1148,10 @@
} }
-(void)timerAction{ -(void)timerAction{
self.totalTime--;
if(self.totalTime>0){ if(self.totalTime>0){
//DR04_HFX_send_getEnergy //DR04_HFX_send_getEnergy
self.totalTime--;
self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime]; self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
if((self.remaintime-self.totalTime)%20==0){ if((self.remaintime-self.totalTime)%20==0){
[self saveLocationRecord]; [self saveLocationRecord];
...@@ -1032,14 +1161,74 @@ ...@@ -1032,14 +1161,74 @@
[self playSoundEffect:@"working.wav"]; [self playSoundEffect:@"working.wav"];
} }
}else{ }else{
self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
[self alertXDTipsWithString:@"护理已完成..." isPop:YES];
self.xdtotalTime = 25; if (![self.extraTimeIsUsed boolValue]) {
[self updateDr04Record]; if ([self.extraTimeValue intValue] != 0) {
_UploadAlert = [[HJAlertView alloc] init];
_UploadAlert.parentView = [UIApplication sharedApplication].keyWindow;
_UploadAlert.title = HJLocalizedString(@"提示");
_UploadAlert.message = HJLocalizedString(@"当前护理已完成,是否继续操作?");
[_UploadAlert setButtonTitles:[NSMutableArray arrayWithObjects:HJLocalizedString(@"取消"),HJLocalizedString(@"确定"), nil]];
[_UploadAlert show];
HJSelfWeak;
_UploadAlert.onButtonTouchUpInside = ^(HJAlertView * _Nonnull alertView, NSInteger buttonIndex) {
if(buttonIndex == 1){
[weakSelf updateDr04Record];
weakSelf.totalTime = [weakSelf.extraTimeValue integerValue];
weakSelf.myView.timeLb.text = [[HJTools shared] minusToTime:[weakSelf.extraTimeValue integerValue]];
weakSelf.extraTimeIsUsed = @"1";
}else{
[weakSelf.UploadAlert close];
weakSelf.myView.timeLb.text = [[HJTools shared] minusToTime:weakSelf.totalTime];
[weakSelf alertXDTipsWithString:HJLocalizedString(@"护理已完成...") isPop:YES];
if (weakSelf.isStrengthen) {
weakSelf.xdtotalTime = 50;
}else{
weakSelf.xdtotalTime = 25;
}
[weakSelf pumpStop];
[weakSelf updateDr04Record];
[weakSelf stopDr04Action];
weakSelf.guestureId = nil;
weakSelf.currentState = 0;
[weakSelf.myView controlWithItem:weakSelf.myView.xdBtn];
}
[alertView close];
};
}
}else{
self.myView.timeLb.text = [[HJTools shared] minusToTime:self.totalTime];
[self alertXDTipsWithString:HJLocalizedString(@"护理已完成...") isPop:YES];
if (self.isStrengthen) {
self.xdtotalTime = 50;
}else{
self.xdtotalTime = 25;
}
[self pumpStop];
[self updateDr04Record];
[self stopDr04Action];
self.guestureId = nil;
self.currentState = 0;
[self.myView controlWithItem:self.myView.xdBtn];
}
[self stopDr04Action]; [self stopDr04Action];
self.guestureId = nil;
} }
} }
- (void)alertXDTipsWithString:(NSString *)tips isPop:(BOOL)ispop{ - (void)alertXDTipsWithString:(NSString *)tips isPop:(BOOL)ispop{
...@@ -1217,7 +1406,7 @@ ...@@ -1217,7 +1406,7 @@
if(buttonIndex == 1){//升级 if(buttonIndex == 1){//升级
[HJGetBluetoothManager writeStr:[DR04_HFX_send_getUpdateVersion withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[DR04_HFX_send_getUpdateVersion withCrc16Modbus]];
[weakSelf.UploadAlert close]; [weakSelf.UploadAlert close];
[SVProgressHUD showWithStatus:@"正在准备升级..."]; [SVProgressHUD showWithStatus:HJLocalizedString(@"正在准备升级...")];
}else{ }else{
[weakSelf.UploadAlert close]; [weakSelf.UploadAlert close];
} }
......
...@@ -54,5 +54,6 @@ ...@@ -54,5 +54,6 @@
_model = model; _model = model;
[_titleImg sd_setImageWithURL:[NSURL URLWithString:model.imgUrl] placeholderImage:[UIImage imageNamed:@"Main_Logo"]]; [_titleImg sd_setImageWithURL:[NSURL URLWithString:model.imgUrl] placeholderImage:[UIImage imageNamed:@"Main_Logo"]];
_titleLb.text = model.detail; _titleLb.text = model.detail;
} }
@end @end
...@@ -88,6 +88,33 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -88,6 +88,33 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
self.speedAddBtn.hidden = NO; self.speedAddBtn.hidden = NO;
self.speedStressLb.hidden = NO; self.speedStressLb.hidden = NO;
self.speedStressTitleLb.hidden = NO; self.speedStressTitleLb.hidden = NO;
self.centerline.hidden = NO;
[self.decBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@30);
make.top.equalTo(@(40 *IPhone6ScaleHeight));
}];
[self.addBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-30);
make.top.equalTo(@(40*IPhone6ScaleHeight));
}];
[self.stressLb mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.top.equalTo(@(48*IPhone6ScaleHeight));
}];
[self.stressTitleLb mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.top.equalTo(self.stressLb.mas_bottom).offset(5*IPhone6ScaleHeight);
}];
[self.timeImg mas_remakeConstraints:^(MASConstraintMaker *make) { [self.timeImg mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.decBtn); make.centerX.equalTo(self.decBtn);
make.top.equalTo(self.speedDecBtn.mas_bottom).offset(30*IPhone6ScaleHeight); make.top.equalTo(self.speedDecBtn.mas_bottom).offset(30*IPhone6ScaleHeight);
...@@ -102,6 +129,32 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -102,6 +129,32 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
self.speedAddBtn.hidden = YES; self.speedAddBtn.hidden = YES;
self.speedStressLb.hidden = YES; self.speedStressLb.hidden = YES;
self.speedStressTitleLb.hidden = YES; self.speedStressTitleLb.hidden = YES;
self.centerline.hidden = YES;
[self.decBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@30);
make.top.equalTo(@(80 *IPhone6ScaleHeight));
}];
[self.addBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-30);
make.top.equalTo(@(80*IPhone6ScaleHeight));
}];
[self.stressLb mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.top.equalTo(@(88*IPhone6ScaleHeight));
}];
[self.stressTitleLb mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView);
make.top.equalTo(self.stressLb.mas_bottom).offset(5*IPhone6ScaleHeight);
}];
[self.timeImg mas_remakeConstraints:^(MASConstraintMaker *make) { [self.timeImg mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.decBtn); make.centerX.equalTo(self.decBtn);
make.top.equalTo(self.decBtn.mas_bottom).offset(60*IPhone6ScaleHeight); make.top.equalTo(self.decBtn.mas_bottom).offset(60*IPhone6ScaleHeight);
...@@ -136,7 +189,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -136,7 +189,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
UIView *centerLine = [UIView new]; UIView *centerLine = [UIView new];
[self addSubview:centerLine]; [self addSubview:centerLine];
[centerLine mas_makeConstraints:^(MASConstraintMaker *make) { [centerLine mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.byBtn.mas_bottom).offset(15 *IPhone6ScaleHeight); make.top.equalTo(self.byBtn.mas_bottom).offset(22 *IPhone6ScaleHeight);
make.centerX.equalTo(self); make.centerX.equalTo(self);
make.size.mas_equalTo(CGSizeMake(0.1, 0.1)); make.size.mas_equalTo(CGSizeMake(0.1, 0.1));
}]; }];
...@@ -145,11 +198,11 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -145,11 +198,11 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
//HFX_xdnomal //HFX_xdnomal
[_xdBtn setBackgroundImage:[UIImage imageNamed:@"HFX_xdnomal"] forState:UIControlStateNormal]; [_xdBtn setBackgroundImage:[UIImage imageNamed:@"HFX_xdnomal"] forState:UIControlStateNormal];
[_xdBtn setBackgroundImage:[UIImage imageNamed:@"HFX_xdselect"] forState:UIControlStateSelected]; [_xdBtn setBackgroundImage:[UIImage imageNamed:@"HFX_xdselect"] forState:UIControlStateSelected];
[_xdBtn setTitle:HJLocalizedString(@"1.清洁设备") forState:UIControlStateNormal]; [_xdBtn setTitle:HJLocalizedString(@"清洁设备") forState:UIControlStateNormal];
_xdBtn.userInteractionEnabled = NO; _xdBtn.userInteractionEnabled = NO;
[_xdBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside]; [_xdBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_xdBtn.tag = Itemxiaodu; _xdBtn.tag = Itemxiaodu;
[_xdBtn setTitleColor:XHColorRGB(51, 51, 51) forState:UIControlStateNormal]; [_xdBtn setTitleColor:XHColorRGB(216, 167, 163) forState:UIControlStateNormal];
[_xdBtn setTitleColor:XHColorRGB(255, 255, 255) forState:UIControlStateSelected]; [_xdBtn setTitleColor:XHColorRGB(255, 255, 255) forState:UIControlStateSelected];
_xdBtn.titleLabel.font = XHFontSize(12); _xdBtn.titleLabel.font = XHFontSize(12);
// _xdBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 30, 0, 0); // _xdBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 30, 0, 0);
...@@ -162,11 +215,11 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -162,11 +215,11 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_hlBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _hlBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_hlBtn setBackgroundImage:[UIImage imageNamed:@"HFX_xdnomal"] forState:UIControlStateNormal]; [_hlBtn setBackgroundImage:[UIImage imageNamed:@"HFX_xdnomal"] forState:UIControlStateNormal];
[_hlBtn setBackgroundImage:[UIImage imageNamed:@"HFX_xdselect"] forState:UIControlStateSelected]; [_hlBtn setBackgroundImage:[UIImage imageNamed:@"HFX_xdselect"] forState:UIControlStateSelected];
[_hlBtn setTitle:HJLocalizedString(@"2.面部护理") forState:UIControlStateNormal]; [_hlBtn setTitle:HJLocalizedString(@"面部护理") forState:UIControlStateNormal];
[_hlBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside]; [_hlBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_hlBtn.userInteractionEnabled = NO; _hlBtn.userInteractionEnabled = NO;
_hlBtn.tag = Itemhuli; _hlBtn.tag = Itemhuli;
[_hlBtn setTitleColor:XHColorRGB(51, 51, 51) forState:UIControlStateNormal]; [_hlBtn setTitleColor:XHColorRGB(216, 167, 163) forState:UIControlStateNormal];
[_hlBtn setTitleColor:XHColorRGB(255, 255, 255) forState:UIControlStateSelected]; [_hlBtn setTitleColor:XHColorRGB(255, 255, 255) forState:UIControlStateSelected];
_hlBtn.titleLabel.font = XHFontSize(12); _hlBtn.titleLabel.font = XHFontSize(12);
// _hlBtn.titleEdgeInsets = UIEdgeInsetsMake(0, -30, 0, 0); // _hlBtn.titleEdgeInsets = UIEdgeInsetsMake(0, -30, 0, 0);
...@@ -238,7 +291,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -238,7 +291,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
make.centerX.equalTo(self); make.centerX.equalTo(self);
make.height.equalTo(@((HJScreenWidth - 38) * 0.5625)); make.height.equalTo(@((HJScreenWidth - 38) * 0.5625));
// make.height.equalTo(@0); // make.height.equalTo(@0);
make.top.equalTo(self.xdBtn.mas_bottom).offset(12*IPhone6ScaleHeight); make.top.equalTo(self.xdBtn.mas_bottom).offset(17*IPhone6ScaleHeight);
}]; }];
ZFAVPlayerManager *playerManager = [[ZFAVPlayerManager alloc] init]; ZFAVPlayerManager *playerManager = [[ZFAVPlayerManager alloc] init];
playerManager.shouldAutoPlay = YES; playerManager.shouldAutoPlay = YES;
...@@ -366,13 +419,14 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -366,13 +419,14 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_noChangeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _noChangeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_noChangeBtn setTitle:HJLocalizedString(@"清洁设备不可调节负压、流速") forState:UIControlStateNormal]; [_noChangeBtn setTitle:HJLocalizedString(@"清洁设备不可调节负压、流速") forState:UIControlStateNormal];
[_noChangeBtn setImage:[UIImage imageNamed:@"HFX_nochange"] forState:UIControlStateNormal]; [_noChangeBtn setImage:[UIImage imageNamed:@"HFX_nochange"] forState:UIControlStateNormal];
[_noChangeBtn setTitleColor:XHColorRGB_Alpha(0, 0, 0, 0.65) forState:UIControlStateNormal]; [_noChangeBtn setTitleColor:XHColorRGB_Alpha(117, 115, 115, 1) forState:UIControlStateNormal];
_noChangeBtn.titleLabel.font = XHFontSize(12); _noChangeBtn.titleLabel.font = XHFontSize(13);
_noChangeBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; _noChangeBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
_noChangeBtn.imageEdgeInsets = UIEdgeInsetsMake(0,-5, 0, 5);
[self.bottomView addSubview:_noChangeBtn]; [self.bottomView addSubview:_noChangeBtn];
[_noChangeBtn mas_makeConstraints:^(MASConstraintMaker *make) { [_noChangeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView); make.centerX.equalTo(self.bottomView);
make.top.equalTo(@(10 *IPhone6ScaleHeight )); make.top.equalTo(@(20 *IPhone6ScaleHeight ));
}]; }];
...@@ -384,7 +438,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -384,7 +438,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[self.bottomView addSubview:_decBtn]; [self.bottomView addSubview:_decBtn];
[_decBtn mas_makeConstraints:^(MASConstraintMaker *make) { [_decBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@30); make.left.equalTo(@30);
make.top.equalTo(@(30 *IPhone6ScaleHeight)); make.top.equalTo(@(80 *IPhone6ScaleHeight));
}]; }];
_addBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _addBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_addBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_add_dis"] forState:UIControlStateNormal]; [_addBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_add_dis"] forState:UIControlStateNormal];
...@@ -394,7 +448,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -394,7 +448,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[self.bottomView addSubview:_addBtn]; [self.bottomView addSubview:_addBtn];
[_addBtn mas_makeConstraints:^(MASConstraintMaker *make) { [_addBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@-30); make.right.equalTo(@-30);
make.top.equalTo(@(30*IPhone6ScaleHeight)); make.top.equalTo(@(80*IPhone6ScaleHeight));
}]; }];
_stressLb = [UILabel new]; _stressLb = [UILabel new];
_stressLb.text = @"0"; _stressLb.text = @"0";
...@@ -403,7 +457,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -403,7 +457,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[self.bottomView addSubview:_stressLb]; [self.bottomView addSubview:_stressLb];
[_stressLb mas_makeConstraints:^(MASConstraintMaker *make) { [_stressLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView); make.centerX.equalTo(self.bottomView);
make.top.equalTo(@(38*IPhone6ScaleHeight)); make.top.equalTo(@(88*IPhone6ScaleHeight));
}]; }];
_stressTitleLb = [UILabel new]; _stressTitleLb = [UILabel new];
_stressTitleLb.text = HJLocalizedString(@"负压调节"); _stressTitleLb.text = HJLocalizedString(@"负压调节");
...@@ -424,12 +478,14 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -424,12 +478,14 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
make.top.equalTo(self.addBtn.mas_bottom).offset(10); make.top.equalTo(self.addBtn.mas_bottom).offset(10);
make.height.equalTo(@0.5); make.height.equalTo(@0.5);
}]; }];
_centerline.hidden = YES;
_speedDecBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _speedDecBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_speedDecBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_lit_dis"] forState:UIControlStateNormal]; [_speedDecBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_lit_dis"] forState:UIControlStateNormal];
[_speedDecBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_lit"] forState:UIControlStateDisabled]; [_speedDecBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_lit"] forState:UIControlStateDisabled];
[_speedDecBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside]; [_speedDecBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_speedDecBtn.tag = Itemspeeddec; _speedDecBtn.tag = Itemspeeddec;
_speedDecBtn.hidden = YES;
[self.bottomView addSubview:_speedDecBtn]; [self.bottomView addSubview:_speedDecBtn];
[_speedDecBtn mas_makeConstraints:^(MASConstraintMaker *make) { [_speedDecBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.decBtn); make.left.equalTo(self.decBtn);
...@@ -440,6 +496,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -440,6 +496,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[_speedAddBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_add"] forState:UIControlStateDisabled]; [_speedAddBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_add"] forState:UIControlStateDisabled];
[_speedAddBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside]; [_speedAddBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_speedAddBtn.tag = Itemspeedadd; _speedAddBtn.tag = Itemspeedadd;
_speedAddBtn.hidden = YES;
[self.bottomView addSubview:_speedAddBtn]; [self.bottomView addSubview:_speedAddBtn];
[_speedAddBtn mas_makeConstraints:^(MASConstraintMaker *make) { [_speedAddBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.addBtn); make.right.equalTo(self.addBtn);
...@@ -447,6 +504,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -447,6 +504,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
}]; }];
_speedStressLb = [UILabel new]; _speedStressLb = [UILabel new];
_speedStressLb.text = @"10"; _speedStressLb.text = @"10";
_speedStressLb.hidden = YES;
_speedStressLb.font = [UIFont boldSystemFontOfSize:29]; _speedStressLb.font = [UIFont boldSystemFontOfSize:29];
_speedStressLb.textColor = [UIColor blackColor]; _speedStressLb.textColor = [UIColor blackColor];
[self.bottomView addSubview:_speedStressLb]; [self.bottomView addSubview:_speedStressLb];
...@@ -455,6 +513,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -455,6 +513,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
make.centerY.equalTo(self.speedDecBtn).multipliedBy(0.9); make.centerY.equalTo(self.speedDecBtn).multipliedBy(0.9);
}]; }];
_speedStressTitleLb = [UILabel new]; _speedStressTitleLb = [UILabel new];
_speedStressTitleLb.hidden = YES;
_speedStressTitleLb.text = HJLocalizedString(@"精华液流速"); _speedStressTitleLb.text = HJLocalizedString(@"精华液流速");
_speedStressTitleLb.font = XHFontSize(10); _speedStressTitleLb.font = XHFontSize(10);
_speedStressTitleLb.textColor = [UIColor blackColor]; _speedStressTitleLb.textColor = [UIColor blackColor];
...@@ -490,7 +549,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -490,7 +549,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[self.bottomView addSubview:_timeImg]; [self.bottomView addSubview:_timeImg];
[_timeImg mas_makeConstraints:^(MASConstraintMaker *make) { [_timeImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.decBtn); make.centerX.equalTo(self.decBtn);
make.top.equalTo(self.speedDecBtn.mas_bottom).offset(30*IPhone6ScaleHeight); make.top.equalTo(self.decBtn.mas_bottom).offset(60*IPhone6ScaleHeight);
make.size.mas_equalTo(CGSizeMake(22, 22)); make.size.mas_equalTo(CGSizeMake(22, 22));
}]; }];
...@@ -507,7 +566,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -507,7 +566,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_xdtimeLb = [UILabel new]; _xdtimeLb = [UILabel new];
_xdtimeLb.text = @"00:00"; _xdtimeLb.text = @"00:00";
_xdtimeLb.font = [UIFont boldSystemFontOfSize:28]; _xdtimeLb.font = [UIFont boldSystemFontOfSize:23];
_xdtimeLb.textColor = XHColorRGB(175, 44, 35); _xdtimeLb.textColor = XHColorRGB(175, 44, 35);
[self.bottomView addSubview:_xdtimeLb]; [self.bottomView addSubview:_xdtimeLb];
[_xdtimeLb mas_makeConstraints:^(MASConstraintMaker *make) { [_xdtimeLb mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -521,13 +580,13 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -521,13 +580,13 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_startBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _startBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_startBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_start"] forState:UIControlStateNormal]; [_startBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_start"] forState:UIControlStateNormal];
[_startBtn setBackgroundImage:[UIImage imageNamed:@"HFX_stop"] forState:UIControlStateSelected]; [_startBtn setBackgroundImage:[UIImage imageNamed:@"HFX_041_stop"] forState:UIControlStateSelected];
[_startBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside]; [_startBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_startBtn.tag = ItemstartOrstop; _startBtn.tag = ItemstartOrstop;
[self.bottomView addSubview:_startBtn]; [self.bottomView addSubview:_startBtn];
[_startBtn mas_makeConstraints:^(MASConstraintMaker *make) { [_startBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomView); make.centerX.equalTo(self.bottomView);
make.centerY.equalTo(self.timeImg).multipliedBy(1.1); make.centerY.equalTo(self.timeImg).multipliedBy(1.075);
}]; }];
_clearTimeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _clearTimeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
...@@ -576,10 +635,10 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -576,10 +635,10 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_addBtn.enabled = NO; _addBtn.enabled = NO;
_speedDecBtn.enabled = NO; _speedDecBtn.enabled = NO;
_speedAddBtn.enabled = NO; _speedAddBtn.enabled = NO;
_stressLb.textColor = XHColorRGB_Alpha(0, 0, 0, 0.35); _stressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_stressTitleLb.textColor = XHColorRGB_Alpha(0, 0, 0, 0.35); _stressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_speedStressLb.textColor = XHColorRGB_Alpha(0, 0, 0, 0.35); _speedStressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_speedStressTitleLb.textColor = XHColorRGB_Alpha(0, 0, 0, 0.35); _speedStressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
[self setTimeLineWithString:_currentVideoList[0].describeInfo]; [self setTimeLineWithString:_currentVideoList[0].describeInfo];
} }
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
...@@ -821,9 +880,24 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -821,9 +880,24 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_decBtn.enabled = YES; _decBtn.enabled = YES;
_addBtn.enabled = YES; _addBtn.enabled = YES;
_noChangeBtn.hidden = YES; [_noChangeBtn setTitle:HJLocalizedString(@"流速以拔起探头不会滴水为佳") forState:UIControlStateNormal];
_stressLb.textColor = XHColorRGB_Alpha(0, 0, 0,1); // _stressLb.textColor = XHColorRGB_Alpha(0, 0, 0,1);
_stressTitleLb.textColor = XHColorRGB_Alpha(0, 0, 0, 1); // _stressTitleLb.textColor = XHColorRGB_Alpha(0, 0, 0, 1);
_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);
self.timeLb.hidden = NO;
self.xdtimeLb.hidden = YES;
_currentVideoList = self.videoModel.careVideoList; _currentVideoList = self.videoModel.careVideoList;
[self changePlayVideoWithModel:self.currentVideoList[0]]; [self changePlayVideoWithModel:self.currentVideoList[0]];
[self.timesBtnArray removeAllObjects]; [self.timesBtnArray removeAllObjects];
...@@ -844,8 +918,22 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -844,8 +918,22 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_decBtn.enabled = NO; _decBtn.enabled = NO;
_addBtn.enabled = NO; _addBtn.enabled = NO;
_noChangeBtn.hidden = NO; _noChangeBtn.hidden = NO;
_stressLb.textColor = XHColorRGB_Alpha(0, 0, 0, 0.65); // _stressLb.textColor = XHColorRGB_Alpha(0, 0, 0, 0.65);
_stressTitleLb.textColor = XHColorRGB_Alpha(0, 0, 0, 0.65); // _stressTitleLb.textColor = XHColorRGB_Alpha(0, 0, 0, 0.65);
[_noChangeBtn setTitle:HJLocalizedString(@"清洁设备不可调节负压、流速") forState:UIControlStateNormal];
_speedDecBtn.enabled = NO;
_speedAddBtn.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);
self.timeLb.hidden = YES;
self.xdtimeLb.hidden = NO;
_currentVideoList = self.videoModel.disinfectVideoList; _currentVideoList = self.videoModel.disinfectVideoList;
[self changePlayVideoWithModel:self.currentVideoList[0]]; [self changePlayVideoWithModel:self.currentVideoList[0]];
[self.timesBtnArray removeAllObjects]; [self.timesBtnArray removeAllObjects];
......
...@@ -191,7 +191,7 @@ static NSString *dxmachineCell = @"DXDeviceListCell"; ...@@ -191,7 +191,7 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
#pragma mark - ==========数据处理方法========== #pragma mark - ==========数据处理方法==========
-(void)initDataTY{//TY -(void)initDataTY{//TY
NSArray *arr = @[ NSArray *arr = @[
@{@"DeviceType":@"LDM(家居版)", @{@"DeviceType":HJLocalizedString(@"LDM(家居版)"),
@"DeviceCode":TYDeviceName, @"DeviceCode":TYDeviceName,
@"DeviceId":@"LS01", @"DeviceId":@"LS01",
@"imgName":@"", @"imgName":@"",
...@@ -201,13 +201,13 @@ static NSString *dxmachineCell = @"DXDeviceListCell"; ...@@ -201,13 +201,13 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
} }
-(void)initDataDr02{//Dr水滴 -(void)initDataDr02{//Dr水滴
NSArray *arr = @[ NSArray *arr = @[
@{@"DeviceType":@"Dr.水滴高光仪", @{@"DeviceType":HJLocalizedString(@"Dr.水滴高光仪"),
@"DeviceCode":Dr02DeviceName, @"DeviceCode":Dr02DeviceName,
@"DeviceId":@"LS01", @"DeviceId":@"LS01",
@"imgName":@"DXDr_02", @"imgName":@"DXDr_02",
@"tag":@(DM1BtnTag), @"tag":@(DM1BtnTag),
},@{@"DeviceType":@"Dr.Hi飞秀", },@{@"DeviceType":HJLocalizedString(@"Dr.Hi飞秀"),
@"DeviceCode":@"Dr-04", @"DeviceCode":@"Dr-04",
@"DeviceId":@"Dr-04", @"DeviceId":@"Dr-04",
@"imgName":@"DXDr_HFX", @"imgName":@"DXDr_HFX",
...@@ -225,13 +225,13 @@ static NSString *dxmachineCell = @"DXDeviceListCell"; ...@@ -225,13 +225,13 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
} }
-(void)initDataDR{//Dr -(void)initDataDR{//Dr
NSArray *arr = @[ NSArray *arr = @[
@{@"DeviceType":@"Dr强效向控旋磁仪", @{@"DeviceType":HJLocalizedString(@"Dr强效向控旋磁仪"),
@"DeviceCode":DrDeviceFacialName, @"DeviceCode":DrDeviceFacialName,
@"DeviceId":@"Dr-01", @"DeviceId":@"Dr-01",
@"imgName":@"DR_DeviceListCellBgImg", @"imgName":@"DR_DeviceListCellBgImg",
@"tag":@(D3BtnTag) @"tag":@(D3BtnTag)
}, },
@{@"DeviceType":@"高光水滴仪", @{@"DeviceType":HJLocalizedString(@"高光水滴仪"),
@"DeviceCode":DrDeviceDr02BName, @"DeviceCode":DrDeviceDr02BName,
@"DeviceId":@"Dr-02-B", @"DeviceId":@"Dr-02-B",
@"imgName":@"Dr02BListImg", @"imgName":@"Dr02BListImg",
......
...@@ -121,7 +121,7 @@ static NSString *machineCell = @"XHDeviceListCell"; ...@@ -121,7 +121,7 @@ static NSString *machineCell = @"XHDeviceListCell";
#pragma mark - ==========数据处理方法========== #pragma mark - ==========数据处理方法==========
-(void)initDataTY{//TY -(void)initDataTY{//TY
NSArray *arr = @[ NSArray *arr = @[
@{@"DeviceType":@"LDM(家居版)", @{@"DeviceType":HJLocalizedString(@"LDM(家居版)"),
@"DeviceCode":TYDeviceName, @"DeviceCode":TYDeviceName,
@"DeviceId":@"LS01", @"DeviceId":@"LS01",
@"imgName":@"", @"imgName":@"",
...@@ -131,7 +131,7 @@ static NSString *machineCell = @"XHDeviceListCell"; ...@@ -131,7 +131,7 @@ static NSString *machineCell = @"XHDeviceListCell";
} }
-(void)initDataDr02{//Dr水滴 -(void)initDataDr02{//Dr水滴
NSArray *arr = @[ NSArray *arr = @[
@{@"DeviceType":@"LDM(家居版)", @{@"DeviceType":HJLocalizedString(@"LDM(家居版)"),
@"DeviceCode":Dr02DeviceName, @"DeviceCode":Dr02DeviceName,
@"DeviceId":@"LS01", @"DeviceId":@"LS01",
@"imgName":@"", @"imgName":@"",
...@@ -143,13 +143,13 @@ static NSString *machineCell = @"XHDeviceListCell"; ...@@ -143,13 +143,13 @@ static NSString *machineCell = @"XHDeviceListCell";
-(void)initDataDR{//Dr -(void)initDataDR{//Dr
NSArray *arr = @[ NSArray *arr = @[
@{@"DeviceType":@"Dr强效向控旋磁仪", @{@"DeviceType":HJLocalizedString(@"Dr强效向控旋磁仪"),
@"DeviceCode":DrDeviceFacialName, @"DeviceCode":DrDeviceFacialName,
@"DeviceId":@"Dr-01", @"DeviceId":@"Dr-01",
@"imgName":@"DR_DeviceListCellBgImg", @"imgName":@"DR_DeviceListCellBgImg",
@"tag":@(D3BtnTag) @"tag":@(D3BtnTag)
}, },
@{@"DeviceType":@"高光水滴仪", @{@"DeviceType":HJLocalizedString(@"高光水滴仪"),
@"DeviceCode":DrDeviceDr02BName, @"DeviceCode":DrDeviceDr02BName,
@"DeviceId":@"Dr-02-B", @"DeviceId":@"Dr-02-B",
@"imgName":@"Dr02BListImg", @"imgName":@"Dr02BListImg",
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- (instancetype)initWithFrame:(CGRect)frame - (instancetype)initWithFrame:(CGRect)frame
{ {
if (!(self = [super initWithFrame:frame])) return nil; if (!(self = [super initWithFrame:frame])) return nil;
self.currentFaceImgArr = @[@"下额线",@"法令纹",@"苹果肌",@"眼部",@"额头"]; self.currentFaceImgArr = @[HJLocalizedString(@"下额线"),HJLocalizedString(@"法令纹"),HJLocalizedString(@"苹果肌"),HJLocalizedString(@"眼部"),HJLocalizedString(@"额头")];
[self createUI]; [self createUI];
return self; return self;
} }
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
make.centerX.mas_equalTo(self); make.centerX.mas_equalTo(self);
}]; }];
self.topFaceImgView = topImg; self.topFaceImgView = topImg;
NSArray *titleArr = @[@"下额线\n 5mins",@"法令纹\n5mins",@"苹果肌\n5mins",@"眼部\n5mins",@"额头\n5mins"]; NSArray *titleArr = @[HJLocalizedString(@"下额线\n 5mins"),HJLocalizedString(@"法令纹\n5mins"),HJLocalizedString(@"苹果肌\n5mins"),HJLocalizedString(@"眼部\n5mins"),HJLocalizedString(@"额头\n5mins")];
for (int i = 0; i<5; i++) { for (int i = 0; i<5; i++) {
UIButton *btn = [UIButton myUIButtonSuperView:self withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(selectModelAction:) withTag:D3Model1Btn1tag+i withNormalImg:HJSetImg(@"D03Btn_nor") withSelectedImg:HJSetImg(@"D03Btn_sel") withHighlightedImg:HJSetImg(@"D03Btn_sel") withTitle:HJLocalizedString(titleArr[i]) withFont:XHFontSize(12) withTitleNormalColor:[UIColor lightGrayColor] withTitleSelectedColor:[UIColor whiteColor]]; UIButton *btn = [UIButton myUIButtonSuperView:self withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(selectModelAction:) withTag:D3Model1Btn1tag+i withNormalImg:HJSetImg(@"D03Btn_nor") withSelectedImg:HJSetImg(@"D03Btn_sel") withHighlightedImg:HJSetImg(@"D03Btn_sel") withTitle:HJLocalizedString(titleArr[i]) withFont:XHFontSize(12) withTitleNormalColor:[UIColor lightGrayColor] withTitleSelectedColor:[UIColor whiteColor]];
btn.titleLabel.lineBreakMode = 0; btn.titleLabel.lineBreakMode = 0;
......
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
[self initMyData:sender.selected]; [self initMyData:sender.selected];
} }
}else{ }else{
[self showError:@"当前模式正在进行中,请结束后再切换模式!"]; [self showError:HJLocalizedString(@"当前模式正在进行中,请结束后再切换模式!")];
} }
} }
#pragma mark UI 显示ModelVie #pragma mark UI 显示ModelVie
...@@ -441,13 +441,13 @@ ...@@ -441,13 +441,13 @@
#pragma mark XHSmartViewDelegate/XHCustomViewDelegate #pragma mark XHSmartViewDelegate/XHCustomViewDelegate
- (void)btnAction:(UIButton *)sender{ - (void)btnAction:(UIButton *)sender{
if(!self.BLEConnect){ if(!self.BLEConnect){
[self showError:@"请连接上设备后重试"]; [self showError:HJLocalizedString(@"请连接上设备后重试")];
return; return;
} }
if (sender.tag ==Home_SelectPlanBtnTag) { if (sender.tag ==Home_SelectPlanBtnTag) {
if(self.isStartted){//方案已经开始不能切换 if(self.isStartted){//方案已经开始不能切换
[self showError:@"请结束当前方案后再切换"]; [self showError:HJLocalizedString(@"请结束当前方案后再切换")];
return; return;
} }
[self showModelView]; [self showModelView];
...@@ -1110,7 +1110,7 @@ ...@@ -1110,7 +1110,7 @@
[HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"06000B31020200"] withCrc16Modbus]];//暂停 [HJGetBluetoothManager writeStr:[[NSString stringWithFormat:@"06000B31020200"] withCrc16Modbus]];//暂停
[self stopAction]; [self stopAction];
} }
[self showError:@"手柄未连接"]; [self showError:HJLocalizedString(@"手柄未连接")];
} }
}else if (HJStringNSNotFound(str,@"06000B330153")){//固件版本55aa06000b33015301757b }else if (HJStringNSNotFound(str,@"06000B330153")){//固件版本55aa06000b33015301757b
// if((self.currentReceiveTimes2-self.currentReceiveTimes1)/200<=0){ // if((self.currentReceiveTimes2-self.currentReceiveTimes1)/200<=0){
...@@ -1692,7 +1692,7 @@ ...@@ -1692,7 +1692,7 @@
if(buttonIndex == 1){//升级 if(buttonIndex == 1){//升级
[HJGetBluetoothManager writeStr:[DR04_HFX_send_getUpdateVersion withCrc16Modbus]]; [HJGetBluetoothManager writeStr:[DR04_HFX_send_getUpdateVersion withCrc16Modbus]];
[weakSelf.UploadAlert close]; [weakSelf.UploadAlert close];
[SVProgressHUD showWithStatus:@"正在准备升级..."]; [SVProgressHUD showWithStatus:HJLocalizedString(@"正在准备升级...")];
}else{ }else{
[weakSelf.UploadAlert close]; [weakSelf.UploadAlert close];
} }
...@@ -1703,8 +1703,8 @@ ...@@ -1703,8 +1703,8 @@
HJSelfWeak; HJSelfWeak;
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
float percentage = (float)index / total; float percentage = (float)index / total;
[SVProgressHUD showProgress:percentage status:[NSString stringWithFormat:@"正在升级固件\n(已完成%.2f%%)\n请勿断开蓝牙",percentage * 100]]; // [SVProgressHUD showProgress:percentage status:[NSString stringWithFormat:@"正在升级固件\n(已完成%.2f%%)\n请勿断开蓝牙",percentage * 100]];
[SVProgressHUD showProgress:percentage status:[NSString stringWithFormat:@"%@\n(%@ %.2f%%)\n%@",HJLocalizedString(@"正在升级固件"),HJLocalizedString(@"已完成"),percentage * 100,HJLocalizedString(@"请勿断开蓝牙")]];
}); });
......
...@@ -121,10 +121,11 @@ ...@@ -121,10 +121,11 @@
if(slider == self.mySlider3M){ if(slider == self.mySlider3M){
NSLog(@"slider.valueslider.value1:%f",slider.value); NSLog(@"slider.valueslider.value1:%f",slider.value);
self.mySliderLb3M.text = [NSString stringWithFormat:@"调节变频时间 | %.fms",slider.value]; // self.mySliderLb3M.text = [NSString stringWithFormat:@"调节变频时间 | %.fms",slider.value];
self.mySliderLb3M.text = [NSString stringWithFormat:@"%@ | %.fms",HJLocalizedString(@"调节变频时间"),slider.value];
}else if(slider == self.mySlider10M){ }else if(slider == self.mySlider10M){
NSLog(@"slider.valueslider.value2:%f",slider.value); NSLog(@"slider.valueslider.value2:%f",slider.value);
self.mySliderLb10M.text = [NSString stringWithFormat:@"调节变频时间 | %.fms",slider.value]; self.mySliderLb10M.text = [NSString stringWithFormat:@"%@ | %.fms",HJLocalizedString(@"调节变频时间"),slider.value];
} }
if (self.sendtimesBlock) { if (self.sendtimesBlock) {
...@@ -155,9 +156,11 @@ ...@@ -155,9 +156,11 @@
HJSelfWeak; HJSelfWeak;
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
weakSelf.mySlider3M.value = [model.str1 intValue]; weakSelf.mySlider3M.value = [model.str1 intValue];
weakSelf.mySliderLb3M.text = [NSString stringWithFormat:@"调节变频时间 | %dms",[model.str1 intValue]]; // weakSelf.mySliderLb3M.text = [NSString stringWithFormat:@"调节变频时间 | %dms",[model.str1 intValue]];
self.mySliderLb3M.text = [NSString stringWithFormat:@"%@ | %.dms",HJLocalizedString(@"调节变频时间"),[model.str1 intValue]];
weakSelf.mySlider10M.value = [model.str2 intValue]; weakSelf.mySlider10M.value = [model.str2 intValue];
weakSelf.mySliderLb10M.text = [NSString stringWithFormat:@"调节变频时间 | %dms",[model.str2 intValue]]; // weakSelf.mySliderLb10M.text = [NSString stringWithFormat:@"调节变频时间 | %dms",[model.str2 intValue]];
weakSelf.mySliderLb10M.text = [NSString stringWithFormat:@"%@ | %.dms",HJLocalizedString(@"调节变频时间"),[model.str2 intValue]];
}); });
} }
@end @end
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
}]; }];
UILabel *strengthLb1Bottom = [UILabel myUILabelSuperView:myView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?@"3M 档位":@"3M 强度(W/cm²)" withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true]; UILabel *strengthLb1Bottom = [UILabel myUILabelSuperView:myView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?HJLocalizedString(@"3M 档位"):HJLocalizedString(@"3M 强度(W/cm²)") withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true];
[strengthLb1Bottom mas_makeConstraints:^(MASConstraintMaker *make) { [strengthLb1Bottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb.mas_bottom).offset(0*IPhone6ScaleHeight); make.top.mas_equalTo(strengthLb.mas_bottom).offset(0*IPhone6ScaleHeight);
make.centerX.mas_equalTo(myView); make.centerX.mas_equalTo(myView);
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth); make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
}]; }];
UILabel *strengthLb2Bottom = [UILabel myUILabelSuperView:myView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?@"10M 档位":@"10M 强度(W/cm²)" withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true]; UILabel *strengthLb2Bottom = [UILabel myUILabelSuperView:myView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?HJLocalizedString(@"10M 档位"):HJLocalizedString(@"10M 强度(W/cm²)") withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true];
[strengthLb2Bottom mas_makeConstraints:^(MASConstraintMaker *make) { [strengthLb2Bottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb2.mas_bottom).offset(0*IPhone6ScaleHeight); make.top.mas_equalTo(strengthLb2.mas_bottom).offset(0*IPhone6ScaleHeight);
make.centerX.mas_equalTo(myView); make.centerX.mas_equalTo(myView);
......
...@@ -59,11 +59,12 @@ ...@@ -59,11 +59,12 @@
if((TargetType == 2)||(TargetType == 4)){ 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"]; 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"]; 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 = @[@"眼纹",@"深纹",@"提升",@"面部紧致",@"皮肤焕新",@"敏感性皮肤焕新",@"抗衰",@"辅助面部吸收",@"粉刺痤疮",@"丘疹脓疱性痤疮"]; itemArr = @[HJLocalizedString(@"眼纹"),HJLocalizedString(@"深纹"),HJLocalizedString(@"提升"),HJLocalizedString(@"面部紧致"),HJLocalizedString(@"皮肤焕新"),HJLocalizedString(@"敏感性皮肤焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"辅助面部吸收"),HJLocalizedString(@"粉刺痤疮"),HJLocalizedString(@"丘疹脓疱性痤疮")];
}else{ }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"]; 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"];
itemSelArrimg = @[@"Home_Slect_eye_s_r",@"Home_Slect_deepGrain_s_r",@"Home_Slect_up_s_r",@"Home_Slect_face_s_r",@"Home_Slect_skin_s_r",@"Home_Slect_newskin_s_r",@"Home_Slect_anti-aging_s_r",@"Home_Slect_absorption_s_r",@"Home_Slect_acne_s_r",@"Home_Slect_papules_s_r"]; itemSelArrimg = @[@"Home_Slect_eye_s_r",@"Home_Slect_deepGrain_s_r",@"Home_Slect_up_s_r",@"Home_Slect_face_s_r",@"Home_Slect_skin_s_r",@"Home_Slect_newskin_s_r",@"Home_Slect_anti-aging_s_r",@"Home_Slect_absorption_s_r",@"Home_Slect_acne_s_r",@"Home_Slect_papules_s_r"];
itemArr = @[@"明眸淡纹",@"抚平舒纹",@"童颜提拉",@"轮廓紧致",@"美肌焕新",@"舒敏焕新",@"抗衰",@"嫩颜促吸",@"平痘护肤",@"平痘抑菌"]; itemArr = @[HJLocalizedString(@"明眸淡纹"),HJLocalizedString(@"抚平舒纹"),HJLocalizedString(@"童颜提拉"),HJLocalizedString(@"轮廓紧致"),HJLocalizedString(@"美肌焕新"),HJLocalizedString(@"舒敏焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"嫩颜促吸"),HJLocalizedString(@"平痘护肤"),HJLocalizedString(@"平痘抑菌")];
} }
for (int i = 0; i<itemArr.count; i++) { for (int i = 0; i<itemArr.count; i++) {
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
} }
-(void)createUI{ -(void)createUI{
if(TargetType == 5){ if(TargetType == 5){
self.modelArr = @[@"明眸淡纹",@"抚平舒纹",@"童颜提拉",@"轮廓紧致",@"美肌焕新",@"舒敏焕新",@"抗衰",@"嫩颜促吸",@"平痘护肤",@"平痘抑菌"]; self.modelArr = @[HJLocalizedString(@"明眸淡纹"),HJLocalizedString(@"抚平舒纹"),HJLocalizedString(@"童颜提拉"),HJLocalizedString(@"轮廓紧致"),HJLocalizedString(@"美肌焕新"),HJLocalizedString(@"舒敏焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"嫩颜促吸"),HJLocalizedString(@"平痘护肤"),HJLocalizedString(@"平痘抑菌")];
}else{ }else{
self.modelArr = @[@"眼纹",@"深纹",@"提升",@"面部紧致",@"皮肤焕新",@"敏感性皮肤焕新",@"抗衰",@"辅助面部吸收",@"粉刺痤疮",@"丘疹脓疱性痤疮"]; self.modelArr = @[HJLocalizedString(@"眼纹"),HJLocalizedString(@"深纹"),HJLocalizedString(@"提升"),HJLocalizedString(@"面部紧致"),HJLocalizedString(@"皮肤焕新"),HJLocalizedString(@"敏感性皮肤焕新"),HJLocalizedString(@"抗衰"),HJLocalizedString(@"辅助面部吸收"),HJLocalizedString(@"粉刺痤疮"),HJLocalizedString(@"丘疹脓疱性痤疮")];
} }
[self creatNoSelectModelView]; [self creatNoSelectModelView];
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
}]; }];
UILabel *strengthLb1Bottom = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?@"3M 档位":@"3M 强度(W/cm²)" withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true]; 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) { [strengthLb1Bottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb.mas_bottom).offset(0*IPhone6ScaleHeight); make.top.mas_equalTo(strengthLb.mas_bottom).offset(0*IPhone6ScaleHeight);
make.centerX.mas_equalTo(self.SelectModelView); make.centerX.mas_equalTo(self.SelectModelView);
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth); make.width.height.mas_equalTo(49.9*IPhone6ScaleWidth);
}]; }];
UILabel *strengthLb2Bottom = [UILabel myUILabelSuperView:self.SelectModelView withNSTextAlignment:NSTextAlignmentCenter withContent:(TargetType==5)?@"10M 档位":@"10M 强度(W/cm²)" withFont:XHFontSize(10) withTextColor:XHBtnTextColor withResize:true]; 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) { [strengthLb2Bottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(strengthLb2.mas_bottom).offset(0*IPhone6ScaleHeight); make.top.mas_equalTo(strengthLb2.mas_bottom).offset(0*IPhone6ScaleHeight);
make.centerX.mas_equalTo(self.SelectModelView); make.centerX.mas_equalTo(self.SelectModelView);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
@implementation XHSelectDeviceVC @implementation XHSelectDeviceVC
- (void)viewWillAppear:(BOOL)animated{ - (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated]; [super viewWillAppear:animated];
self.title = @"选择设备型号"; self.title = HJLocalizedString(@"选择设备型号");
//隐藏导航栏 //隐藏导航栏
[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:0]; [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:0];
self.navigationController.navigationBar.shadowImage=[UIImage new]; self.navigationController.navigationBar.shadowImage=[UIImage new];
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
[self.view addSubview:self.collectionView]; [self.view addSubview:self.collectionView];
NSArray *arr = @[ NSArray *arr = @[
@{@"imgName":@"Home_DeviceLogo", @{@"imgName":@"Home_DeviceLogo",
@"machineName":@"LDM(家居版)", @"machineName":HJLocalizedString(@"LDM(家居版)"),
@"machineid":@"S01", @"machineid":@"S01",
@"tag":@(1) @"tag":@(1)
} }
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
}]; }];
NSArray *imgArr = @[@"Personal_Ico",@"Set_Ico"]; NSArray *imgArr = @[@"Personal_Ico",@"Set_Ico"];
NSArray *titleArr = @[@"个人中心",@"设备设置"]; NSArray *titleArr = @[HJLocalizedString(@"个人中心"),HJLocalizedString(@"设备设置")];
for (int i = 0; i<imgArr.count; i++) { for (int i = 0; i<imgArr.count; i++) {
UIButton *btn = [UIButton myUIButtonSuperView:bgV withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(gotoSetPageAction:) withTag:1000001+i withNormalImg:nil withSelectedImg:nil withHighlightedImg:nil withTitle:nil withFont:XHFontSize(14) withTitleNormalColor:XHTextFieldTextColor withTitleSelectedColor:XHTextFieldTextColor]; UIButton *btn = [UIButton myUIButtonSuperView:bgV withUIButtonType:UIButtonTypeCustom withTarget:self withBction:@selector(gotoSetPageAction:) withTag:1000001+i withNormalImg:nil withSelectedImg:nil withHighlightedImg:nil withTitle:nil withFont:XHFontSize(14) withTitleNormalColor:XHTextFieldTextColor withTitleSelectedColor:XHTextFieldTextColor];
[btn setImage:HJSetImg(imgArr[i]) forState:UIControlStateNormal]; [btn setImage:HJSetImg(imgArr[i]) forState:UIControlStateNormal];
......
...@@ -98,19 +98,19 @@ static NSString *cellID = @"XHSetHomeCell"; ...@@ -98,19 +98,19 @@ static NSString *cellID = @"XHSetHomeCell";
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1) @"switchViewState":@(1)
}, },
@{@"title":@"设置手柄频率", @{@"title":HJLocalizedString(@"设置手柄频率"),
@"rightStr":@"3M/10M", @"rightStr":@"3M/10M",
@"rightImgState":@(0), @"rightImgState":@(0),
@"switchViewState":@(1)}, @"switchViewState":@(1)},
@{@"title":@"设备消毒程序", @{@"title":HJLocalizedString(@"设备消毒程序"),
@"rightStr":@"", @"rightStr":@"",
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(0)}, @"switchViewState":@(0)},
@{@"title":@"应用程序版本", @{@"title":HJLocalizedString(@"应用程序版本"),
@"rightStr":SoftVersion, @"rightStr":SoftVersion,
@"rightImgState":@(0), @"rightImgState":@(0),
@"switchViewState":@(1)}, @"switchViewState":@(1)},
@{@"title":@"固件版本", @{@"title":HJLocalizedString(@"固件版本"),
@"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.machineVersion]?@"":XHGetDataManager.machineVersion, @"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.machineVersion]?@"":XHGetDataManager.machineVersion,
@"rightImgState":@(0), @"rightImgState":@(0),
@"switchViewState":@(1)} @"switchViewState":@(1)}
...@@ -127,16 +127,16 @@ static NSString *cellID = @"XHSetHomeCell"; ...@@ -127,16 +127,16 @@ static NSString *cellID = @"XHSetHomeCell";
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1) @"switchViewState":@(1)
}, },
@{@"title":@"设备id", @{@"title":HJLocalizedString(@"设备id"),
@"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.deviceID]?@"":XHGetDataManager.deviceID, @"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.deviceID]?@"":XHGetDataManager.deviceID,
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1) @"switchViewState":@(1)
}, },
@{@"title":@"应用程序版本", @{@"title":HJLocalizedString(@"应用程序版本"),
@"rightStr":SoftVersion, @"rightStr":SoftVersion,
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1)}, @"switchViewState":@(1)},
@{@"title":@"固件版本", @{@"title":HJLocalizedString(@"固件版本"),
@"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.machineVersion]?@"":XHGetDataManager.machineVersion, @"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.machineVersion]?@"":XHGetDataManager.machineVersion,
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1)} @"switchViewState":@(1)}
...@@ -148,20 +148,20 @@ static NSString *cellID = @"XHSetHomeCell"; ...@@ -148,20 +148,20 @@ static NSString *cellID = @"XHSetHomeCell";
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1) @"switchViewState":@(1)
}, },
@{@"title":@"设备id", @{@"title":HJLocalizedString(@"设备id"),
@"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.deviceID]?@"":XHGetDataManager.deviceID, @"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.deviceID]?@"":XHGetDataManager.deviceID,
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1) @"switchViewState":@(1)
}, },
@{@"title":@"设置手柄频率", @{@"title":HJLocalizedString(@"设置手柄频率"),
@"rightStr":@"3M/10M", @"rightStr":@"3M/10M",
@"rightImgState":@(0), @"rightImgState":@(0),
@"switchViewState":@(1)}, @"switchViewState":@(1)},
@{@"title":@"应用程序版本", @{@"title":HJLocalizedString(@"应用程序版本"),
@"rightStr":SoftVersion, @"rightStr":SoftVersion,
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1)}, @"switchViewState":@(1)},
@{@"title":@"固件版本", @{@"title":HJLocalizedString(@"固件版本"),
@"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.machineVersion]?@"":XHGetDataManager.machineVersion, @"rightStr":[XHCommonMethods isEmptyOrNull:XHGetDataManager.machineVersion]?@"":XHGetDataManager.machineVersion,
@"rightImgState":@(1), @"rightImgState":@(1),
@"switchViewState":@(1)} @"switchViewState":@(1)}
......
...@@ -775,7 +775,7 @@ ...@@ -775,7 +775,7 @@
- (UIButton *)failBtn { - (UIButton *)failBtn {
if (!_failBtn) { if (!_failBtn) {
_failBtn = [UIButton buttonWithType:UIButtonTypeSystem]; _failBtn = [UIButton buttonWithType:UIButtonTypeSystem];
[_failBtn setTitle:@"加载失败,点击重试" forState:UIControlStateNormal]; [_failBtn setTitle:NSLocalizedString(@"加载失败,点击重试",nil) forState:UIControlStateNormal];
[_failBtn addTarget:self action:@selector(failBtnClick:) forControlEvents:UIControlEventTouchUpInside]; [_failBtn addTarget:self action:@selector(failBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[_failBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_failBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_failBtn.titleLabel.font = [UIFont systemFontOfSize:14.0]; _failBtn.titleLabel.font = [UIFont systemFontOfSize:14.0];
......
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
net = @"WIFI"; net = @"WIFI";
break; break;
case ZFReachabilityStatusNotReachable: case ZFReachabilityStatusNotReachable:
net = @"无网络"; net = NSLocalizedString(@"无网络",nil);
break; break;
case ZFReachabilityStatusReachableVia2G: case ZFReachabilityStatusReachableVia2G:
net = @"2G"; net = @"2G";
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
net = @"5G"; net = @"5G";
break; break;
default: default:
net = @"未知"; net = NSLocalizedString(@"未知",nil);
break; break;
} }
return net; return net;
......
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