修改应急中心
This commit is contained in:
@@ -82,12 +82,18 @@
|
||||
//#define IntervenH5 @"https://starry.out.icdat.cn"
|
||||
|
||||
//开发环境地址
|
||||
#define Http @"https://xjgateway.mcrm.vip:8888"//
|
||||
#define H5DevHost @"xjgateway.mcrm.vip:8888"//
|
||||
#define IntervenH5 @"https://xjconsole.mcrm.vip:8888"
|
||||
//#define Http @"https://xjgateway.mcrm.vip:8888"//
|
||||
//#define H5DevHost @"xjgateway.mcrm.vip:8888"//
|
||||
//#define IntervenH5 @"https://xjconsole.mcrm.vip:8888"
|
||||
//#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
|
||||
//#define SCHEME @"https" //
|
||||
|
||||
|
||||
#define Http @"http://192.168.1.23"//
|
||||
|
||||
//#define Http @"https://api.xjygjk.com"//
|
||||
#define H5DevHost @"api.xjygjk.com"//
|
||||
#define IntervenH5 @"https://console.xjygjk.com"
|
||||
#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
|
||||
#define SCHEME @"https" //
|
||||
|
||||
|
||||
|
||||
#endif /* StatusMacros_h */
|
||||
|
||||
+4
-1
@@ -217,13 +217,16 @@
|
||||
#pragma mark:网络请求
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
[self.homeTable.mj_footer endRefreshing];
|
||||
[EasyTextView showErrorText:message];
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
[self.homeTable.mj_footer endRefreshing];
|
||||
if ([tag isEqualToString:@"QUSTIONAPI"])
|
||||
{
|
||||
|
||||
|
||||
+4
-4
@@ -56,7 +56,7 @@
|
||||
[centerView addSubview:readButton];
|
||||
|
||||
// cv战士
|
||||
UIButton * monthButton = [[UIButton alloc] initWithFrame:CGRectMake(10, readButton.top - 37 -15, 150, 15)];
|
||||
UIButton * monthButton = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) + 10, readButton.top - 37 -15, 150, 15)];
|
||||
[monthButton setTitle:@" 1个月内不在提醒" forState:UIControlStateNormal];
|
||||
monthButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
||||
[monthButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal];
|
||||
@@ -68,7 +68,7 @@
|
||||
[centerView addSubview:monthButton];
|
||||
|
||||
|
||||
UIButton * dayButton = [[UIButton alloc] initWithFrame:CGRectMake(10, monthButton.top - 13 -15, 150, 15)];
|
||||
UIButton * dayButton = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) + 10, monthButton.top - 13 -15, 150, 15)];
|
||||
[dayButton setTitle:@" 7日内不在提醒" forState:UIControlStateNormal];
|
||||
dayButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
||||
[dayButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal];
|
||||
@@ -81,7 +81,7 @@
|
||||
[centerView addSubview:dayButton];
|
||||
|
||||
|
||||
UIButton * yihouButton = [[UIButton alloc] initWithFrame:CGRectMake(10, dayButton.top - 13 -15, 150, 15)];
|
||||
UIButton * yihouButton = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) + 10, dayButton.top - 13 -15, 150, 15)];
|
||||
[yihouButton setTitle:@" 以后不在提醒" forState:UIControlStateNormal];
|
||||
yihouButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
||||
[yihouButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal];
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
|
||||
|
||||
self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), yihouButton.top - 30)];
|
||||
self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, centerView.width - kRealValue(30), yihouButton.top - 30)];
|
||||
[centerView addSubview:self.mainScrollView];
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -460,10 +460,10 @@
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
//请求超时
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"https://api.cqygjk.com" forKey:@"HTTPS"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"https://xjapi.icdat.cn" forKey:@"HTTPS"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"https://yyjk.cqygjk.com/" forKey:@"BASEURL"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"api.cqygjk.com" forKey:@"IntervenH5"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"https://api.cqygjk.com" forKey:@"H5DevHost"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"xjconsole.icdat.cn/" forKey:@"IntervenH5"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"https://api.xjygjk.com" forKey:@"H5DevHost"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
}];
|
||||
|
||||
+10
-9
@@ -579,19 +579,20 @@
|
||||
}
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"xuzhi_0"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * parmDic = response;
|
||||
if (ValidDict(parmDic)) {
|
||||
self.PictureknowDic = parmDic;
|
||||
}
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"xuzhi_1"]) {
|
||||
if ([tag isEqualToString:@"xuzhi_0"]) { //音视频
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * parmDic = response;
|
||||
if (ValidDict(parmDic)) {
|
||||
self.AudioknowDic = parmDic;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"xuzhi_1"]) { //图文
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * parmDic = response;
|
||||
if (ValidDict(parmDic)) {
|
||||
self.PictureknowDic = parmDic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-5
@@ -96,10 +96,11 @@
|
||||
|
||||
[self.namelabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.doctorImg.mas_right).offset(15);
|
||||
make.top.mas_offset(22);
|
||||
make.top.mas_offset(24);
|
||||
make.height.mas_offset(15);
|
||||
}];
|
||||
[self.namelabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
[self.namelabel.widthAnchor constraintLessThanOrEqualToConstant:175].active = YES;
|
||||
|
||||
|
||||
//类型判断
|
||||
@@ -110,8 +111,8 @@
|
||||
[self.backView addSubview:self.typeView];
|
||||
|
||||
[self.typeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.namelabel.mas_right).offset(10);
|
||||
make.top.mas_offset(20);
|
||||
make.left.mas_equalTo(self.namelabel.mas_right).offset(5);
|
||||
make.top.mas_offset(24);
|
||||
make.height.mas_offset(18);
|
||||
make.width.mas_offset(67);
|
||||
}];
|
||||
@@ -137,7 +138,8 @@
|
||||
[self.questionStatusBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_offset(61);
|
||||
make.height.mas_offset(26);
|
||||
make.right.top.mas_offset(2);
|
||||
make.right.mas_offset(2);
|
||||
make.top.mas_offset(0);
|
||||
}];
|
||||
|
||||
|
||||
@@ -307,7 +309,7 @@
|
||||
[self.hospationLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];
|
||||
}
|
||||
|
||||
self.namelabel.text = [NSString stringWithFormat:@" %@ ",_model.toAccountName];
|
||||
self.namelabel.text = [NSString stringWithFormat:@" %@ ",_model.toAccountName];
|
||||
|
||||
self.hospationLabel.text = [NSString stringWithFormat:@" %@ ",_model.resourceName];
|
||||
|
||||
|
||||
+49
-18
@@ -58,7 +58,7 @@
|
||||
//
|
||||
//@property (strong, nonatomic) NSMutableArray * AedArray;
|
||||
//
|
||||
//@property (strong, nonatomic) NSMutableArray * carArray;
|
||||
@property (strong, nonatomic) NSMutableArray * modelArray;
|
||||
|
||||
@end
|
||||
|
||||
@@ -93,6 +93,16 @@
|
||||
//
|
||||
//}
|
||||
|
||||
- (NSMutableArray *)modelArray {
|
||||
|
||||
if (!_modelArray) {
|
||||
|
||||
_modelArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _modelArray;
|
||||
|
||||
}
|
||||
|
||||
- (NSMutableArray *)titlesArray {
|
||||
|
||||
if (!_titlesArray) {
|
||||
@@ -242,7 +252,7 @@
|
||||
// Do any additional setup after loading the view.
|
||||
self.isHidenNaviBar = false;
|
||||
self.type = @"0";
|
||||
self.selecetIndex = 0;
|
||||
self.selecetIndex = 1;
|
||||
self.navigationItem.title = @"应急就医";
|
||||
self.view.backgroundColor = KWhiteColor;
|
||||
TYNavSheet = [[TYMapNavSheet alloc]init];
|
||||
@@ -310,7 +320,7 @@
|
||||
sosBtn.interval = 5;
|
||||
[grapView addSubview:sosBtn];
|
||||
|
||||
self.titles = @[@"油田医院",@"合作医院",@"健康小屋",@"AED",@"救护车"];
|
||||
self.titles = @[@"油田医院",@"健康小屋",@"AED",@"救护车"];
|
||||
self.titleView.segmentTitles = self.titles;
|
||||
[self.titleView reloadData];
|
||||
|
||||
@@ -506,7 +516,7 @@
|
||||
[parmDic setObject:@(latitude) forKey:@"latitude"];
|
||||
[parmDic setObject:@"0" forKey:@"name"];
|
||||
|
||||
|
||||
// param type 1:油田医院 3:健康小屋 4:aed 5:救护车 不传则全部
|
||||
JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"GroupAPI" NeedToken:@""];
|
||||
[sosApi getSoSCreateGroupChat:parmDic];
|
||||
|
||||
@@ -568,7 +578,23 @@
|
||||
// self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
self.addressView.hidden = true;
|
||||
self.grapView.hidden = false;
|
||||
self.selecetIndex = selectedIndex + 1;
|
||||
if (selectedIndex == 0) {
|
||||
self.selecetIndex = 1;
|
||||
|
||||
}
|
||||
if (selectedIndex == 1) {
|
||||
self.selecetIndex = 3;
|
||||
|
||||
}
|
||||
if (selectedIndex == 2) {
|
||||
self.selecetIndex = 4;
|
||||
|
||||
}
|
||||
if (selectedIndex == 3) {
|
||||
self.selecetIndex = 5;
|
||||
|
||||
}
|
||||
|
||||
[self getResourceDataWithType:[NSString stringWithFormat:@"%ld",self.selecetIndex] Longitude:self.Longitude withLatitude:self.latitude];
|
||||
[self.addressView removeFromSuperview];
|
||||
|
||||
@@ -605,24 +631,29 @@
|
||||
{
|
||||
if ([tag isEqualToString:@"RESOURCES"])
|
||||
{
|
||||
NSDictionary * parmDic = response;
|
||||
|
||||
XJSOSCenterModel * model = [XJSOSCenterModel modelWithDictionary:parmDic];
|
||||
self.model = model;
|
||||
NSArray * responseArray = response;
|
||||
|
||||
NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init];
|
||||
[self.mapView removeAnnotations:self.mapView.annotations];
|
||||
[self.ponisArray removeAllObjects];
|
||||
[self.modelArray removeAllObjects];
|
||||
|
||||
for (NSDictionary * dic in responseArray) {
|
||||
|
||||
XJSOSResourcesModel * model = [XJSOSResourcesModel modelWithDictionary:dic];
|
||||
[self.modelArray addObject:model];
|
||||
|
||||
for (XJSOSResourcesModel * resourceModel in model.resources) {
|
||||
MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init];
|
||||
pointAnnotation.coordinate = CLLocationCoordinate2DMake(resourceModel.latitude, resourceModel.longitude);
|
||||
pointAnnotation.title = resourceModel.name;
|
||||
pointAnnotation.subtitle = resourceModel.address;
|
||||
pointAnnotation.coordinate = CLLocationCoordinate2DMake([model.latitude doubleValue],[model.longitude doubleValue] );
|
||||
pointAnnotation.title = model.name;
|
||||
pointAnnotation.subtitle = model.address;
|
||||
[poiAnnotations addObject:pointAnnotation];
|
||||
|
||||
[self addAnnotationToMapView:pointAnnotation];
|
||||
[self.ponisArray addObject:pointAnnotation];
|
||||
}
|
||||
|
||||
|
||||
if (self.ponisArray.count == 1) {
|
||||
self.mapView.zoomLevel = 11;
|
||||
@@ -631,7 +662,7 @@
|
||||
if (self.ponisArray.count == 0) {
|
||||
self.mapView.showsUserLocation = YES;
|
||||
self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
self.mapView.zoomLevel = 13;
|
||||
self.mapView.zoomLevel = 13;
|
||||
} else {
|
||||
|
||||
UIEdgeInsets insets = UIEdgeInsetsMake(80, 50, 80, 50); // 增加边距让视野更广
|
||||
@@ -729,9 +760,9 @@
|
||||
reuseIdentifier:reuseIndetifier];
|
||||
}
|
||||
|
||||
for (XJSOSResourcesModel * resourceModel in self.model.resources) {
|
||||
for (XJSOSResourcesModel * resourceModel in self.modelArray) {
|
||||
|
||||
if (annotation.coordinate.longitude == resourceModel.longitude && annotation.coordinate.latitude == resourceModel.latitude) {
|
||||
if (annotation.coordinate.longitude == [resourceModel.longitude doubleValue] && annotation.coordinate.latitude == [resourceModel.latitude doubleValue]) {
|
||||
if ([resourceModel.type integerValue]== 1) {
|
||||
annotationView.image = [UIImage imageNamed:@"youtianHosoital"];
|
||||
}
|
||||
@@ -770,10 +801,10 @@
|
||||
self.grapView.hidden = true;
|
||||
|
||||
|
||||
for (XJSOSResourcesModel * resourceModel in self.model.resources) {
|
||||
for (XJSOSResourcesModel * resourceModel in self.modelArray) {
|
||||
|
||||
|
||||
if (view.annotation.coordinate.longitude == resourceModel.longitude && view.annotation.coordinate.latitude == resourceModel.latitude) {
|
||||
if (view.annotation.coordinate.longitude == [ resourceModel.longitude doubleValue] && view.annotation.coordinate.latitude == [resourceModel.latitude doubleValue]) {
|
||||
|
||||
self.addressView.resourceModel = resourceModel;
|
||||
self.resourceModel = resourceModel;
|
||||
@@ -801,7 +832,7 @@
|
||||
|
||||
|
||||
NSMutableDictionary * Dic = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"我的位置",@"startName",self.resourceModel.address,@"endName", nil];
|
||||
[TYNavSheet ShowMapNavSheetSuperView:self withLocationDic:Dic withstartCoor:CLLocationCoordinate2DMake(latitude, longitude) withendCoor:CLLocationCoordinate2DMake(self.resourceModel.latitude, self.resourceModel.longitude)];
|
||||
[TYNavSheet ShowMapNavSheetSuperView:self withLocationDic:Dic withstartCoor:CLLocationCoordinate2DMake(latitude, longitude) withendCoor:CLLocationCoordinate2DMake([self.resourceModel.latitude doubleValue], [self.resourceModel.longitude doubleValue])];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (nonatomic, copy) NSString * province;
|
||||
@property (nonatomic, copy) NSString * gdId;
|
||||
@property (nonatomic, assign) double latitude;
|
||||
@property (nonatomic, copy) NSString * latitude;
|
||||
@property (nonatomic, copy) NSString * city;
|
||||
@property (nonatomic, copy) NSString * name;
|
||||
@property (nonatomic, copy) NSString * type;
|
||||
@property (nonatomic, copy) NSString * level;
|
||||
@property (nonatomic, assign) double longitude;
|
||||
@property (nonatomic, copy) NSString * longitude;
|
||||
@property (nonatomic, copy) NSString * distance;
|
||||
@property (nonatomic, copy) NSString * reaourceID;
|
||||
@property (nonatomic, copy) NSString * address;
|
||||
@@ -42,6 +42,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, copy) NSString * driverName;
|
||||
|
||||
|
||||
@property (nonatomic, copy) NSString * manageName;
|
||||
@property (nonatomic, copy) NSString * loveNum;
|
||||
@property (nonatomic, copy) NSString * orgName;
|
||||
@property (nonatomic, copy) NSString * runTime;
|
||||
@property (nonatomic, copy) NSString * jobNum;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user