单军华
2018-04-18 de88ae127e305e0b153c327b073645f9353cace5
pregnancy_guard/BaseProject/Controller/Home/RadiaDetectionPage.m
@@ -75,6 +75,11 @@
    NSTimer * myTimer;
    NSString * myTimeInterval;
    NSString * is_open_upload; // 1 可以 0 禁止
    GloriaLabel* _AnquanStatustLabel;
    UIImageView * icon_anquan;
    UIImageView * ic_zhishu_bk;
    UIImageView * ic_weixin_tips;
}
@end
@@ -510,7 +515,7 @@
/**
 *This method invoke after a new peripheral found.
 *This method invoke after a new peripheral found. 蓝牙检索成功 开始连接
 */
-(void)discoveryDidRefresh
{
@@ -741,11 +746,11 @@
    
    
    UIImageView * icon_anquan = [[UIImageView alloc] initWithFrame:CGRectMake(19*scale, 10*scale, 22*scale, 22*scale)];
    icon_anquan.image = [UIImage imageNamed:@"icon_anquan"];
    icon_anquan.image = [UIImage imageNamed:@"icon_head_offline"];
    [ic_anquan_status addSubview:icon_anquan];
    
    
    GloriaLabel* _AnquanStatustLabel = [[GloriaLabel alloc] initWithFrame:CGRectMake(0, 35*scale,60*scale, 20*scale)];
    _AnquanStatustLabel = [[GloriaLabel alloc] initWithFrame:CGRectMake(0, 35*scale,60*scale, 20*scale)];
    _AnquanStatustLabel.font = [UIFont systemFontOfSize:unitFontSize];
    _AnquanStatustLabel.textAlignment = UITextAlignmentCenter;
    _AnquanStatustLabel.textColor = kUIColorFromRGB(0x07cb5a);
@@ -753,7 +758,7 @@
    [ic_anquan_status addSubview:_AnquanStatustLabel];
    
    
    UIImageView * ic_zhishu_bk = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-245*scale)/2, (66+20+292+20)*scale, 245*scale, 48*scale)];
    ic_zhishu_bk = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-245*scale)/2, (66+20+292+20)*scale, 245*scale, 48*scale)];
    ic_zhishu_bk.image = [UIImage imageNamed:@"ic_zhishu_bk"];
    [self.view addSubview:ic_zhishu_bk];
    
@@ -777,7 +782,7 @@
    _currentTipsLabel.text = @"未开始检测";
    [ic_bottom_bg addSubview:_currentTipsLabel];
    
    UIImageView * ic_weixin_tips = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-34*scale)/2, -17*scale, 34*scale, 34*scale)];
    ic_weixin_tips = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-34*scale)/2, -17*scale, 34*scale, 34*scale)];
    ic_weixin_tips.image = [UIImage imageNamed:@"ic_weixin_tips"];
    [ic_bottom_bg addSubview:ic_weixin_tips];
    
@@ -829,18 +834,32 @@
    
    _locService.desiredAccuracy = kCLLocationAccuracyNearestTenMeters;
    
    [self startLocation];
    //[self startLocation];
    
    dataModelArr = [[NSMutableArray alloc] init];
    
    myTimeInterval = [UserDefault stringForKey:@"refresh_frequency"];
    is_open_upload = [UserDefault stringForKey:@"is_open_upload"];
    
    [self offLineSet];
    //myTimer =  [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(function:) userInfo:nil repeats:YES];
    //每1秒运行一次function方法。
    
}
-(void)offLineSet
{
    _AnquanStatustLabel.text = @"离线";
    _AnquanStatustLabel.textColor = kUIColorFromRGB(0x848787);
    deviceStatusLabel.text = @"未连接";
    deviceStatusLabel.textColor = kUIColorFromRGB(0x848787);
    icon_anquan.image = [UIImage imageNamed:@"icon_head_offline"];
    ic_anquan_status.image = [UIImage imageNamed:@"bg_corner_gray"];
    ic_weixin_tips.image = [UIImage imageNamed:@"icon_offline"];
    ic_zhishu_bk.image = [UIImage imageNamed:@"bt_offline"];
    _currentTipsLabel.textColor = kUIColorFromRGB(0x848787);
}
-(void)connectAction
{
    SearchDevicePage* page = [[SearchDevicePage alloc] initIsFirstPage:NO];