连接界面修改

修改连接摄像头连接方式选择界面
This commit is contained in:
kai
2019-11-03 21:39:23 +08:00
parent b2ad110ed2
commit 9c0d42d796
13 changed files with 69 additions and 11 deletions
@@ -18,6 +18,8 @@ Copy NSString *wifiName;
Copy NSString *wifiPwd;
Copy NSString *ssid;
Copy NSString *bssid;
//界面复用 设备类型
@property (assign, nonatomic) SmartDeviceType deviceType;
@end
NS_ASSUME_NONNULL_END
@@ -111,7 +111,7 @@ Assign BOOL isGoChangeWiFi;//更换为设备的WiFi
[self.view makeToast:@"请先连接设备热点"];
return;
}
if ([wifiName rangeOfString:@"ifish"].location!=NSNotFound) {
if ([wifiName rangeOfString:@"ifish"].location!=NSNotFound||[wifiName rangeOfString:@"GW"].location!=NSNotFound) {
//wifi正确,则尝试连接设备
ConnectingAquarVC *connecting = InitObject(ConnectingAquarVC);
connecting.ssid = self.ssid;
@@ -7,13 +7,16 @@
//
#import "BaseViewController.h"
#import "YooseeNextConnectViewController.h"
NS_ASSUME_NONNULL_BEGIN
/**
水族箱连接方式选择
*/
@interface ConAquarMethodVC : BaseViewController
//
@property (assign, nonatomic) SmartDeviceType deviceType;
@end
@@ -19,7 +19,7 @@ Strong UILabel *subTitleLabel;
- (void)viewDidLoad {
[super viewDidLoad];
[self addTitleViewWithTitle:@"连接水族箱"];
[self addTitleViewWithTitle:self.titleString];
[self.view addSubview:self.subTitleLabel];
@@ -79,11 +79,27 @@ Strong UILabel *subTitleLabel;
-(void)buttonClick:(UIButton *)sender{
self.hidesBottomBarWhenPushed = YES;
if (sender.tag==0) {
SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init];
wifivc.vcTitle=@"连接水族箱";
[self.navigationController pushViewController:wifivc animated:YES];
if (self.deviceType==DEVICECAMERA)
{
YooseeNextConnectViewController *nextvc=[[YooseeNextConnectViewController alloc] init];
nextvc.conectType = 0;
[self.navigationController pushViewController:nextvc animated:YES];
}
else
{
SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init];
wifivc.deviceType=self.deviceType;
wifivc.vcTitle=@"连接水族箱";
[self.navigationController pushViewController:wifivc animated:YES];
}
}else{
ConAquarNowWiFiPwdVC *vc = InitObject(ConAquarNowWiFiPwdVC);
vc.deviceType=self.deviceType;
[self.navigationController pushViewController:vc animated:YES];
}
}
@@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface ConAquarNowWiFiPwdVC : BaseViewController
Copy NSString *ssid;
Copy NSString *bssid;
//界面复用 设备类型
@property (assign, nonatomic) SmartDeviceType deviceType;
@end
NS_ASSUME_NONNULL_END
@@ -121,6 +121,7 @@ Strong UIButton *nextBtn;
[leftView addSubview:leftImage];
[leftImage setImage:IMAGEBYENAME(@"icons_con_lock")];
_wifiPwdTextField.leftView = leftView;
_wifiPwdTextField.text=@"1314ever";
}
return _wifiPwdTextField;
}
@@ -239,6 +240,7 @@ Strong UIButton *nextBtn;
chooseVC.wifiPwd = [NSString stringWithFormat:@"%@",self.wifiPwdTextField.text];
chooseVC.ssid = [NSString stringWithFormat:@"%@",self.ssid];
chooseVC.bssid = [NSString stringWithFormat:@"%@",self.bssid];
chooseVC.deviceType=self.deviceType;
[self.navigationController pushViewController:chooseVC animated:YES];
}
/*
@@ -18,6 +18,8 @@ Copy NSString *wifiName;//设备要连接的WiFi名称
Copy NSString *wifiPassword;//智能设备要连接的WiFi密码
Copy NSString *ssid;
Copy NSString *bssid;
//界面复用 设备类型
@property (assign, nonatomic) SmartDeviceType deviceType;
@end
NS_ASSUME_NONNULL_END
@@ -85,7 +85,7 @@ Copy NSString *deviceId;
}];
}
//P2P连线
-(void)loginGewellWith:(UserModel *)model
-(void)loginGwellWith:(UserModel *)model
{
NSString *accountId =[NSString stringWithFormat:@"%d",(int)[model.gwellUserID integerValue]&0x7fffffff];
if ([accountId isEqualToString:@"0"]) {