Commit 413f2c69 by 李威

热电

parent e41afef7
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "组 55@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 55@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矩形 8 拷贝 7@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矩形 8 拷贝 7@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -158,4 +158,10 @@
/*海菲秀获取BANNER列表*/
#define HFXGetBannerList [NSString stringWithFormat:@"%@%@",URL,@"/hfx/getBanner"]
/*热电获取视频列表*/
#define RDGetVideoList [NSString stringWithFormat:@"%@%@",URL,@"/ldm/api/operateVideos"]
/*热电获取智能调控能量和温度*/
#define RDGetSmartRec [NSString stringWithFormat:@"%@%@",URL,@"/ldm/api/smartRec"]
#endif /* XHURL_h */
//
// DXHEUpkeepVC.h
// DJMHomeTY
//
// Created by nana on 2024/3/22.
//
#import "XHParentVC.h"
NS_ASSUME_NONNULL_BEGIN
@interface DXHEUpkeepVC : XHParentVC
@end
NS_ASSUME_NONNULL_END
//
// DXHEUpkeepVC.m
// DJMHomeTY
//
// Created by nana on 2024/3/22.
//
#import "DXHEUpkeepVC.h"
#import "ZFPlayer.h"
#import <ZFPlayer/ZFPlayerControlView.h>
#import <ZFPlayer/ZFAVPlayerManager.h>
#import "DXHFXVideoModel.h"
#import "KTVHTTPCache.h"
@interface DXHEUpkeepVC ()
@property (nonatomic, strong) ZFPlayerControlView *controlView;
@property (nonatomic,strong) ZFPlayerController *playerView;
@property (nonatomic,strong) UIView *containerView;
@property (nonatomic,strong)DXHFXVideoDetailsModel *videoListModel;
@end
@implementation DXHEUpkeepVC
- (void)viewDidLoad {
[super viewDidLoad];
[self initData];
[self initUI];
[self requestVideoList];
// Do any additional setup after loading the view.
}
-(void)initData {
}
-(void)initUI {
self.title = @"Dr-05";
self.view.backgroundColor = XHColorRGB(247, 247, 247);
// self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor];
UILabel *titleLb = [UILabel new];
titleLb.text = HJLocalizedString(@"探头清洁指引");
titleLb.font = XHFontSize(17);
titleLb.textColor = [UIColor blackColor];
[self.view addSubview:titleLb];
[titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.top.equalTo(@(HJNavHeight + 35*IPhone6ScaleHeight));
}];
UIView *linel = [UIView new];
linel.backgroundColor = XHColorRGB(175, 44, 35);
UIView *liner = [UIView new];
liner.backgroundColor = XHColorRGB(175, 44, 35);
[self.view addSubview:linel];
[self.view addSubview:liner];
[linel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(titleLb);
make.size.mas_equalTo(CGSizeMake(40, 0.5));
make.right.equalTo(titleLb.mas_left).offset(-20);
}];
[liner mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(titleLb);
make.size.mas_equalTo(CGSizeMake(40, 0.5));
make.left.equalTo(titleLb.mas_right).offset(20);
}];
_containerView = [UIView new];
_containerView.backgroundColor = [UIColor blueColor];
_containerView.layer.cornerRadius = 10.f;
_containerView.layer.masksToBounds = YES;
[self.view addSubview:_containerView];
[_containerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.equalTo(@(HJScreenWidth - 38));
make.centerX.equalTo(self);
make.height.equalTo(@((HJScreenWidth - 38) * 0.5625));
// make.height.equalTo(@0);
make.top.equalTo(titleLb.mas_bottom).offset(42*IPhone6ScaleHeight);
}];
ZFAVPlayerManager *playerManager = [[ZFAVPlayerManager alloc] init];
playerManager.shouldAutoPlay = YES;
if([HJUserDefaults objectForKey:@"videoSwitchIsOn"]){
NSString *videoSwitchIsOn = [HJUserDefaults objectForKey:@"videoSwitchIsOn"];
if([videoSwitchIsOn isEqualToString:@"1"]){
playerManager.shouldAutoPlay = YES;
}else{
playerManager.shouldAutoPlay = NO;
}
}else{
playerManager.shouldAutoPlay = YES;
}
_playerView = [[ZFPlayerController alloc]initWithPlayerManager:playerManager containerView:_containerView];
/// 调节播放进度
// - (void)seekToTime:(NSTimeInterval)time completionHandler:(void (^ __nullable)(BOOL finished))completionHandler;
self.playerView.controlView = self.controlView;
self.playerView.allowOrentitaionRotation = NO;
self.playerView.containerView.backgroundColor = [UIColor blueColor];
self.playerView.currentPlayerManager.scalingMode = ZFPlayerScalingModeAspectFill;
self.playerView.pauseWhenAppResignActive = YES;
self.playerView.pauseByEvent = YES;
UILabel *detailLabel = [[UILabel alloc] init];
detailLabel.text = HJLocalizedString(@"使用纸巾擦拭探头,将探头残余凝胶清洁干净 后,再次使用酒精棉片或生理盐水重新擦拭探 头,保持探头干净卫生,更助于仪器的长期使 ");
detailLabel.numberOfLines = 0;
detailLabel.font = XHFontSize(17);
detailLabel.textColor = [UIColor blackColor];
[self.view addSubview:detailLabel];
[detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.equalTo(@(HJScreenWidth - 38));
make.centerX.equalTo(self);
// make.height.equalTo(@0);
make.top.equalTo(_containerView.mas_bottom).offset(42*IPhone6ScaleHeight);
}];
}
-(void)requestVideoList {
HJSelfWeak;
NSMutableDictionary *paramsDic = [NSMutableDictionary dictionary];
[paramsDic setObject:@"0" forKey:@"type"];
[[XHHttpRequestManager shareManager] getHttpRequestURL:HFXGetVideoList isJson:NO parameters:paramsDic success:^(id responseObject) {
[SVProgressHUD dismiss];
NSLog(@"responseObject:\n%@===%@",responseObject,responseObject[@"msg"]);
NSArray *urlArray = responseObject[@"data"];
if (urlArray.count>0) {
weakSelf.videoListModel = [DXHFXVideoDetailsModel mj_objectWithKeyValues:urlArray[0]];
NSLog(@"%@",weakSelf.videoListModel);
}
} fail:^(id failMessage) {
}networkRequestsFail:^(id networkFail) {
}];
}
-(void)setVideoListModel:(DXHFXVideoDetailsModel *)videoListModel {
_videoListModel = videoListModel;
NSURL *proxyURL = [KTVHTTPCache proxyURLWithOriginalURL:[NSURL URLWithString:videoListModel.videoUrl]];
self.playerView.assetURL = proxyURL;
HJSelfWeak;
self.playerView.playerDidToEnd = ^(id _Nonnull asset) {
weakSelf.playerView.assetURL = proxyURL;
};
}
- (NSMutableArray *)setTimeLineWithString:(NSString *)describeInfo{
NSArray *itemTitleArray = [describeInfo componentsSeparatedByString:@","];
NSMutableArray *titleArray = [NSMutableArray array];
NSMutableArray *titleTimeArray = [NSMutableArray array];
NSMutableArray *timeArray = [NSMutableArray array];
for (int i = 0; i < itemTitleArray.count; i ++) {
NSArray *temparray = [itemTitleArray[i] componentsSeparatedByString:@":"];
[titleArray addObject:temparray[0]];
[titleTimeArray addObject:temparray[1]];
[timeArray addObject:temparray[2]];
}
NSMutableArray *titleTimeArray1 = [NSMutableArray array];
for (__strong NSString *titleTime in titleTimeArray) {
if([titleTime intValue] < 60){
if (!titleTime || [titleTime isEqualToString:@""]) {
titleTime = @"";
// titleTime = [NSString stringWithFormat:@"%@s",titleTime];
}else{
titleTime = [NSString stringWithFormat:@"%@s",titleTime];
}
}else if([titleTime intValue] % 60 == 0){
titleTime = [NSString stringWithFormat:@"%dmin",[titleTime intValue] / 60];
}else{
titleTime = [NSString stringWithFormat:@"%dmins %ds",[titleTime intValue] / 60,[titleTime intValue] % 60];
}
[titleTimeArray1 addObject:titleTime];
}
return timeArray;
}
/*
#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
//
// DXRDSmartRec.h
// DJMHomeTY
//
// Created by nana on 2024/3/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DXRDSmartRec : NSObject
@property (nonatomic,strong)NSString *keystr;
@property (nonatomic,strong)NSString *remark;
@property (nonatomic,strong)NSString *keyvalue;
@property (nonatomic,strong)NSString *recID;
@end
NS_ASSUME_NONNULL_END
//
// DXRDSmartRec.m
// DJMHomeTY
//
// Created by nana on 2024/3/27.
//
#import "DXRDSmartRec.h"
@implementation DXRDSmartRec
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
return @{@"recID" : @"id",
};
}
@end
......@@ -6,11 +6,31 @@
//
#import <UIKit/UIKit.h>
#import "ZFPlayer.h"
#import <ZFPlayer/ZFPlayerControlView.h>
#import <ZFPlayer/ZFAVPlayerManager.h>
#import "DXHFXVideoModel.h"
#import "DXRDSmartRec.h"
NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger{
ItemWenduDec,
ItemWenduAdd,
ItemNengLdec,
ItemNebgLadd,
ItemHEstartOrstop,
ItemHEClearTime
}itemHotType;
@interface DXHotElecticView : UIView
@property (nonatomic,strong) ZFPlayerController *playerView;
@property (nonatomic,strong) DXHFXVideoDetailsModel *videoModel;
@property (nonatomic,strong) NSMutableArray <DXRDSmartRec *>*smartRecModelArray;
//模式切换 0.智能推荐 1.自定义
-(void)switchingModeType:(NSInteger)type;
@end
NS_ASSUME_NONNULL_END
......@@ -213,12 +213,12 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
@"imgName":@"DXDr_HFX",
@"tag":@(DR04BtnTag)
},
// @{@"DeviceType":@"Dr.热电仪",
// @"DeviceCode":@"Dr-05",
// @"DeviceId":@"Dr-05",
// @"imgName":@"DXDr_HFX",
// @"tag":@(DR05BtnTag)
// }
@{@"DeviceType":@"Dr.热电仪",
@"DeviceCode":@"Dr-05",
@"DeviceId":@"Dr-05",
@"imgName":@"DXDr_HFX",
@"tag":@(DR05BtnTag)
}
];
self.dataArr = [XHDeviceListModel mj_objectArrayWithKeyValuesArray:arr];
[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