摄像头连接修改,锁屏时杀菌倒计时的问题

This commit is contained in:
kai60 2020-07-05 15:51:23 +08:00
parent 036ef4b543
commit 80e310693f
2 changed files with 27 additions and 5 deletions

View File

@ -320,7 +320,7 @@
UIImage*uvsel=[UIImage imageNamed:@"杀菌开"]; UIImage*uvsel=[UIImage imageNamed:@"杀菌开"];
uvsel=[uvsel imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; uvsel=[uvsel imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
[self.light1 setImage:uvsel forState:UIControlStateSelected]; // [self.light1 setImage:uvsel forState:UIControlStateSelected];
} }
} }
@ -339,7 +339,7 @@
Xuanduo3fModel*model=(Xuanduo3fModel*)_dataModel; Xuanduo3fModel*model=(Xuanduo3fModel*)_dataModel;
NSString *stateString1 = [model.uvLamp substringWithRange:NSMakeRange(2, 2)]; NSString *stateString1 = [model.uvLamp substringWithRange:NSMakeRange(2, 2)];
// //
if ([stateString1 isEqualToString:@"00"]||self.heartCount<2) if ([stateString1 isEqualToString:@"00"])
{ {
if (_cycleModel.lastTime.length) if (_cycleModel.lastTime.length)
{ {

View File

@ -31,6 +31,7 @@
#import "MyMD5.h" #import "MyMD5.h"
#import "IfishUserDataUnity.h" #import "IfishUserDataUnity.h"
#import "DeviceCameraModel.h" #import "DeviceCameraModel.h"
#import "ConAquarChooseWiFiVC.h"
typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) { typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
lodingViewdissMissSuccsess=0,// default is 0 lodingViewdissMissSuccsess=0,// default is 0
lodingViewdissMissfail, lodingViewdissMissfail,
@ -512,15 +513,36 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔复位摄像
if (self.deviceID.length&&![self.linkDict[self.deviceID] boolValue]) {//90秒之后还未连接上连接超时 if (self.deviceID.length&&![self.linkDict[self.deviceID] boolValue]) {//90秒之后还未连接上连接超时
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink]; [[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
[[GWP2PDeviceLinker shareInstance] p2pStopAPLink]; [[GWP2PDeviceLinker shareInstance] p2pStopAPLink];
[self connectNormalView];
if ([[[CommonUtils getSSIDInfo] objectForKey:@"SSID"] isEqualToString:self.wifiName]) if ([[[CommonUtils getSSIDInfo] objectForKey:@"SSID"] isEqualToString:self.wifiName])
{ {
[self bindCameraDevice]; [self.view makeToast:@"请确保Wifi密码正确,重置设备后再试!"];
} }
else else
{ {
[self.view makeToast:@"WiFi连接失败"]; [self.view makeToast:[NSString stringWithFormat:@"WiFi连接失败,请确保手机连接到%@",self.wifiName]];
} }
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
UIViewController*choosewifi=nil;
for (UIViewController*controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[ConAquarNowWiFiPwdVC class]])
{
choosewifi=controller;
break;
}
}
if (choosewifi)
{
[self.navigationController popToViewController:choosewifi animated:YES];
}
else
{
[self connectNormalView];
}
});
} }
else if(!self.deviceID.length) else if(!self.deviceID.length)