Commit 43609e20 by 李威

保养

parent 175468bd
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "组 61@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 61@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "清洁@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "清洁@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#ifndef XHURL_h #ifndef XHURL_h
#define XHURL_h #define XHURL_h
//#define DRURL @"https://testdjm.imoreme.com"//测试 #define DRURL @"https://testdjm.imoreme.com"//测试
#define DRURL @"https://djm.imoreme.com"//正式 //#define DRURL @"https://djm.imoreme.com"//正式
//#define URL @"http://192.168.1.168:8080"//luocong //#define URL @"http://192.168.1.168:8080"//luocong
//#define URL @"http://192.168.1.66:9012"//luocong //#define URL @"http://192.168.1.66:9012"//luocong
......
...@@ -180,8 +180,11 @@ ...@@ -180,8 +180,11 @@
self.localIsupkeep = [dic objectForKey:@"isUpkeep"]; self.localIsupkeep = [dic objectForKey:@"isUpkeep"];
if ([self.localIsupkeep isEqualToString:@"0"]) { if ([self.localIsupkeep isEqualToString:@"0"]) {
self.myView.byBtn.hidden = NO; self.myView.byBtn.hidden = NO;
self.myView.startUpkeepBtn.hidden = NO;
}else{ }else{
self.myView.byBtn.hidden = YES; self.myView.byBtn.hidden = YES;
self.myView.startUpkeepBtn.hidden = YES;
} }
} }
} }
...@@ -277,8 +280,10 @@ ...@@ -277,8 +280,10 @@
weakSelf.isNeedUpkeep = [responseObject[@"data"] boolValue]; weakSelf.isNeedUpkeep = [responseObject[@"data"] boolValue];
if(weakSelf.isNeedUpkeep){ if(weakSelf.isNeedUpkeep){
[weakSelf showUpkeepAlert]; //[weakSelf showUpkeepAlert];
weakSelf.myView.byBtn.hidden = NO; weakSelf.myView.byBtn.hidden = NO;
weakSelf.myView.startUpkeepBtn.hidden = NO;
}else{ }else{
weakSelf.myView.byBtn.hidden = YES; weakSelf.myView.byBtn.hidden = YES;
} }
......
...@@ -86,7 +86,7 @@ typedef enum : NSUInteger{ ...@@ -86,7 +86,7 @@ typedef enum : NSUInteger{
@property (nonatomic,strong) UILabel *speedStressTitleLb; @property (nonatomic,strong) UILabel *speedStressTitleLb;
@property (nonatomic,strong)UIButton *startUpkeepBtn;
......
...@@ -167,29 +167,29 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -167,29 +167,29 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
- (void)creatUI{ - (void)creatUI{
self.backgroundColor = XHColorRGB(247, 247, 247); self.backgroundColor = XHColorRGB(247, 247, 247);
_byBtn = [UIButton buttonWithType:UIButtonTypeCustom]; // _byBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_byBtn setTitle:HJLocalizedString(@"建议本次使用结束后进行设备保养") forState:UIControlStateNormal]; // [_byBtn setTitle:HJLocalizedString(@"建议本次使用结束后进行设备保养") forState:UIControlStateNormal];
[_byBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside]; // [_byBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_byBtn.tag = Itembaoyang; // _byBtn.tag = Itembaoyang;
[_byBtn setImage:[UIImage imageNamed:@"HFX_froget"] forState:UIControlStateNormal]; // [_byBtn setImage:[UIImage imageNamed:@"HFX_froget"] forState:UIControlStateNormal];
_byBtn.backgroundColor = XHColorRGB(252, 214, 214); // _byBtn.backgroundColor = XHColorRGB(252, 214, 214);
[_byBtn setTitleColor:XHColorRGB(175, 44, 35) forState:UIControlStateNormal]; // [_byBtn setTitleColor:XHColorRGB(175, 44, 35) forState:UIControlStateNormal];
_byBtn.titleLabel.font = XHFontSize(12); // _byBtn.titleLabel.font = XHFontSize(12);
_byBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; // _byBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
_byBtn.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft; // _byBtn.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
_byBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0); // _byBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0);
_byBtn.imageEdgeInsets = UIEdgeInsetsMake(0, _byBtn.titleLabel.bounds.size.width + 25, 0, -(_byBtn.titleLabel.bounds.size.width + 10)); // _byBtn.imageEdgeInsets = UIEdgeInsetsMake(0, _byBtn.titleLabel.bounds.size.width + 25, 0, -(_byBtn.titleLabel.bounds.size.width + 10));
[self addSubview:_byBtn]; // [self addSubview:_byBtn];
[_byBtn mas_makeConstraints:^(MASConstraintMaker *make) { // [_byBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(self); // make.left.right.top.equalTo(self);
make.height.equalTo(@25); // make.height.equalTo(@25);
}]; // }];
self.byBtn.hidden = YES; // self.byBtn.hidden = YES;
UIView *centerLine = [UIView new]; UIView *centerLine = [UIView new];
[self addSubview:centerLine]; [self addSubview:centerLine];
[centerLine mas_makeConstraints:^(MASConstraintMaker *make) { [centerLine mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.byBtn.mas_bottom).offset(22 *IPhone6ScaleHeight); make.top.equalTo(self).offset(22 *IPhone6ScaleHeight);
make.centerX.equalTo(self); make.centerX.equalTo(self);
make.size.mas_equalTo(CGSizeMake(0.1, 0.1)); make.size.mas_equalTo(CGSizeMake(0.1, 0.1));
}]; }];
...@@ -640,7 +640,26 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -640,7 +640,26 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_speedStressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1); _speedStressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_speedStressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1); _speedStressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
[self setTimeLineWithString:_currentVideoList[0].describeInfo]; [self setTimeLineWithString:_currentVideoList[0].describeInfo];
_startUpkeepBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_startUpkeepBtn setBackgroundImage:[UIImage imageNamed:@"HFX_upkeepBackBtn"] forState:UIControlStateNormal];
[_startUpkeepBtn setImage:[UIImage imageNamed:@"HFX_upkeepBtn"] forState:UIControlStateNormal];
[_startUpkeepBtn setTitle:[NSString stringWithFormat:@" %@",HJLocalizedString(@"立即进行设备保养")] forState:UIControlStateNormal];
[_startUpkeepBtn setTitleColor:XHColorRGB_Alpha(164, 47, 36, 1) forState:UIControlStateNormal];
_startUpkeepBtn.titleLabel.font = XHFontSizeBold(14);
_startUpkeepBtn.hidden = YES;
[_startUpkeepBtn addTarget:self action:@selector(startUpkeepClik:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:_startUpkeepBtn];
[_startUpkeepBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.centerX.equalTo(self);
make.size.mas_equalTo(CGSizeMake(334, 67));
make.bottom.mas_equalTo(-35);
}];
} }
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
if ([touch.view isDescendantOfView:self.collectionView]) { if ([touch.view isDescendantOfView:self.collectionView]) {
if ([self.collectionView indexPathForItemAtPoint:[touch locationInView:self.collectionView]]) { if ([self.collectionView indexPathForItemAtPoint:[touch locationInView:self.collectionView]]) {
...@@ -957,6 +976,13 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell"; ...@@ -957,6 +976,13 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[self.delegate deviceControlWithTag:sender.tag]; [self.delegate deviceControlWithTag:sender.tag];
} }
} }
-(void)startUpkeepClik:(UIButton *)button {
if(self.delegate && [self.delegate respondsToSelector:@selector(deviceControlWithTag:)]){
[self.delegate deviceControlWithTag:Itembaoyang];
}
}
- (void)changeVolume:(UIButton *)sender{ - (void)changeVolume:(UIButton *)sender{
sender.selected = !sender.selected; sender.selected = !sender.selected;
self.playerView.currentPlayerManager.muted = !sender.selected; self.playerView.currentPlayerManager.muted = !sender.selected;
......
...@@ -229,12 +229,12 @@ static NSString *dxmachineCell = @"DXDeviceListCell"; ...@@ -229,12 +229,12 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
@"imgName":@"DXDr_HFX", @"imgName":@"DXDr_HFX",
@"tag":@(DR04BtnTag) @"tag":@(DR04BtnTag)
}, },
@{@"DeviceType":@"Dr.热电仪", // @{@"DeviceType":@"Dr.热电仪",
@"DeviceCode":@"Dr-05", // @"DeviceCode":@"Dr-05",
@"DeviceId":@"Dr-05", // @"DeviceId":@"Dr-05",
@"imgName":@"DXDr_HFX", // @"imgName":@"DXDr_HFX",
@"tag":@(DR05BtnTag) // @"tag":@(DR05BtnTag)
} // }
]; ];
self.dataArr = [XHDeviceListModel mj_objectArrayWithKeyValuesArray:arr]; self.dataArr = [XHDeviceListModel mj_objectArrayWithKeyValuesArray:arr];
[self.myTabView reloadData]; [self.myTabView reloadData];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment