Merge remote-tracking branch 'origin/develop_01'
# Conflicts: # .DS_Store
This commit is contained in:
+115
-18
@@ -7,10 +7,11 @@
|
||||
//
|
||||
|
||||
#import "IfishConnectUsViewController.h"
|
||||
#import "InfoByImageViewController.h"
|
||||
|
||||
@interface IfishConnectUsViewController ()
|
||||
@interface IfishConnectUsViewController ()<UITextViewDelegate>
|
||||
Strong UIImageView *codeImage;//二维码
|
||||
Strong UIButton *telBtn;
|
||||
Strong UITextView *textView;
|
||||
@end
|
||||
|
||||
@implementation IfishConnectUsViewController
|
||||
@@ -18,34 +19,130 @@ Strong UIButton *telBtn;
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.titleString = @"联系我们";
|
||||
self.view.backgroundColor=[UIColor whiteColor];
|
||||
[self.view addSubview:self.codeImage];
|
||||
[self.view addSubview:self.telBtn];
|
||||
[self.view addSubview:self.textView];
|
||||
[self.codeImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kSizeFrom750(128));
|
||||
make.width.mas_equalTo(kSizeFrom750(578));
|
||||
make.height.mas_equalTo(kSizeFrom750(770));
|
||||
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-34);
|
||||
make.width.mas_equalTo(kSizeFrom750(300.5));
|
||||
make.height.mas_equalTo(kSizeFrom750(400));
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
[self.telBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.centerX.mas_equalTo(self.codeImage);
|
||||
make.top.mas_equalTo(self.codeImage.mas_bottom).offset(kSizeFrom750(70));
|
||||
make.height.mas_equalTo(kSizeFrom750(70));
|
||||
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.view.mas_left).offset(10);
|
||||
make.right.mas_equalTo(self.view.mas_right).offset(-10);
|
||||
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(0);
|
||||
make.bottom.mas_equalTo(self.codeImage.mas_top);
|
||||
}];
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
-(UIButton *)telBtn{
|
||||
if (!_telBtn) {
|
||||
_telBtn = InitObject(UIButton);
|
||||
_telBtn.titleLabel.font = SYSTEMSIZE(34);
|
||||
[_telBtn setTitle:@"服务热线:18667812003" forState:UIControlStateNormal];
|
||||
[_telBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
|
||||
[_telBtn addTarget:self action:@selector(telBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
-(void)viewDidLayoutSubviews
|
||||
{
|
||||
[super viewDidLayoutSubviews];
|
||||
[self protocolIsSelect:YES];
|
||||
}
|
||||
-(UITextView *)textView{
|
||||
if (!_textView) {
|
||||
_textView = InitObject(UITextView);
|
||||
_textView.adjustsFontForContentSizeCategory=YES;
|
||||
|
||||
|
||||
|
||||
}
|
||||
return _telBtn;
|
||||
return _textView;
|
||||
|
||||
}
|
||||
- (void)protocolIsSelect:(BOOL)select {
|
||||
|
||||
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:@"1、设备绑定不上?查看遥控器或显示屏控制插排是否正常?\na、若不正常考虑设备问题,可与购买方或厂家联系。\nb、若正常先查看手机连接路由器是否为2.4g频率wifi。若连接时提示去更改网络,则此时手机连接一定为5g网络,需更换2.4g网络重新绑定。\n2、换路由器后网络为2.4g频率WIFI,还是无法绑定?\na、若老路由器连接没问题,先用老路由器把设备绑定在线,联系爱鱼奇客服升级。\nb、两台手机开热点方法(暂时不用路由器)先把设备绑定上,设备在线后与爱鱼奇客服联系升级。手机开热点如何连接点击这里。\nc、手机开热点也连接不上,可与购买方或厂家联系。\n3、感谢您使用爱鱼奇app,连接智能设备请查看下方说明书,内含操作视频:http://u.eqxiu.com/s/KmmVl87l,插排及热流器售后服务热线点击这里。\n4、摄像头售后及爱鱼奇服务微信:18667812003"];
|
||||
|
||||
[attributedString addAttribute:NSLinkAttributeName
|
||||
|
||||
value:@"apmode://"
|
||||
|
||||
range:[[attributedString string] rangeOfString:@"手机开热点如何连接点击这里。"]];
|
||||
|
||||
[attributedString addAttribute:NSLinkAttributeName
|
||||
|
||||
value:@"http://u.eqxiu.com/s/KmmVl87l"
|
||||
|
||||
range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]];
|
||||
[attributedString addAttribute:NSLinkAttributeName
|
||||
|
||||
value:@"hotbar://"
|
||||
|
||||
range:[[attributedString string] rangeOfString:@"插排及热流器售后服务热线点击这里。"]];
|
||||
|
||||
CGFloat fontSize=18;
|
||||
if (self.view.frame.size.width>410)
|
||||
{
|
||||
fontSize=18;
|
||||
}
|
||||
else if (self.view.frame.size.width>370)
|
||||
{
|
||||
fontSize=15;
|
||||
}
|
||||
else
|
||||
{
|
||||
fontSize=12;
|
||||
}
|
||||
[attributedString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:fontSize] range:NSMakeRange(0, attributedString.length)];
|
||||
[attributedString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:fontSize] range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]];
|
||||
[attributedString addAttribute:NSLinkAttributeName value:@"tel://18667812003" range:[[attributedString string] rangeOfString:@"18667812003"]];
|
||||
|
||||
|
||||
|
||||
_textView.attributedText = attributedString;
|
||||
|
||||
_textView.linkTextAttributes = @{NSForegroundColorAttributeName: [UIColor blueColor],
|
||||
|
||||
NSUnderlineColorAttributeName: [UIColor lightGrayColor],
|
||||
|
||||
NSUnderlineStyleAttributeName: @(NSUnderlinePatternSolid)};
|
||||
|
||||
_textView.delegate=self;
|
||||
|
||||
_textView.editable=NO;
|
||||
|
||||
_textView.scrollEnabled = YES;
|
||||
|
||||
}
|
||||
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange {
|
||||
|
||||
self.hidesBottomBarWhenPushed=YES;
|
||||
|
||||
if ([[URL scheme] isEqualToString:@"apmode"]) {
|
||||
|
||||
InfoByImageViewController*info=[[InfoByImageViewController alloc]init];
|
||||
info.title=@"热点连接方法";
|
||||
info.image=[UIImage imageNamed:@"apmodeInfo"];
|
||||
[self.navigationController pushViewController:info animated:YES];
|
||||
|
||||
|
||||
return NO;
|
||||
|
||||
} else if ([[URL scheme] isEqualToString:@"hotbar"]) {
|
||||
|
||||
InfoByImageViewController*info=[[InfoByImageViewController alloc]init];
|
||||
info.title=@"售后服务热线";
|
||||
info.type=@"service";
|
||||
info.image=[UIImage imageNamed:@"hotbarInfo"];
|
||||
[self.navigationController pushViewController:info animated:YES];
|
||||
|
||||
return NO;
|
||||
|
||||
}
|
||||
|
||||
return YES;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
-(UIImageView *)codeImage
|
||||
{
|
||||
if (!_codeImage) {
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
-(void)getTableData{
|
||||
|
||||
self.tileArr=@[@[@"扫二维码",@"我的看护"],@[@"关于我们",@"设置"],@[@"分享爱鱼奇",@"产品说明书",@"联系爱鱼奇"]];
|
||||
self.tileArr=@[@[@"扫二维码",@"我的看护"],@[@"关于我们",@"设置"],@[@"分享爱鱼奇",@"产品说明书",@"联系我们"]];
|
||||
self.headimgeArr = @[@[@"personal_iocn_scan",@"personal_iocn_care"],@[@"personal_iocn_about",@"personal_iocn_set"],@[@"personal_iocn_share",@"personal_iocn_instructions",@"personal_iocn_feedback"]];
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// InfoByImageViewController.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by 祝发冬 on 2020/6/20.
|
||||
// Copyright © 2020 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface InfoByImageViewController : BaseViewController
|
||||
@property (nonatomic, strong) UIImageView *imageView;
|
||||
@property (nonatomic, strong) UIImage *image;
|
||||
@property (nonatomic, strong) NSString *type;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// InfoByImageViewController.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by 祝发冬 on 2020/6/20.
|
||||
// Copyright © 2020 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "InfoByImageViewController.h"
|
||||
|
||||
@interface InfoByImageViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation InfoByImageViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.imageView=[[UIImageView alloc]initWithFrame:CGRectZero];
|
||||
[self.view addSubview:self.imageView];
|
||||
[ self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(0);
|
||||
make.top.mas_equalTo(0);
|
||||
make.bottom.mas_equalTo(0);
|
||||
make.right.mas_equalTo(0);
|
||||
}];
|
||||
if (self.image)
|
||||
{
|
||||
self.imageView.image=self.image;
|
||||
}
|
||||
if (self.title)
|
||||
{
|
||||
self.titleString=self.title;
|
||||
}
|
||||
if ([self.type isEqualToString:@"service"])
|
||||
{
|
||||
UIButton*xuanduo=[UIButton buttonWithType:UIButtonTypeSystem];
|
||||
[self.view addSubview:xuanduo];
|
||||
[xuanduo mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.left.mas_equalTo(0);
|
||||
make.top.mas_equalTo(0);
|
||||
make.height.mas_equalTo(self.view.frame.size.height/12);
|
||||
make.right.mas_equalTo(0);
|
||||
|
||||
}];
|
||||
xuanduo.tag=1;
|
||||
xuanduo.backgroundColor=[UIColor clearColor];
|
||||
[xuanduo addTarget:self action:@selector(service:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
|
||||
|
||||
|
||||
UIButton*reuxin=[UIButton buttonWithType:UIButtonTypeSystem];
|
||||
[self.view addSubview:reuxin];
|
||||
[reuxin mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.left.mas_equalTo(0);
|
||||
make.top.mas_equalTo(4*self.view.frame.size.height/12-25);
|
||||
make.height.mas_equalTo(self.view.frame.size.height/12);
|
||||
make.right.mas_equalTo(0);
|
||||
|
||||
}];
|
||||
reuxin.tag=2;
|
||||
reuxin.backgroundColor=[UIColor clearColor];
|
||||
[reuxin addTarget:self action:@selector(service:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
|
||||
UIButton*songnuo=[UIButton buttonWithType:UIButtonTypeSystem];
|
||||
[self.view addSubview:songnuo];
|
||||
[songnuo mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.left.mas_equalTo(0);
|
||||
make.top.mas_equalTo(8*self.view.frame.size.height/12-25);
|
||||
make.height.mas_equalTo(self.view.frame.size.height/12);
|
||||
make.right.mas_equalTo(0);
|
||||
|
||||
}];
|
||||
songnuo.tag=3;
|
||||
songnuo.backgroundColor=[UIColor clearColor];
|
||||
[songnuo addTarget:self action:@selector(service:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-(void)service:(UIButton*)button
|
||||
{
|
||||
NSURL*url;
|
||||
if (button.tag==1)
|
||||
{
|
||||
url=[NSURL URLWithString:@"tel://17321129273"];
|
||||
|
||||
}
|
||||
else if (button.tag==2)
|
||||
{
|
||||
url=[NSURL URLWithString:@"tel://4000121101"];
|
||||
}
|
||||
else if (button.tag==3)
|
||||
{
|
||||
url=[NSURL URLWithString:@"tel://13392205468"];
|
||||
}
|
||||
|
||||
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
|
||||
}else {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
// CFShow((__bridge CFTypeRef)(infoDic));
|
||||
NSString *app_Version=[infoDic objectForKey:@"CFBundleShortVersionString"];
|
||||
NSLog(@"app_Version%@",app_Version);
|
||||
app_Version=@"4.7.4";
|
||||
app_Version=@"4.7.5";
|
||||
NSString *versionStr = [NSString stringWithFormat:@"v%@",app_Version];
|
||||
NSString *buildVersion = [infoDic objectForKey:@"CFBundleVersion"];
|
||||
if (buildVersion.length > 0) {
|
||||
|
||||
+3
-3
@@ -21,12 +21,12 @@
|
||||
self.statusImg.image = [UIImage imageNamed:@"shop_certifycheck"];
|
||||
|
||||
self.statuesViewBtn.hidden = YES;
|
||||
NSString *titleStr=@"工作人员正在审核,请耐心等待。详情电话:021-54131006";
|
||||
NSString *titleStr=@"工作人员正在审核,请耐心等待。详情电话:18667812003";
|
||||
NSMutableAttributedString * attributedString = [[NSMutableAttributedString alloc] initWithString:titleStr];
|
||||
NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
//[paragraphStyle setLineSpacing:8];
|
||||
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, titleStr.length)];
|
||||
[attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor orangeColor] range:NSMakeRange(20,12)];
|
||||
[attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor orangeColor] range:NSMakeRange(20,11)];
|
||||
self.statysLabel.userInteractionEnabled = YES;
|
||||
[self.statysLabel setAttributedText:attributedString];
|
||||
UITapGestureRecognizer *labelTapGestureRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(labelTouchUpInside:)];
|
||||
@@ -43,7 +43,7 @@
|
||||
//拨打电话
|
||||
if ([UIApplication instancesRespondToSelector:@selector(canOpenURL:)]) {
|
||||
|
||||
NSString *telNumber = [NSString stringWithFormat:@"telprompt://%@",@"021-54131006"];
|
||||
NSString *telNumber = [NSString stringWithFormat:@"telprompt://%@",@"18667812003"];
|
||||
|
||||
NSURL *aURL = [NSURL URLWithString: telNumber];
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
@property (nonatomic,copy) NSString *imgeaName;
|
||||
@property (nonatomic,copy) NSString *deviceName;
|
||||
@property (nonatomic,strong) DeviceModel *device;
|
||||
@property (nonatomic,strong) NSMutableArray *list;//设备列表
|
||||
@property (nonatomic,strong) IfishCameraModel *camera;
|
||||
|
||||
@end
|
||||
|
||||
+3
@@ -26,6 +26,9 @@
|
||||
self.deviceImg.image = [UIImage imageNamed:@"加热系统"];
|
||||
}
|
||||
else if (indexPath.row ==3){
|
||||
self.deviceImg.image = [UIImage imageNamed:@"智能宠物系统"];
|
||||
}
|
||||
else if (indexPath.row ==4){
|
||||
self.deviceImg.image = [UIImage imageNamed:@"敬请期待"];
|
||||
}
|
||||
|
||||
|
||||
+31
-12
@@ -86,7 +86,7 @@ extern BOOL isfromCameraView;
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
return 4;
|
||||
return 5;
|
||||
}
|
||||
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
@@ -102,7 +102,7 @@ extern BOOL isfromCameraView;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return 378/2.0;
|
||||
return 278/2.0;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
@@ -126,10 +126,10 @@ extern BOOL isfromCameraView;
|
||||
{
|
||||
//摄像头
|
||||
NSArray * cameraArr =[[DataCenter defaultDtacenter]valueForKey:@"cameraArr"];
|
||||
if ([cameraArr count]>=5) {
|
||||
[self.view makeToast:@"设备已达上限"];
|
||||
return;
|
||||
}
|
||||
// if ([cameraArr count]>=5) {
|
||||
// [self.view makeToast:@"设备已达上限"];
|
||||
// return;
|
||||
// }
|
||||
if ( [GWP2PClient sharedClient].linkStatus==P2PLinkStatusOK) {
|
||||
|
||||
|
||||
@@ -156,12 +156,12 @@ extern BOOL isfromCameraView;
|
||||
//水族箱
|
||||
NSArray * deviceArr =[[DataCenter defaultDtacenter]valueForKey:@"deviceInfo"];
|
||||
|
||||
if ([deviceArr count]>=5) {
|
||||
|
||||
[self.view makeToast:@"设备已达上限"];
|
||||
return;
|
||||
|
||||
}
|
||||
// if ([deviceArr count]>=5) {
|
||||
//
|
||||
// [self.view makeToast:@"设备已达上限"];
|
||||
// return;
|
||||
//
|
||||
// }
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
ConAquarMethodVC *methodVC = InitObject(ConAquarMethodVC);
|
||||
methodVC.deviceType=DEVICEAQUARIUM;
|
||||
@@ -190,6 +190,25 @@ extern BOOL isfromCameraView;
|
||||
//[self.view makeToast:@"敬请期待"]; 加热棒
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
ConAquarMethodVC *methodVC = InitObject(ConAquarMethodVC);
|
||||
methodVC.deviceType=DEVICEPETS;
|
||||
methodVC.titleString=@"连接宠物笼";
|
||||
|
||||
[self.navigationController pushViewController:methodVC animated:YES];
|
||||
|
||||
// SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init];
|
||||
// wifivc.vcTitle=@"连接加热器";
|
||||
// [self.navigationController pushViewController:wifivc animated:YES];
|
||||
// [wifivc addTitleViewWithTitle:@"连接加热器"];
|
||||
//[self.view makeToast:@"敬请期待"]; 加热棒
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
#import "PushMessageModel.h"
|
||||
#import "IfishInformationListViewCell.h"//资讯
|
||||
#import "JHRefresh.h"//refresh
|
||||
#import "PetStoresViewController.h"
|
||||
#import "StoreNameView.h"
|
||||
#import "ConnectingAquarVC.h"
|
||||
#import "SecondConnectWifiController.h"
|
||||
@interface IfishDeviceViewController ()<UITableViewDelegate,UITableViewDataSource,LxPopViewDelegate,ShopTtemListDelegate>
|
||||
|
||||
@property(nonatomic,strong)UITableView *tableView;
|
||||
@@ -52,6 +56,7 @@
|
||||
@property(nonatomic,strong) DXPopover *popover;
|
||||
|
||||
@property(nonatomic,strong) NSArray *cameraArr;
|
||||
@property(nonatomic,strong) NSMutableDictionary *petStores;
|
||||
|
||||
@property(nonatomic,strong) UIButton*rightButton;
|
||||
|
||||
@@ -261,7 +266,11 @@ Assign BOOL isPush;
|
||||
}
|
||||
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];
|
||||
[weakSelf.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
weakSelf.tableView.backgroundColor = RGB(10, 18, 177);
|
||||
|
||||
});
|
||||
}
|
||||
[weakSelf endRefreshing];
|
||||
} failure:^(NSError *err) {
|
||||
[weakSelf endRefreshing];
|
||||
@@ -373,18 +382,47 @@ Assign BOOL isPush;
|
||||
//设备信息
|
||||
NSArray*deviceArray=dataDic[@"device"];
|
||||
NSArray*cameraA=dataDic[@"camera"];
|
||||
//宠物店
|
||||
NSMutableDictionary*petStores=[NSMutableDictionary dictionary];
|
||||
NSMutableArray *deviceArr = [[NSMutableArray alloc] init];
|
||||
if ([deviceArray count]!=0) {
|
||||
|
||||
for (NSDictionary*deviceDic in deviceArray) {
|
||||
DeviceModel*devicemodel=[[DeviceModel alloc] initWithDict:deviceDic];
|
||||
|
||||
[deviceArr insertObject:devicemodel atIndex:0];
|
||||
|
||||
if ([devicemodel.type isEqualToString:DECICE_TYPE_XUANDUO3F])//宠物笼
|
||||
|
||||
{
|
||||
|
||||
NSString*storeName=devicemodel.storeName;
|
||||
if ([storeName isKindOfClass:[NSNull class]]||([storeName isKindOfClass: [NSString class]]&&storeName.length==0)) {
|
||||
storeName=@"宠物店";
|
||||
}
|
||||
NSMutableArray*array=petStores[storeName];
|
||||
if (!array) {
|
||||
array=[NSMutableArray array];
|
||||
|
||||
}
|
||||
[array insertObject:devicemodel atIndex:0];
|
||||
|
||||
petStores[storeName]=array;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
[deviceArr insertObject:devicemodel atIndex:0];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
[[DataCenter defaultDtacenter]setValue:deviceArr forKey:@"deviceInfo"];
|
||||
|
||||
|
||||
self.petStores=petStores;
|
||||
[[DataCenter defaultDtacenter]setValue:petStores forKey:@"petStores"];
|
||||
|
||||
//存储摄像头设备信息
|
||||
NSMutableArray *camras = [[NSMutableArray alloc] init];
|
||||
if (cameraA .count !=0) {
|
||||
@@ -425,6 +463,7 @@ Assign BOOL isPush;
|
||||
|
||||
[weakSelf refreshUI];
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
[weakSelf.view makeToast:@"户数据获取失败"];
|
||||
@@ -805,10 +844,12 @@ Assign BOOL isPush;
|
||||
|
||||
self.deviceArr =[dataContorl getallDevices];
|
||||
self.cameraArr =[dataContorl getallCameras];
|
||||
self.petStores= [[DataCenter defaultDtacenter]valueForKey:@"petStores"];
|
||||
[self getTotalDeviceArrWith:self.deviceArr addCameraArr:self.cameraArr];
|
||||
|
||||
[self.tableView reloadData];
|
||||
[self getUsernameAddImg];
|
||||
|
||||
}
|
||||
|
||||
-(void)getTotalDeviceArrWith:(NSArray *)deivceArr addCameraArr:(NSArray *)cameraArr;
|
||||
@@ -820,12 +861,17 @@ Assign BOOL isPush;
|
||||
}
|
||||
|
||||
for (DeviceModel *device in deivceArr) {
|
||||
FormatTankAddCamera *deviceListModel =[[FormatTankAddCamera alloc] init];
|
||||
deviceListModel.device = device;
|
||||
deviceListModel.type = @"tank";
|
||||
deviceListModel.deviceName = device.showName;
|
||||
deviceListModel.imgeaName = @"home_iocn_aquarium";
|
||||
[self.totalArr addObject:deviceListModel];
|
||||
|
||||
if (![device.type isEqualToString:DECICE_TYPE_XUANDUO3F])
|
||||
{
|
||||
FormatTankAddCamera *deviceListModel =[[FormatTankAddCamera alloc] init];
|
||||
deviceListModel.device = device;
|
||||
deviceListModel.type = @"tank";
|
||||
deviceListModel.deviceName = device.showName;
|
||||
deviceListModel.imgeaName = @"home_iocn_aquarium";
|
||||
[self.totalArr addObject:deviceListModel];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -839,6 +885,16 @@ Assign BOOL isPush;
|
||||
[self.totalArr addObject:deviceListModel];
|
||||
|
||||
}
|
||||
for (NSString *store in self.petStores) {
|
||||
FormatTankAddCamera *deviceListModel =[[FormatTankAddCamera alloc] init];
|
||||
deviceListModel.list = self.petStores[store];
|
||||
deviceListModel.type = @"pets";
|
||||
deviceListModel.deviceName = store;
|
||||
deviceListModel.imgeaName = @"petsImage";
|
||||
[self.totalArr addObject:deviceListModel];
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1184,7 +1240,48 @@ Assign BOOL isPush;
|
||||
[[Socketsingleton sharedInstance] cutOffSocket];
|
||||
[[IfishDataUnity shareDataInstance] initAppCenterVcWith:model.device addWithdissMisVc:nil];
|
||||
|
||||
}else if ([model.type isEqualToString:@"camera"]){
|
||||
}
|
||||
else if ([model.type isEqualToString:@"pets"])
|
||||
{
|
||||
// PetStoresViewController*store=[[PetStoresViewController alloc]init];
|
||||
// store.store=model;
|
||||
[[DataCenter defaultDtacenter] setValue:model forKey:@"currentStore"];
|
||||
|
||||
DeviceModel*pushDevice=nil;
|
||||
NSString*macid=[[DataCenter defaultDtacenter].cache stringForKey:@"currentPetDevice"];
|
||||
if (macid.length)
|
||||
{
|
||||
BOOL find=NO;
|
||||
for (DeviceModel*de in model.list) {
|
||||
if ([macid isEqualToString:de.macAddress])
|
||||
{
|
||||
find=YES;
|
||||
pushDevice=de;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (find)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
pushDevice=model.list.firstObject;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pushDevice=model.list.firstObject;
|
||||
}
|
||||
|
||||
[[DataCenter defaultDtacenter].cache setString:pushDevice.macAddress forKey:@"currentPetDevice"];
|
||||
[[Socketsingleton sharedInstance] cutOffSocket];
|
||||
[[IfishDataUnity shareDataInstance] initAppCenterVcWith:pushDevice addWithdissMisVc:nil];
|
||||
|
||||
|
||||
}
|
||||
else if ([model.type isEqualToString:@"camera"]){
|
||||
|
||||
// self.hidesBottomBarWhenPushed = YES;
|
||||
// IfishP2PPlayBackListViewController *cameraShopVC=[[IfishP2PPlayBackListViewController alloc]init];
|
||||
@@ -1283,7 +1380,13 @@ Assign BOOL isPush;
|
||||
|
||||
[self delectTankWith:deviceListModel AtIndexPath:indexPath];
|
||||
|
||||
}else{
|
||||
}
|
||||
else if ([deviceListModel.type isEqualToString:@"pets"]) {
|
||||
|
||||
[self delectTankWith:deviceListModel AtIndexPath:indexPath];
|
||||
|
||||
}
|
||||
else{
|
||||
//camera
|
||||
|
||||
|
||||
@@ -1393,14 +1496,34 @@ Assign BOOL isPush;
|
||||
mannager.responseSerializer=[AFHTTPResponseSerializer serializer];
|
||||
NSMutableDictionary * para = [NSMutableDictionary dictionary];
|
||||
|
||||
NSString *priId=deviceListModel.device.deviceId;
|
||||
;
|
||||
NSString*userId=deviceListModel.device.userId;
|
||||
NSString*string=[NSString stringWithFormat:@"%@/api/user/deleteDeviceUser.do",JIEKOUPORT];
|
||||
|
||||
|
||||
if ([deviceListModel.type isEqualToString:@"pets"]) {
|
||||
string=[NSString stringWithFormat:@"%@/api/user/deletePetDeviceUser.do",JIEKOUPORT];
|
||||
DeviceModel*model=[deviceListModel.list firstObject];
|
||||
NSString *priId=model.deviceId;
|
||||
;
|
||||
NSString*userId=model.userId;
|
||||
para[@"userId"]=userId;
|
||||
para[@"deviceId"]=priId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
NSString *priId=deviceListModel.device.deviceId;
|
||||
;
|
||||
NSString*userId=deviceListModel.device.userId;
|
||||
|
||||
[para setValue:priId forKey:@"priId.deviceId"];
|
||||
[para setValue:userId forKey:@"priId.userId"];
|
||||
}
|
||||
|
||||
[para setValue:priId forKey:@"priId.deviceId"];
|
||||
[para setValue:userId forKey:@"priId.userId"];
|
||||
__weak typeof (self)weakSelf=self;
|
||||
[mannager POST:kDeleteDeviceUser parameters:para success:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
|
||||
[mannager POST:string parameters:para success:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
if (responseObject) {
|
||||
NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
|
||||
|
||||
@@ -1446,9 +1569,10 @@ Assign BOOL isPush;
|
||||
[weakSelf.tableView reloadData];
|
||||
|
||||
});
|
||||
[weakSelf addDataRequestQueue];
|
||||
|
||||
/*
|
||||
而如果有循环的调用的话,可以用dispatch_source_set_timer来实现 用到GCD的事件源和事件监听的机制
|
||||
而如果有循环的调用的话,可以用dispatch_source_set_timer来实现 用到GCD的事件源和事件监听的机制
|
||||
int interval = 2;
|
||||
int leeway = 0;
|
||||
|
||||
@@ -1547,7 +1671,7 @@ Assign BOOL isPush;
|
||||
}
|
||||
|
||||
NSIndexSet *asset = [NSIndexSet indexSetWithIndex:2];
|
||||
[weskSelf.tableView reloadSections:asset withRowAnimation:UITableViewRowAnimationNone];
|
||||
[weskSelf.tableView reloadSections:asset withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
}
|
||||
|
||||
[weskSelf.progressHud hide:YES];
|
||||
@@ -1577,7 +1701,7 @@ Assign BOOL isPush;
|
||||
//rect.size.height = - offsetY;
|
||||
//self.tabDowloadHoldView.frame = rect;
|
||||
|
||||
self.tableView.backgroundColor = RGB(10, 18, 177);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+16
-12
@@ -1,12 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -20,14 +19,14 @@
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="THd-Bu-zD5">
|
||||
<rect key="frame" x="17" y="10" width="89" height="75"/>
|
||||
<rect key="frame" x="25" y="10" width="89" height="75"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="89" id="0Pc-4E-ufb"/>
|
||||
<constraint firstAttribute="height" constant="75" id="KcI-Vb-QWI"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="内容摘要" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j2f-hz-gt7">
|
||||
<rect key="frame" x="114" y="33" width="198" height="15"/>
|
||||
<rect key="frame" x="122" y="33" width="182" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="15" id="Mem-ah-ew5"/>
|
||||
</constraints>
|
||||
@@ -36,7 +35,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="标题栏" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JgQ-HP-X5l">
|
||||
<rect key="frame" x="114" y="10" width="198" height="21"/>
|
||||
<rect key="frame" x="122" y="10" width="182" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="BEA-GV-KLN"/>
|
||||
</constraints>
|
||||
@@ -45,21 +44,21 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="21M-GY-1ue">
|
||||
<rect key="frame" x="0.0" y="94" width="320" height="1"/>
|
||||
<rect key="frame" x="0.0" y="93.5" width="320" height="1"/>
|
||||
<color key="backgroundColor" red="0.83529411764705885" green="0.83529411764705885" blue="0.83529411764705885" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="Swk-c6-aZl"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="informationlist_view.png" translatesAutoresizingMaskIntoConstraints="NO" id="4WM-Lf-mP1">
|
||||
<rect key="frame" x="208" y="69" width="20" height="12"/>
|
||||
<rect key="frame" x="200" y="66.5" width="20" height="12"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="12" id="5Q6-5Z-GhG"/>
|
||||
<constraint firstAttribute="width" constant="20" id="kt8-Rt-4lN"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1000" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8BV-KU-YQ2">
|
||||
<rect key="frame" x="234.5" y="64" width="28.5" height="20"/>
|
||||
<rect key="frame" x="226.5" y="61.5" width="28.5" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="CWc-Pp-MZi"/>
|
||||
</constraints>
|
||||
@@ -68,7 +67,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="10" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tos-bK-aju">
|
||||
<rect key="frame" x="298.5" y="65" width="13.5" height="20"/>
|
||||
<rect key="frame" x="290.5" y="62.5" width="13.5" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="aPb-az-2hG"/>
|
||||
</constraints>
|
||||
@@ -77,7 +76,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="informationlist_comment.png" translatesAutoresizingMaskIntoConstraints="NO" id="akZ-xg-M7C">
|
||||
<rect key="frame" x="278" y="69" width="16" height="13"/>
|
||||
<rect key="frame" x="270" y="66.5" width="16" height="13"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="13" id="jI9-LF-fAx"/>
|
||||
<constraint firstAttribute="width" constant="16" id="jlO-wX-UXc"/>
|
||||
@@ -105,6 +104,11 @@
|
||||
<constraint firstItem="j2f-hz-gt7" firstAttribute="top" secondItem="JgQ-HP-X5l" secondAttribute="bottom" constant="2" id="fgL-3A-GSX"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="JgQ-HP-X5l" secondAttribute="trailing" id="vgK-9J-52g"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="detailLabe" destination="j2f-hz-gt7" id="Qgk-YF-MRi"/>
|
||||
|
||||
Reference in New Issue
Block a user