摄像头分享和二维码生成规则修改
This commit is contained in:
@@ -220,7 +220,7 @@ alpha:1.0]
|
||||
#define kShareDevice [NSString stringWithFormat:@"app.ifish7.com/api/user/shareDevice.do",JIEKOUPORT]
|
||||
|
||||
// 扫一扫分享设备 已最新
|
||||
#define kshareDeviceByQrCode [NSString stringWithFormat:@"%@/api/users/sharingDevice/",JIEKOUPORT]
|
||||
#define kshareDeviceByQrCode [NSString stringWithFormat:@"%@/api/user/shareDeviceByQrCode.do",JIEKOUPORT]
|
||||
|
||||
// 解除分享的设备
|
||||
#define kdeleteShareDevice [NSString stringWithFormat:@"%@/api/user/deleteShareDevice.do",JIEKOUPORT]
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#import "IfishNewsModel.h"
|
||||
#import "IfishHotBarVc.h"
|
||||
#import "Xuanduo2fController.h"
|
||||
#import "IfishP2PMonitorController.h"
|
||||
|
||||
@implementation IfishDataUnity
|
||||
|
||||
@@ -48,15 +49,57 @@
|
||||
{
|
||||
|
||||
|
||||
if (dataDic[@"cameraId"])
|
||||
{
|
||||
IfishCameraModel *camera=[[IfishCameraModel alloc] initWithDict:dataDic];
|
||||
[deviceArry insertObject:camera atIndex:0];
|
||||
[[DataCenter defaultDtacenter]setValue:deviceArry forKey:@"cameraArr"];
|
||||
if (scanVC)
|
||||
{
|
||||
[scanVC dismissViewControllerAnimated:YES completion:^{
|
||||
IfishP2PMonitorController *p2pVC=[[IfishP2PMonitorController alloc] init];
|
||||
p2pVC.contact = camera;
|
||||
UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:p2pVC];
|
||||
UIApplication*app=[UIApplication sharedApplication];
|
||||
AppDelegate*app1=(AppDelegate*)app.delegate;
|
||||
app1.window.rootViewController=nav;
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
IfishP2PMonitorController *p2pVC=[[IfishP2PMonitorController alloc] init];
|
||||
p2pVC.contact = camera;
|
||||
UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:p2pVC];
|
||||
UIApplication*app=[UIApplication sharedApplication];
|
||||
AppDelegate*app1=(AppDelegate*)app.delegate;
|
||||
app1.window.rootViewController=nav;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DeviceModel*devicemodel=[[DeviceModel alloc]initWithDict:dataDic];
|
||||
//设备
|
||||
[deviceArry insertObject:devicemodel atIndex:0];
|
||||
|
||||
[[DataCenter defaultDtacenter]setValue:deviceArry forKey:@"deviceInfo"];
|
||||
|
||||
if ([devicemodel.type isEqualToString:DECICE_TYPE_XUANDUO3F]) {
|
||||
NSMutableDictionary*petStores=[[DataCenter defaultDtacenter] valueForKey:@"petStores"];
|
||||
for (NSMutableArray*array in petStores.allValues) {
|
||||
|
||||
|
||||
[array insertObject:devicemodel atIndex:0];
|
||||
break;
|
||||
}
|
||||
|
||||
[[DataCenter defaultDtacenter]setValue:petStores forKey:@"petStores"];
|
||||
[[DataCenter defaultDtacenter].cache setString:devicemodel.macAddress forKey:@"currentPetDevice"];
|
||||
|
||||
}
|
||||
|
||||
[self initAppCenterVcWith:devicemodel addWithdissMisVc:scanVC];
|
||||
}
|
||||
|
||||
DeviceModel*devicemodel=[[DeviceModel alloc]initWithDict:dataDic];
|
||||
//设备
|
||||
[deviceArry insertObject:devicemodel atIndex:0];
|
||||
|
||||
[[DataCenter defaultDtacenter]setValue:deviceArry forKey:@"deviceInfo"];
|
||||
|
||||
|
||||
[self initAppCenterVcWith:devicemodel addWithdissMisVc:scanVC];
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user