Commit 177aeba1 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

guard

parent 088ef717
...@@ -10,9 +10,13 @@ ...@@ -10,9 +10,13 @@
A94EF18C24C696F8009E5BD1 /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A94EF18B24C696F7009E5BD1 /* libWeChatSDK.a */; }; A94EF18C24C696F8009E5BD1 /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A94EF18B24C696F7009E5BD1 /* libWeChatSDK.a */; };
A95A97B024D1132A0035A684 /* ZJGuardCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A95A97AE24D1132A0035A684 /* ZJGuardCell.m */; }; A95A97B024D1132A0035A684 /* ZJGuardCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A95A97AE24D1132A0035A684 /* ZJGuardCell.m */; };
A95A97B124D1132A0035A684 /* ZJGuardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A95A97AF24D1132A0035A684 /* ZJGuardCell.xib */; }; A95A97B124D1132A0035A684 /* ZJGuardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A95A97AF24D1132A0035A684 /* ZJGuardCell.xib */; };
A95A97B424D120F20035A684 /* ZJElectricalRemindVC.m in Sources */ = {isa = PBXBuildFile; fileRef = A95A97B324D120F20035A684 /* ZJElectricalRemindVC.m */; };
A95A97B824D121140035A684 /* ZJCoulometricRemindCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A95A97B624D121140035A684 /* ZJCoulometricRemindCell.m */; };
A95A97B924D121140035A684 /* ZJCoulometricRemindCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A95A97B724D121140035A684 /* ZJCoulometricRemindCell.xib */; };
A95F5C9E248DE272001DB97E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A95F5C9D248DE272001DB97E /* Security.framework */; }; A95F5C9E248DE272001DB97E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A95F5C9D248DE272001DB97E /* Security.framework */; };
A95F5CBE248F2506001DB97E /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A95F5CBD248F2506001DB97E /* CoreTelephony.framework */; }; A95F5CBE248F2506001DB97E /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A95F5CBD248F2506001DB97E /* CoreTelephony.framework */; };
A95F5CC0248F6D25001DB97E /* libc++.1.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A95F5CBF248F6D25001DB97E /* libc++.1.tbd */; }; A95F5CC0248F6D25001DB97E /* libc++.1.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A95F5CBF248F6D25001DB97E /* libc++.1.tbd */; };
A967939A24D14BDA00B6C5FA /* ZJElectricalModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A967939924D14BDA00B6C5FA /* ZJElectricalModel.m */; };
A9764A522490EAC600463B78 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9764A512490EAC600463B78 /* CoreGraphics.framework */; }; A9764A522490EAC600463B78 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9764A512490EAC600463B78 /* CoreGraphics.framework */; };
A9C2B99D24D039B400010EAE /* launch1@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B84424D039B300010EAE /* launch1@3x.png */; }; A9C2B99D24D039B400010EAE /* launch1@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B84424D039B300010EAE /* launch1@3x.png */; };
A9C2B99E24D039B400010EAE /* launch1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B84624D039B300010EAE /* launch1@2x.png */; }; A9C2B99E24D039B400010EAE /* launch1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B84624D039B300010EAE /* launch1@2x.png */; };
...@@ -192,9 +196,16 @@ ...@@ -192,9 +196,16 @@
A95A97AD24D1132A0035A684 /* ZJGuardCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZJGuardCell.h; sourceTree = "<group>"; }; A95A97AD24D1132A0035A684 /* ZJGuardCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZJGuardCell.h; sourceTree = "<group>"; };
A95A97AE24D1132A0035A684 /* ZJGuardCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZJGuardCell.m; sourceTree = "<group>"; }; A95A97AE24D1132A0035A684 /* ZJGuardCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZJGuardCell.m; sourceTree = "<group>"; };
A95A97AF24D1132A0035A684 /* ZJGuardCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZJGuardCell.xib; sourceTree = "<group>"; }; A95A97AF24D1132A0035A684 /* ZJGuardCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZJGuardCell.xib; sourceTree = "<group>"; };
A95A97B224D120F20035A684 /* ZJElectricalRemindVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZJElectricalRemindVC.h; sourceTree = "<group>"; };
A95A97B324D120F20035A684 /* ZJElectricalRemindVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZJElectricalRemindVC.m; sourceTree = "<group>"; };
A95A97B524D121140035A684 /* ZJCoulometricRemindCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZJCoulometricRemindCell.h; sourceTree = "<group>"; };
A95A97B624D121140035A684 /* ZJCoulometricRemindCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZJCoulometricRemindCell.m; sourceTree = "<group>"; };
A95A97B724D121140035A684 /* ZJCoulometricRemindCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZJCoulometricRemindCell.xib; sourceTree = "<group>"; };
A95F5C9D248DE272001DB97E /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; A95F5C9D248DE272001DB97E /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
A95F5CBD248F2506001DB97E /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; A95F5CBD248F2506001DB97E /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
A95F5CBF248F6D25001DB97E /* libc++.1.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.1.tbd"; path = "usr/lib/libc++.1.tbd"; sourceTree = SDKROOT; }; A95F5CBF248F6D25001DB97E /* libc++.1.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.1.tbd"; path = "usr/lib/libc++.1.tbd"; sourceTree = SDKROOT; };
A967939824D14BDA00B6C5FA /* ZJElectricalModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZJElectricalModel.h; sourceTree = "<group>"; };
A967939924D14BDA00B6C5FA /* ZJElectricalModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZJElectricalModel.m; sourceTree = "<group>"; };
A9764A512490EAC600463B78 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; A9764A512490EAC600463B78 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
A9C2B84424D039B300010EAE /* launch1@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "launch1@3x.png"; sourceTree = "<group>"; }; A9C2B84424D039B300010EAE /* launch1@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "launch1@3x.png"; sourceTree = "<group>"; };
A9C2B84524D039B300010EAE /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; A9C2B84524D039B300010EAE /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
...@@ -891,15 +902,15 @@ ...@@ -891,15 +902,15 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A9C2B8CF24D039B400010EAE /* ZJBaseCareViewController.h */, A9C2B8CF24D039B400010EAE /* ZJBaseCareViewController.h */,
A9C2B8D724D039B400010EAE /* ZJBaseCareViewController.m */,
A9C2B8D324D039B400010EAE /* ZJCareStyle2ViewController.h */,
A9C2B8D824D039B400010EAE /* ZJCareStyle2ViewController.m */,
A9C2B8D024D039B400010EAE /* ZJJinJiViewController.h */, A9C2B8D024D039B400010EAE /* ZJJinJiViewController.h */,
A9C2B8D124D039B400010EAE /* ZJXiaoXiViewController.m */, A9C2B8D124D039B400010EAE /* ZJXiaoXiViewController.m */,
A9C2B8D224D039B400010EAE /* ZJCareViewController.m */, A9C2B8D224D039B400010EAE /* ZJCareViewController.m */,
A9C2B8D324D039B400010EAE /* ZJCareStyle2ViewController.h */,
A9C2B8D424D039B400010EAE /* ZJTianJiaViewController.m */, A9C2B8D424D039B400010EAE /* ZJTianJiaViewController.m */,
A9C2B8D524D039B400010EAE /* ZJXiaoXiViewController.h */, A9C2B8D524D039B400010EAE /* ZJXiaoXiViewController.h */,
A9C2B8D624D039B400010EAE /* ZJJinJiViewController.m */, A9C2B8D624D039B400010EAE /* ZJJinJiViewController.m */,
A9C2B8D724D039B400010EAE /* ZJBaseCareViewController.m */,
A9C2B8D824D039B400010EAE /* ZJCareStyle2ViewController.m */,
A9C2B8D924D039B400010EAE /* ZJCareViewController.h */, A9C2B8D924D039B400010EAE /* ZJCareViewController.h */,
A9C2B8DA24D039B400010EAE /* ZJTianJiaViewController.h */, A9C2B8DA24D039B400010EAE /* ZJTianJiaViewController.h */,
); );
...@@ -1268,6 +1279,8 @@ ...@@ -1268,6 +1279,8 @@
children = ( children = (
A9C2BA4D24D0469F00010EAE /* ZJGuardViewController.h */, A9C2BA4D24D0469F00010EAE /* ZJGuardViewController.h */,
A9C2BA4E24D0469F00010EAE /* ZJGuardViewController.m */, A9C2BA4E24D0469F00010EAE /* ZJGuardViewController.m */,
A95A97B224D120F20035A684 /* ZJElectricalRemindVC.h */,
A95A97B324D120F20035A684 /* ZJElectricalRemindVC.m */,
); );
path = Controller; path = Controller;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1275,6 +1288,8 @@ ...@@ -1275,6 +1288,8 @@
A9C2BA4924D042E900010EAE /* Model */ = { A9C2BA4924D042E900010EAE /* Model */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A967939824D14BDA00B6C5FA /* ZJElectricalModel.h */,
A967939924D14BDA00B6C5FA /* ZJElectricalModel.m */,
); );
path = Model; path = Model;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1288,6 +1303,9 @@ ...@@ -1288,6 +1303,9 @@
A95A97AD24D1132A0035A684 /* ZJGuardCell.h */, A95A97AD24D1132A0035A684 /* ZJGuardCell.h */,
A95A97AE24D1132A0035A684 /* ZJGuardCell.m */, A95A97AE24D1132A0035A684 /* ZJGuardCell.m */,
A95A97AF24D1132A0035A684 /* ZJGuardCell.xib */, A95A97AF24D1132A0035A684 /* ZJGuardCell.xib */,
A95A97B524D121140035A684 /* ZJCoulometricRemindCell.h */,
A95A97B624D121140035A684 /* ZJCoulometricRemindCell.m */,
A95A97B724D121140035A684 /* ZJCoulometricRemindCell.xib */,
); );
path = View; path = View;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1368,6 +1386,7 @@ ...@@ -1368,6 +1386,7 @@
A9C2BA1624D039B500010EAE /* ZJLocationAttentionVC.xib in Resources */, A9C2BA1624D039B500010EAE /* ZJLocationAttentionVC.xib in Resources */,
A9C2BA3B24D039B500010EAE /* LaunchScreen.storyboard in Resources */, A9C2BA3B24D039B500010EAE /* LaunchScreen.storyboard in Resources */,
A9C2BA0F24D039B500010EAE /* ZJLocationAttentionFooter.xib in Resources */, A9C2BA0F24D039B500010EAE /* ZJLocationAttentionFooter.xib in Resources */,
A95A97B924D121140035A684 /* ZJCoulometricRemindCell.xib in Resources */,
A9C2B9F724D039B500010EAE /* ZJFriendListTableViewCell.xib in Resources */, A9C2B9F724D039B500010EAE /* ZJFriendListTableViewCell.xib in Resources */,
A9C2BA0C24D039B500010EAE /* Location.storyboard in Resources */, A9C2BA0C24D039B500010EAE /* Location.storyboard in Resources */,
A9C2BA1724D039B500010EAE /* Goods.storyboard in Resources */, A9C2BA1724D039B500010EAE /* Goods.storyboard in Resources */,
...@@ -1489,6 +1508,7 @@ ...@@ -1489,6 +1508,7 @@
A9C2B9BD24D039B500010EAE /* ZJAESCommonCrypto.m in Sources */, A9C2B9BD24D039B500010EAE /* ZJAESCommonCrypto.m in Sources */,
A9C2B9C924D039B500010EAE /* SJButtonSlider.m in Sources */, A9C2B9C924D039B500010EAE /* SJButtonSlider.m in Sources */,
A9C2B9E224D039B500010EAE /* ZJXiaoxiView.m in Sources */, A9C2B9E224D039B500010EAE /* ZJXiaoxiView.m in Sources */,
A95A97B824D121140035A684 /* ZJCoulometricRemindCell.m in Sources */,
A9C2BA0424D039B500010EAE /* ZJEmergencyContactCell.m in Sources */, A9C2BA0424D039B500010EAE /* ZJEmergencyContactCell.m in Sources */,
A9C2B9F224D039B500010EAE /* ZJMapTrackDatePickerView.m in Sources */, A9C2B9F224D039B500010EAE /* ZJMapTrackDatePickerView.m in Sources */,
A9C2BA0E24D039B500010EAE /* ZJLocationAttentionVC.swift in Sources */, A9C2BA0E24D039B500010EAE /* ZJLocationAttentionVC.swift in Sources */,
...@@ -1520,6 +1540,7 @@ ...@@ -1520,6 +1540,7 @@
A9C2B9E624D039B500010EAE /* ZJLocationVC.swift in Sources */, A9C2B9E624D039B500010EAE /* ZJLocationVC.swift in Sources */,
A9C2B9C624D039B500010EAE /* SJLabelSlider.m in Sources */, A9C2B9C624D039B500010EAE /* SJLabelSlider.m in Sources */,
A9C2B9F124D039B500010EAE /* ZJMapCardFriendSelectView.m in Sources */, A9C2B9F124D039B500010EAE /* ZJMapCardFriendSelectView.m in Sources */,
A967939A24D14BDA00B6C5FA /* ZJElectricalModel.m in Sources */,
A9C2BA1224D039B500010EAE /* ZJFriendLocationRemindModel.m in Sources */, A9C2BA1224D039B500010EAE /* ZJFriendLocationRemindModel.m in Sources */,
A9C2B9FD24D039B500010EAE /* ZJIPAProductModel.m in Sources */, A9C2B9FD24D039B500010EAE /* ZJIPAProductModel.m in Sources */,
A9C2B9B824D039B500010EAE /* UITextField+LimitLength.m in Sources */, A9C2B9B824D039B500010EAE /* UITextField+LimitLength.m in Sources */,
...@@ -1536,6 +1557,7 @@ ...@@ -1536,6 +1557,7 @@
A9C2B9C824D039B500010EAE /* SJCommonSlider.m in Sources */, A9C2B9C824D039B500010EAE /* SJCommonSlider.m in Sources */,
A9C2BA0324D039B500010EAE /* ZJMineHeaderView.m in Sources */, A9C2BA0324D039B500010EAE /* ZJMineHeaderView.m in Sources */,
A9C2B9C724D039B500010EAE /* SJSlider.m in Sources */, A9C2B9C724D039B500010EAE /* SJSlider.m in Sources */,
A95A97B424D120F20035A684 /* ZJElectricalRemindVC.m in Sources */,
A9C2BA2E24D039B500010EAE /* BaseViewController.m in Sources */, A9C2BA2E24D039B500010EAE /* BaseViewController.m in Sources */,
A9C2B9C324D039B500010EAE /* Registrable.swift in Sources */, A9C2B9C324D039B500010EAE /* Registrable.swift in Sources */,
A9C2B9F624D039B500010EAE /* ZJMapViewPersonCardView.m in Sources */, A9C2B9F624D039B500010EAE /* ZJMapViewPersonCardView.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "power_item_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "power_btn_shut@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "power_btn_open@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "site_btn_default@3x-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "site_btn_default@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
......
...@@ -474,7 +474,15 @@ ...@@ -474,7 +474,15 @@
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:modelDic options:NSJSONWritingPrettyPrinted error:nil]; NSData *jsonData = [NSJSONSerialization dataWithJSONObject:modelDic options:NSJSONWritingPrettyPrinted error:nil];
NSString * string = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; NSString * string = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
[[TQNetworkTools shared] postWithAction:syncLocationDataLast parameters:@{@"LocationSyncData":string} success:^(id _Nonnull response) { //电量
[UIDevice currentDevice].batteryMonitoringEnabled = YES;
double deviceLevel = [UIDevice currentDevice].batteryLevel;
NSString * power = [NSString stringWithFormat:@"%.f", deviceLevel * 100];
if (deviceLevel < 0){
power = @"100"; //未识别
}
[[TQNetworkTools shared] postWithAction:syncLocationDataLast parameters:@{@"LocationSyncData":string, @"power":power} success:^(id _Nonnull response) {
NSString *result = [[NSString alloc] initWithData:response NSString *result = [[NSString alloc] initWithData:response
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
......
...@@ -438,7 +438,6 @@ ...@@ -438,7 +438,6 @@
}]; }];
} }
#pragma mark tableView delegate #pragma mark tableView delegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.friendDataSource.count; return self.friendDataSource.count;
......
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
_beiJingView.backgroundColor = [UIColor whiteColor]; _beiJingView.backgroundColor = [UIColor whiteColor];
[self addSubview:_beiJingView]; [self addSubview:_beiJingView];
[_beiJingView mas_makeConstraints:^(MASConstraintMaker *make) { [_beiJingView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self).mas_offset(KScaleWidth(139.5) + StatusBarDif); // make.top.equalTo(self).mas_offset(KScaleWidth(139.5) + StatusBarDif);
make.centerX.equalTo(self); make.centerX.equalTo(self);
make.centerY.equalTo(self); make.centerY.equalTo(self);
// make.size.mas_offset(CGSizeMake(KScaleWidth(302), KScaleWidth(361))); make.size.mas_offset(CGSizeMake(KScaleWidth(302), KScaleWidth(361)));
make.width.mas_offset(KScaleWidth(302)); // make.width.mas_offset(KScaleWidth(302));
}]; }];
_beiJingView.layer.cornerRadius = KScaleWidth(10); _beiJingView.layer.cornerRadius = KScaleWidth(10);
_beiJingView.layer.masksToBounds = YES; _beiJingView.layer.masksToBounds = YES;
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
make.top.equalTo(_jieSouButton.mas_bottom).mas_offset(KScaleWidth(17)); make.top.equalTo(_jieSouButton.mas_bottom).mas_offset(KScaleWidth(17));
make.centerX.equalTo(_beiJingView); make.centerX.equalTo(_beiJingView);
make.size.mas_offset(CGSizeMake(KScaleWidth(50.5), KScaleWidth(15))); make.size.mas_offset(CGSizeMake(KScaleWidth(50.5), KScaleWidth(15)));
make.bottom.equalTo(_beiJingView.mas_bottom).mas_offset(KScaleWidth(-20));
}]; }];
[_juJueButton addTarget:self action:@selector(juJueButtonClick) forControlEvents:UIControlEventTouchUpInside]; [_juJueButton addTarget:self action:@selector(juJueButtonClick) forControlEvents:UIControlEventTouchUpInside];
} }
......
//
// ZJElectricalRemindVC.h
// Dolphins
//
// Created by 明津李 on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZJElectricalRemindVC : BaseViewController
@end
NS_ASSUME_NONNULL_END
//
// ZJElectricalRemindVC.m
// Dolphins
//
// Created by 明津李 on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJElectricalRemindVC.h"
#import "ZJUserInfoManager.h"
#import "ZJElectricalModel.h"
#import "ZJCoulometricRemindCell.h"
@interface ZJElectricalRemindVC ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, weak) IBOutlet UITableView * tableView;
@property (nonatomic, weak) IBOutlet UIView * hintView;
@property (nonatomic, strong) NSMutableArray * friendDataSource;
@end
@implementation ZJElectricalRemindVC
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
self.navigationItem.title = @"低电量提醒";
}
- (void)viewDidLoad {
[super viewDidLoad];
[self setupUI];
[self getDataSource];
}
- (void)setupUI{
self.view.backgroundColor = [UIColor whiteColor];
_hintView.hidden = YES;
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.tableFooterView = [UIView new];
[_tableView registerNib:[UINib nibWithNibName:@"ZJCoulometricRemindCell" bundle:nil] forCellReuseIdentifier:@"ZJCoulometricRemindCell"];
}
- (void)getDataSource{
if (![ZJUserInfoManager shared].isLogin) {
//未登录
self.tableView.hidden = self.friendDataSource.count == 0;
self.hintView.hidden = self.friendDataSource.count != 0;
return;
}
_friendDataSource = [[NSMutableArray alloc] init];
[[TQNetworkTools shared] getWithAction:userRemindInfo parameters:@{@"typeId":@"1"} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){
for (NSDictionary * infoDic in response[@"result"][@"data"]) {
ZJElectricalModel * model = [ZJElectricalModel new];
[model setValuesForKeysWithDictionary:infoDic];
[self.friendDataSource addObject:model];
}
self.tableView.hidden = self.friendDataSource.count == 0;
self.hintView.hidden = self.friendDataSource.count != 0;
[self.tableView reloadData];
}else{
[MBProgressHUD showError:[NSString stringWithFormat:@"%@", [response objectForKey:@"msg"]] toView:self.view];
}
} failure:^(NSError * _Nonnull error) {
// [MBProgressHUD showError:[NSString stringWithFormat:@"获取好友列表失败\n%@", error.description] toView:self.view];
}];
}
- (void)settingBtnClick:(UIButton *)sender{
sender.selected = !sender.selected;
ZJElectricalModel * model = self.friendDataSource[sender.tag-0x64];
[[TQNetworkTools shared] postWithAction:userRemindInfoSet parameters:@{@"typeId":@"1", @"status":sender.selected?@"1":@"0", @"friendId":[NSString stringWithFormat:@"%ld", (long)model.friendId], @"id":[NSString stringWithFormat:@"%ld", (long)model.id]} success:^(id _Nonnull response) {
NSString *result = [[NSString alloc] initWithData:response
encoding:NSUTF8StringEncoding];
NSData * data = [result dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary * responseDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
if([[responseDict objectForKey:@"status"] integerValue] == 200){
NSLog(@"success");
}else{
}
} failure:^(NSError * _Nonnull error) {
}];
}
#pragma mark tableView delegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.friendDataSource.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return KScaleWidth(90);
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
ZJCoulometricRemindCell * cell = [tableView dequeueReusableCellWithIdentifier:@"ZJCoulometricRemindCell" forIndexPath:indexPath];
ZJElectricalModel * model = self.friendDataSource[indexPath.row];
cell.phoneLab.text = model.name;
[cell.headerImv sd_setImageWithURL:[NSURL URLWithString:model.headImage]];
cell.settingBtn.tag = 0x64+indexPath.row;
if (model.status == 0) {
cell.remindLab.text = @"未设置提醒";
cell.settingBtn.selected = NO;
}else{
cell.remindLab.text = @"已设置提醒";
cell.settingBtn.selected = YES;
}
[cell.settingBtn addTarget:self action:@selector(settingBtnClick:) forControlEvents:(UIControlEventTouchUpInside)];
cell.backgroundColor = tableView.backgroundColor;
cell.contentView.backgroundColor = tableView.backgroundColor;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
@end
...@@ -9,12 +9,18 @@ ...@@ -9,12 +9,18 @@
#import "ZJGuardViewController.h" #import "ZJGuardViewController.h"
#import "ZJGuardCollectionHeaderView.h" #import "ZJGuardCollectionHeaderView.h"
#import "ZJGuardCell.h" #import "ZJGuardCell.h"
#import "ZJElectricalRemindVC.h"
#import "ZJMapViewController.h"
#import "ZJMapStyle2ViewController.h"
#import "Dolphins-Swift.h"
@interface ZJGuardViewController ()<UICollectionViewDelegate, UICollectionViewDataSource> @interface ZJGuardViewController ()<UICollectionViewDelegate, UICollectionViewDataSource>
@property (nonatomic, strong) UICollectionView * collectView; @property (nonatomic, strong) UICollectionView * collectView;
@property (nonatomic, strong) NSMutableArray * dataSource; @property (nonatomic, strong) NSMutableArray * dataSource;
@property (nonatomic, strong) NSMutableArray * friendDataSource;
@end @end
@implementation ZJGuardViewController @implementation ZJGuardViewController
...@@ -35,6 +41,7 @@ ...@@ -35,6 +41,7 @@
@{@"title":@"添加提醒", @"image":@"remind_cell_Add"}].mutableCopy; @{@"title":@"添加提醒", @"image":@"remind_cell_Add"}].mutableCopy;
[self setUI]; [self setUI];
[self getFriendList];
} }
- (void)setUI{ - (void)setUI{
...@@ -68,16 +75,54 @@ ...@@ -68,16 +75,54 @@
} }
} }
#pragma mark 好友列表
- (void)getFriendList{
if (![ZJUserInfoManager shared].isLogin) {
//未登录
return;
}
self.friendDataSource = [[NSMutableArray alloc] init];
[[TQNetworkTools shared] getWithAction:findFriendList parameters:@{} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){
for (NSDictionary * infoDic in response[@"result"][@"data"]) {
ZJFriendModel * model = [ZJFriendModel new];
[model setValuesForKeysWithDictionary:infoDic];
[self.friendDataSource addObject:model];
}
}else{
[MBProgressHUD showError:[NSString stringWithFormat:@"%@", [response objectForKey:@"msg"]] toView:self.view];
}
} failure:^(NSError * _Nonnull error) {
// [MBProgressHUD showError:[NSString stringWithFormat:@"获取好友列表失败\n%@", error.description] toView:self.view];
}];
}
- (void)headerBtnClick:(UIButton *)sender{ - (void)headerBtnClick:(UIButton *)sender{
switch (sender.tag-0x64) { switch (sender.tag-0x64) {
case 0: case 0:{
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
BOOL map_style2 = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"map_page_style"]] isEqualToString:@"1"];
ZJBaseMapViewController * map = map_style2 ? [[ZJMapStyle2ViewController alloc] init] : [[ZJMapViewController alloc] init];
[self.navigationController pushViewController:map animated:YES];
}
break; break;
case 1: case 1:{
ZJLocationAttentionVC * vc = [ZJLocationAttentionVC new];
[self.navigationController pushViewController:vc animated:YES];
}
break; break;
case 2: case 2:{
ZJElectricalRemindVC * remind = [[UIStoryboard storyboardWithName:@"Guard" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJElectricalRemindVC"];
[self.navigationController pushViewController:remind animated:YES];
}
break; break;
default: default:
break; break;
......
...@@ -8,20 +8,64 @@ ...@@ -8,20 +8,64 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--View Controller--> <!--Electrical RemindVC-->
<scene sceneID="pOX-1j-Bd6"> <scene sceneID="pOX-1j-Bd6">
<objects> <objects>
<viewController id="ndR-PS-Mek" sceneMemberID="viewController"> <viewController storyboardIdentifier="ZJElectricalRemindVC" id="ndR-PS-Mek" customClass="ZJElectricalRemindVC" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="1RJ-Ec-3tn"> <view key="view" contentMode="scaleToFill" id="1RJ-Ec-3tn">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="suk-wV-RSQ">
<rect key="frame" x="0.0" y="44" width="414" height="818"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="o2H-90-Dje">
<rect key="frame" x="0.0" y="44" width="414" height="818"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LocationHint_bg" translatesAutoresizingMaskIntoConstraints="NO" id="vNc-fy-hjW">
<rect key="frame" x="107" y="210" width="200" height="194"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="暂无内容~" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hsk-o5-Yth">
<rect key="frame" x="169" y="420" width="76.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.2274509804" green="0.2274509804" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="Hsk-o5-Yth" firstAttribute="top" secondItem="vNc-fy-hjW" secondAttribute="bottom" constant="16" id="UIu-bd-EJV"/>
<constraint firstItem="Hsk-o5-Yth" firstAttribute="centerX" secondItem="vNc-fy-hjW" secondAttribute="centerX" id="gCZ-2G-deI"/>
<constraint firstItem="vNc-fy-hjW" firstAttribute="centerY" secondItem="o2H-90-Dje" secondAttribute="centerY" multiplier="0.75" id="v35-po-NgV"/>
<constraint firstItem="vNc-fy-hjW" firstAttribute="centerX" secondItem="o2H-90-Dje" secondAttribute="centerX" id="zua-wZ-vr6"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="xMl-qE-nPm" firstAttribute="bottom" secondItem="suk-wV-RSQ" secondAttribute="bottom" id="97C-8R-i6K"/>
<constraint firstItem="o2H-90-Dje" firstAttribute="leading" secondItem="xMl-qE-nPm" secondAttribute="leading" id="CVM-Tp-8HU"/>
<constraint firstItem="xMl-qE-nPm" firstAttribute="trailing" secondItem="o2H-90-Dje" secondAttribute="trailing" id="MnY-X5-DNq"/>
<constraint firstItem="o2H-90-Dje" firstAttribute="top" secondItem="xMl-qE-nPm" secondAttribute="top" id="biG-Pt-6E4"/>
<constraint firstItem="xMl-qE-nPm" firstAttribute="bottom" secondItem="o2H-90-Dje" secondAttribute="bottom" id="cS8-uT-brO"/>
<constraint firstItem="xMl-qE-nPm" firstAttribute="trailing" secondItem="suk-wV-RSQ" secondAttribute="trailing" id="fW1-go-Qe7"/>
<constraint firstItem="suk-wV-RSQ" firstAttribute="leading" secondItem="xMl-qE-nPm" secondAttribute="leading" id="ils-6G-uPO"/>
<constraint firstItem="suk-wV-RSQ" firstAttribute="top" secondItem="xMl-qE-nPm" secondAttribute="top" id="pHe-fo-ABw"/>
</constraints>
<viewLayoutGuide key="safeArea" id="xMl-qE-nPm"/> <viewLayoutGuide key="safeArea" id="xMl-qE-nPm"/>
</view> </view>
<connections>
<outlet property="hintView" destination="o2H-90-Dje" id="XOr-6a-EFs"/>
<outlet property="tableView" destination="suk-wV-RSQ" id="avd-L5-7AA"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ln8-PG-iH1" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="ln8-PG-iH1" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="14" y="106"/> <point key="canvasLocation" x="13.043478260869566" y="105.80357142857143"/>
</scene> </scene>
</scenes> </scenes>
<resources>
<image name="LocationHint_bg" width="200" height="194"/>
</resources>
</document> </document>
//
// ZJElectricalModel.h
// Dolphins
//
// Created by 明津李 on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZJElectricalModel : BaseModel
@property (nonatomic, assign) NSInteger countdownSecond;
@property (nonatomic, assign) NSInteger friendId;
@property (nonatomic, copy) NSString * headImage;
@property (nonatomic, assign) NSInteger id;
@property (nonatomic, copy) NSString * name;
@property (nonatomic, assign) NSInteger status;
@end
NS_ASSUME_NONNULL_END
//
// ZJElectricalModel.m
// Dolphins
//
// Created by 明津李 on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJElectricalModel.h"
@implementation ZJElectricalModel
@end
//
// ZJCoulometricRemindCell.h
// Dolphins
//
// Created by 明津李 on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJCoulometricRemindCell : UITableViewCell
@property (nonatomic, weak) IBOutlet UIImageView * headerImv;
@property (nonatomic, weak) IBOutlet UIButton * settingBtn;
@property (nonatomic, weak) IBOutlet UILabel * phoneLab;
@property (nonatomic, weak) IBOutlet UILabel * remindLab;
@end
NS_ASSUME_NONNULL_END
//
// ZJCoulometricRemindCell.m
// Dolphins
//
// Created by 明津李 on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJCoulometricRemindCell.h"
@implementation ZJCoulometricRemindCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ZJCoulometricRemindCell" rowHeight="106" id="KGk-i7-Jjw" customClass="ZJCoulometricRemindCell">
<rect key="frame" x="0.0" y="0.0" width="556" height="106"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="556" height="106"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="electrical_cell_bg" translatesAutoresizingMaskIntoConstraints="NO" id="1GG-uY-3ti">
<rect key="frame" x="0.0" y="0.0" width="556" height="106"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="map_card_profile" translatesAutoresizingMaskIntoConstraints="NO" id="67G-qU-wa6">
<rect key="frame" x="27" y="22" width="62.5" height="62"/>
<constraints>
<constraint firstAttribute="width" secondItem="67G-qU-wa6" secondAttribute="height" id="ShO-5Y-lhw"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="abD-Hq-EwB">
<rect key="frame" x="103.5" y="42.5" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9aG-fo-gzc">
<rect key="frame" x="450.5" y="46.5" width="28.5" height="13.5"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w3F-eC-0AY">
<rect key="frame" x="489" y="40.5" width="41" height="25"/>
<state key="normal" image="electrical_cell_btn_select"/>
<state key="selected" image="electrical_cell_btn_selected"/>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="w3F-eC-0AY" secondAttribute="trailing" constant="26" id="05p-e3-jVd"/>
<constraint firstItem="1GG-uY-3ti" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="31W-Nt-6zS"/>
<constraint firstItem="67G-qU-wa6" firstAttribute="width" secondItem="H2p-sc-9uM" secondAttribute="width" multiplier="42:375" id="5LI-aL-xWC"/>
<constraint firstAttribute="bottom" secondItem="1GG-uY-3ti" secondAttribute="bottom" id="9Nn-Xo-VfB"/>
<constraint firstItem="w3F-eC-0AY" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Ft1-3k-KSg"/>
<constraint firstItem="w3F-eC-0AY" firstAttribute="leading" secondItem="9aG-fo-gzc" secondAttribute="trailing" constant="10" id="M0K-19-abJ"/>
<constraint firstAttribute="trailing" secondItem="1GG-uY-3ti" secondAttribute="trailing" id="P5d-zx-9oe"/>
<constraint firstItem="abD-Hq-EwB" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Qux-VX-Rz6"/>
<constraint firstItem="1GG-uY-3ti" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="UDR-B7-baI"/>
<constraint firstItem="67G-qU-wa6" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="WeE-A8-CVm"/>
<constraint firstItem="abD-Hq-EwB" firstAttribute="leading" secondItem="67G-qU-wa6" secondAttribute="trailing" constant="14" id="Xy7-Kp-Fcd"/>
<constraint firstItem="9aG-fo-gzc" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="k3Q-aO-AFn"/>
<constraint firstItem="67G-qU-wa6" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="27" id="wWo-YS-YUJ"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="headerImv" destination="67G-qU-wa6" id="ds3-Ud-UBK"/>
<outlet property="phoneLab" destination="abD-Hq-EwB" id="41P-OW-l9G"/>
<outlet property="remindLab" destination="9aG-fo-gzc" id="F0R-IJ-TEE"/>
<outlet property="settingBtn" destination="w3F-eC-0AY" id="mNE-jL-q2s"/>
</connections>
<point key="canvasLocation" x="308.69565217391306" y="95.089285714285708"/>
</tableViewCell>
</objects>
<resources>
<image name="electrical_cell_bg" width="348" height="86"/>
<image name="electrical_cell_btn_select" width="41" height="25"/>
<image name="electrical_cell_btn_selected" width="41" height="25"/>
<image name="map_card_profile" width="20" height="20"/>
</resources>
</document>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</imageView> </imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="I8c-90-fll"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="I8c-90-fll">
<rect key="frame" x="18.5" y="209.5" width="139" height="79"/> <rect key="frame" x="18.5" y="209.5" width="139" height="79"/>
<state key="normal" image="guard_header_btn_2"/> <state key="normal" backgroundImage="guard_header_btn_2"/>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="安全守护" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PSK-2C-NgN"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="安全守护" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PSK-2C-NgN">
<rect key="frame" x="29" y="100" width="61.5" height="18"/> <rect key="frame" x="29" y="100" width="61.5" height="18"/>
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yYb-ck-9YJ"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yYb-ck-9YJ">
<rect key="frame" x="18.5" y="131" width="139" height="78.5"/> <rect key="frame" x="18.5" y="125" width="139" height="78.5"/>
<state key="normal" image="guard_header_btn_0"/> <state key="normal" backgroundImage="guard_header_btn_0"/>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UM7-bv-VyJ"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UM7-bv-VyJ">
<rect key="frame" x="162.5" y="131" width="139" height="78.5"/> <rect key="frame" x="162.5" y="125" width="139" height="78.5"/>
<state key="normal" image="guard_header_btn_1"/> <state key="normal" backgroundImage="guard_header_btn_1"/>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="温馨提醒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ht1-z1-rAt"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="温馨提醒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ht1-z1-rAt">
<rect key="frame" x="30" y="307" width="61.5" height="18"/> <rect key="frame" x="30" y="307" width="61.5" height="18"/>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="I8c-90-fll" firstAttribute="top" secondItem="yYb-ck-9YJ" secondAttribute="bottom" id="396-qc-M7R"/> <constraint firstItem="I8c-90-fll" firstAttribute="top" secondItem="yYb-ck-9YJ" secondAttribute="bottom" constant="6" id="396-qc-M7R"/>
<constraint firstItem="UM7-bv-VyJ" firstAttribute="width" secondItem="yYb-ck-9YJ" secondAttribute="width" id="39D-QI-OEN"/> <constraint firstItem="UM7-bv-VyJ" firstAttribute="width" secondItem="yYb-ck-9YJ" secondAttribute="width" id="39D-QI-OEN"/>
<constraint firstItem="PSK-2C-NgN" firstAttribute="top" secondItem="na1-lw-t87" secondAttribute="top" constant="19" id="3qg-rN-vK1"/> <constraint firstItem="PSK-2C-NgN" firstAttribute="top" secondItem="na1-lw-t87" secondAttribute="top" constant="19" id="3qg-rN-vK1"/>
<constraint firstItem="UM7-bv-VyJ" firstAttribute="height" secondItem="yYb-ck-9YJ" secondAttribute="height" id="5XA-3B-ft3"/> <constraint firstItem="UM7-bv-VyJ" firstAttribute="height" secondItem="yYb-ck-9YJ" secondAttribute="height" id="5XA-3B-ft3"/>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<constraint firstItem="yYb-ck-9YJ" firstAttribute="centerX" secondItem="na1-lw-t87" secondAttribute="centerX" multiplier="0.55" id="Usp-Iz-9hh"/> <constraint firstItem="yYb-ck-9YJ" firstAttribute="centerX" secondItem="na1-lw-t87" secondAttribute="centerX" multiplier="0.55" id="Usp-Iz-9hh"/>
<constraint firstItem="Ht1-z1-rAt" firstAttribute="leading" secondItem="9Gg-ye-v9C" secondAttribute="leading" constant="30" id="Uxd-GC-e3P"/> <constraint firstItem="Ht1-z1-rAt" firstAttribute="leading" secondItem="9Gg-ye-v9C" secondAttribute="leading" constant="30" id="Uxd-GC-e3P"/>
<constraint firstItem="yYb-ck-9YJ" firstAttribute="height" secondItem="na1-lw-t87" secondAttribute="height" multiplier="93:253" id="aR4-qA-EeV"/> <constraint firstItem="yYb-ck-9YJ" firstAttribute="height" secondItem="na1-lw-t87" secondAttribute="height" multiplier="93:253" id="aR4-qA-EeV"/>
<constraint firstItem="yYb-ck-9YJ" firstAttribute="top" secondItem="p2h-ML-hpg" secondAttribute="bottom" constant="6" id="ef4-av-3ik"/> <constraint firstItem="yYb-ck-9YJ" firstAttribute="top" secondItem="p2h-ML-hpg" secondAttribute="bottom" id="ef4-av-3ik"/>
<constraint firstItem="mSJ-CT-Rso" firstAttribute="centerY" secondItem="p2h-ML-hpg" secondAttribute="centerY" multiplier="0.9" id="fNi-ty-hXe"/> <constraint firstItem="mSJ-CT-Rso" firstAttribute="centerY" secondItem="p2h-ML-hpg" secondAttribute="centerY" multiplier="0.9" id="fNi-ty-hXe"/>
<constraint firstItem="na1-lw-t87" firstAttribute="width" secondItem="U6b-Vx-4bR" secondAttribute="width" multiplier="375:395" id="i4h-2h-58D"/> <constraint firstItem="na1-lw-t87" firstAttribute="width" secondItem="U6b-Vx-4bR" secondAttribute="width" multiplier="375:395" id="i4h-2h-58D"/>
<constraint firstItem="9Gg-ye-v9C" firstAttribute="trailing" secondItem="p2h-ML-hpg" secondAttribute="trailing" id="iGD-XC-Hjg"/> <constraint firstItem="9Gg-ye-v9C" firstAttribute="trailing" secondItem="p2h-ML-hpg" secondAttribute="trailing" id="iGD-XC-Hjg"/>
......
...@@ -34,8 +34,10 @@ class ZJLocationAttentionVC: BaseViewController { ...@@ -34,8 +34,10 @@ class ZJLocationAttentionVC: BaseViewController {
self.navigationItem.title = "地点提醒" self.navigationItem.title = "地点提醒"
setUI() setUI()
if currentFriendModel != nil {
self.getSingleFriendLocationRemindList(currentFriendModel) self.getSingleFriendLocationRemindList(currentFriendModel)
} }
}
func setUI() { func setUI() {
...@@ -48,8 +50,21 @@ class ZJLocationAttentionVC: BaseViewController { ...@@ -48,8 +50,21 @@ class ZJLocationAttentionVC: BaseViewController {
headView.frame = CGRect(x: 0, y: 8*KScale_Width, width: headerBgView.frame.size.width, height: 66*KScale_Width); headView.frame = CGRect(x: 0, y: 8*KScale_Width, width: headerBgView.frame.size.width, height: 66*KScale_Width);
headView.button.addTarget(self, action: #selector(choosePerson), for: .touchUpInside) headView.button.addTarget(self, action: #selector(choosePerson), for: .touchUpInside)
headView.phoneLabel.layer.cornerRadius = headView.phoneLabel.frame.size.height/2
headView.phoneLabel.layer.borderColor = headView.desLab.textColor.cgColor;
headView.phoneLabel.layer.borderWidth = 1
headView.phoneLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(choosePerson))) headView.phoneLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(choosePerson)))
headView.phoneLabel.text = currentFriendModel.phoneNo if currentFriendModel != nil {
headView.phoneLabel.text = " "+currentFriendModel.phoneNo
headView.desLab.text = "选择好友"
headView.desLab.font = UIFont.systemFont(ofSize: 13)
headView.desLab.textColor = UIColor.init(red: 102.0/255, green: 102.0/255, blue: 102.0/255, alpha: 1.0);
}else{
headView.phoneLabel.text = " "+"暂无好友"
headView.desLab.text = "去添加"
headView.desLab.font = UIFont.systemFont(ofSize: 17)
headView.desLab.textColor = UIColor.init(red: 96.0/255, green: 149.0/255, blue: 255.0/255, alpha: 1.0);
}
headerBgView.addSubview(headView) headerBgView.addSubview(headView)
headerViewHeight?.constant = headerBgView.frame.maxY headerViewHeight?.constant = headerBgView.frame.maxY
...@@ -60,7 +75,7 @@ class ZJLocationAttentionVC: BaseViewController { ...@@ -60,7 +75,7 @@ class ZJLocationAttentionVC: BaseViewController {
self.locationTableView.delegate = self self.locationTableView.delegate = self
self.locationTableView.dataSource = self self.locationTableView.dataSource = self
maskBgView.isHidden = true maskBgView.isHidden = currentFriendModel == nil true
addLongPres() addLongPres()
} }
...@@ -352,7 +367,7 @@ extension ZJLocationAttentionVC: ZJLocationRemindFriendSelectDelegate { ...@@ -352,7 +367,7 @@ extension ZJLocationAttentionVC: ZJLocationRemindFriendSelectDelegate {
func clickedListView(at indexPath: IndexPath) { func clickedListView(at indexPath: IndexPath) {
print(indexPath) print(indexPath)
let selectModel = headerFriendsDataSource?[indexPath.row] let selectModel = headerFriendsDataSource?[indexPath.row]
headView.phoneLabel.text = selectModel?.phoneNo headView.phoneLabel.text = " "+selectModel!.phoneNo
self.headView.button.transform = CGAffineTransform.identity self.headView.button.transform = CGAffineTransform.identity
currentFriendModel = headerFriendsDataSource![indexPath.row] currentFriendModel = headerFriendsDataSource![indexPath.row]
......
...@@ -12,4 +12,5 @@ class ZJLocationAttentionView: UIView { ...@@ -12,4 +12,5 @@ class ZJLocationAttentionView: UIView {
@IBOutlet weak var phoneLabel: UILabel! @IBOutlet weak var phoneLabel: UILabel!
@IBOutlet weak var button: UIButton! @IBOutlet weak var button: UIButton!
@IBOutlet weak var desLab: UILabel!
} }
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
...@@ -9,34 +9,46 @@ ...@@ -9,34 +9,46 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ZJLocationAttentionView" customModule="ZhiJi" customModuleProvider="target"> <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ZJLocationAttentionView" customModule="海豚守护" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="75"/> <rect key="frame" x="0.0" y="0.0" width="375" height="75"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6eh-gV-0LS"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6eh-gV-0LS">
<rect key="frame" x="0.0" y="0.0" width="375" height="75"/> <rect key="frame" x="0.0" y="0.0" width="375" height="75"/>
<subviews> <subviews>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="13688888888" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GQH-ce-XrU"> <label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" 13688888888" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GQH-ce-XrU">
<rect key="frame" x="16.5" y="27" width="112" height="21"/> <rect key="frame" x="16.5" y="17.5" width="214" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="2WO-4R-uv8"/>
<constraint firstAttribute="width" constant="214" id="Vz9-tW-Pgj"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/> <color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="32I-29-3M6"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="32I-29-3M6">
<rect key="frame" x="133.5" y="26.5" width="22" height="22"/> <rect key="frame" x="200.5" y="26.5" width="22" height="22"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="32I-29-3M6" secondAttribute="height" id="N3m-16-9wW"/> <constraint firstAttribute="width" secondItem="32I-29-3M6" secondAttribute="height" id="N3m-16-9wW"/>
</constraints> </constraints>
<state key="normal" image="more"/> <state key="normal" image="more"/>
</button> </button>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择好友" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LDW-Fw-qQu">
<rect key="frame" x="147" y="29.5" width="53.5" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="GQH-ce-XrU" firstAttribute="leading" secondItem="6eh-gV-0LS" secondAttribute="leading" constant="16.5" id="JJW-bo-TXM"/> <constraint firstItem="GQH-ce-XrU" firstAttribute="leading" secondItem="6eh-gV-0LS" secondAttribute="leading" constant="16.5" id="JJW-bo-TXM"/>
<constraint firstItem="32I-29-3M6" firstAttribute="centerY" secondItem="LDW-Fw-qQu" secondAttribute="centerY" id="Tw8-yd-vw0"/>
<constraint firstItem="32I-29-3M6" firstAttribute="centerY" secondItem="GQH-ce-XrU" secondAttribute="centerY" id="kdK-rm-Mh8"/> <constraint firstItem="32I-29-3M6" firstAttribute="centerY" secondItem="GQH-ce-XrU" secondAttribute="centerY" id="kdK-rm-Mh8"/>
<constraint firstItem="GQH-ce-XrU" firstAttribute="centerY" secondItem="6eh-gV-0LS" secondAttribute="centerY" id="nHT-IZ-h2a"/> <constraint firstItem="GQH-ce-XrU" firstAttribute="centerY" secondItem="6eh-gV-0LS" secondAttribute="centerY" id="nHT-IZ-h2a"/>
<constraint firstItem="32I-29-3M6" firstAttribute="leading" secondItem="GQH-ce-XrU" secondAttribute="trailing" constant="5" id="xy1-dG-wem"/> <constraint firstItem="32I-29-3M6" firstAttribute="trailing" secondItem="GQH-ce-XrU" secondAttribute="trailing" constant="-8" id="xy1-dG-wem"/>
<constraint firstItem="32I-29-3M6" firstAttribute="leading" secondItem="LDW-Fw-qQu" secondAttribute="trailing" id="ySB-VO-hOq"/>
</constraints> </constraints>
</view> </view>
</subviews> </subviews>
...@@ -50,6 +62,7 @@ ...@@ -50,6 +62,7 @@
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections> <connections>
<outlet property="button" destination="32I-29-3M6" id="5Yp-V5-Pc1"/> <outlet property="button" destination="32I-29-3M6" id="5Yp-V5-Pc1"/>
<outlet property="desLab" destination="LDW-Fw-qQu" id="Pe4-iY-U0R"/>
<outlet property="phoneLabel" destination="GQH-ce-XrU" id="dJC-kF-Lmx"/> <outlet property="phoneLabel" destination="GQH-ce-XrU" id="dJC-kF-Lmx"/>
</connections> </connections>
<point key="canvasLocation" x="138.40579710144928" y="116.85267857142857"/> <point key="canvasLocation" x="138.40579710144928" y="116.85267857142857"/>
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
NSDictionary * switchDic = [[data Read] objectForKey:@"switch"]; NSDictionary * switchDic = [[data Read] objectForKey:@"switch"];
BOOL care_style2 = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"home_page_style"]] isEqualToString:@"1"]; BOOL care_style2 = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"home_page_style"]] isEqualToString:@"1"];
BOOL map_style2 = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"map_page_style"]] isEqualToString:@"1"]; // BOOL map_style2 = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"map_page_style"]] isEqualToString:@"1"];
BaseNavigationViewController *homeNav = [self baseNavigationWithTtitle:@"我关心的人" BaseNavigationViewController *homeNav = [self baseNavigationWithTtitle:@"我关心的人"
image:[UIImage imageNamed:@"关心"] image:[UIImage imageNamed:@"关心"]
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
NSDictionary * switchDic = [[data Read] objectForKey:@"switch"]; NSDictionary * switchDic = [[data Read] objectForKey:@"switch"];
BOOL care_style2 = switchDic && [[NSString stringWithFormat:@"%@", [switchDic objectForKey:@"home_page_style"]] isEqualToString:@"1"]; BOOL care_style2 = switchDic && [[NSString stringWithFormat:@"%@", [switchDic objectForKey:@"home_page_style"]] isEqualToString:@"1"];
BOOL map_style2 = switchDic && [[NSString stringWithFormat:@"%@", [switchDic objectForKey:@"map_page_style"]] isEqualToString:@"1"];; // BOOL map_style2 = switchDic && [[NSString stringWithFormat:@"%@", [switchDic objectForKey:@"map_page_style"]] isEqualToString:@"1"];;
NSMutableArray * sub = self.viewControllers.mutableCopy; NSMutableArray * sub = self.viewControllers.mutableCopy;
BOOL replace = false; BOOL replace = false;
...@@ -142,16 +142,16 @@ ...@@ -142,16 +142,16 @@
sub[0] = homeNav; sub[0] = homeNav;
} }
if (map_style2 && ![self.tabBarController.viewControllers[1] isMemberOfClass:[ZJMapStyle2ViewController class]]) { // if (map_style2 && ![self.tabBarController.viewControllers[1] isMemberOfClass:[ZJMapStyle2ViewController class]]) {
replace = YES; // replace = YES;
BaseNavigationViewController *iHospNav = [self baseNavigationWithTtitle:@"" // BaseNavigationViewController *iHospNav = [self baseNavigationWithTtitle:@""
image:nil // image:nil
selectedImage:nil // selectedImage:nil
index:DYTTabBarIndexIHOSP // index:DYTTabBarIndexIHOSP
viewController:map_style2 ? [[ZJMapStyle2ViewController alloc] init] : [[ZJMapViewController alloc] init]]; // viewController:map_style2 ? [[ZJMapStyle2ViewController alloc] init] : [[ZJMapViewController alloc] init]];
//
sub[1] = iHospNav; // sub[1] = iHospNav;
} // }
if (replace) { if (replace) {
self.viewControllers = sub; self.viewControllers = sub;
......
...@@ -23,6 +23,19 @@ ...@@ -23,6 +23,19 @@
@implementation ZJBaseMapViewController @implementation ZJBaseMapViewController
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self getFriendList];
});
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
...@@ -157,25 +170,6 @@ ...@@ -157,25 +170,6 @@
}]; }];
} }
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:true animated:true];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self getFriendList];
});
}
#pragma mark - Action Handlers
- (void)returnAction
{
[self.navigationController popViewControllerAnimated:YES];
}
/** /**
选中cell后回调 选中cell后回调
@param indexPath 返回选中的indexPath @param indexPath 返回选中的indexPath
......
...@@ -44,7 +44,8 @@ typedef enum : NSUInteger { ...@@ -44,7 +44,8 @@ typedef enum : NSUInteger {
userLogout, //用户注销 userLogout, //用户注销
PaymentConfiguration,//支付配置 PaymentConfiguration,//支付配置
payPageData,//支付页面数据 payPageData,//支付页面数据
addFriendHintStyle //用户注销 addFriendHintStyle, //用户注销
userRemindInfo //用户提醒列表信息 typeId = 1 电量
} TQNetwortGetAction; } TQNetwortGetAction;
...@@ -90,6 +91,9 @@ typedef enum : NSUInteger { ...@@ -90,6 +91,9 @@ typedef enum : NSUInteger {
iosIPAVerifyReceipt, iosIPAVerifyReceipt,
logCollection, //埋点 logCollection, //埋点
userRemindInfoSet //上报用户提醒信息
} TQNetwortPostAction; } TQNetwortPostAction;
@interface TQNetworkTools : AFHTTPSessionManager @interface TQNetworkTools : AFHTTPSessionManager
......
...@@ -115,7 +115,7 @@ static TQNetworkTools* _tools = nil; ...@@ -115,7 +115,7 @@ static TQNetworkTools* _tools = nil;
params = [self setRequestParams: parameters token:YES]; params = [self setRequestParams: parameters token:YES];
} }
if (action == syncLocationDataLast || action == addFriendFollowed || action == friendFollowedUpdate) { if (action == syncLocationDataLast || action == addFriendFollowed || action == friendFollowedUpdate || action == userRemindInfoSet) {
//body //body
params = [self setRequestParams: @{} token:YES]; params = [self setRequestParams: @{} token:YES];
NSDictionary * dic = params; NSDictionary * dic = params;
...@@ -325,6 +325,8 @@ static TQNetworkTools* _tools = nil; ...@@ -325,6 +325,8 @@ static TQNetworkTools* _tools = nil;
case payPageData: case payPageData:
case addFriendHintStyle: case addFriendHintStyle:
return @"/app/v1/location/reminder-copywriting"; return @"/app/v1/location/reminder-copywriting";
case userRemindInfo:
return @"/app/v1/location/remind-list";
default: default:
return @""; return @"";
} }
...@@ -395,6 +397,8 @@ static TQNetworkTools* _tools = nil; ...@@ -395,6 +397,8 @@ static TQNetworkTools* _tools = nil;
return @"/app/v1/location/pay/ios-verify-receipt"; return @"/app/v1/location/pay/ios-verify-receipt";
case logCollection: case logCollection:
return @"/logCollection/log/v1/userLogCollection"; return @"/logCollection/log/v1/userLogCollection";
case userRemindInfoSet:
return @"/app/v1/location/remind/remind";
default: default:
return @""; return @"";
} }
......
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
//#if DEBUG //#if DEBUG
// //
//#define ServerReport @"http://report.zhangxinhulian.com" #define ServerReport @"http://report.zhangxinhulian.com"
//#define ServerHost @"https://feedapitest.zhangxinhulian.com" #define ServerHost @"https://feedapitest.zhangxinhulian.com"
//#define ServerHostFeed @"https://feedapitest.zhangxinhulian.com" #define ServerHostFeed @"https://feedapitest.zhangxinhulian.com"
//
//#else //#else
#define ServerReport @"http://report.zhangxinhulian.com" //#define ServerReport @"http://report.zhangxinhulian.com"
#define ServerHost @"https://feedapi.zhangxinhulian.com" //#define ServerHost @"https://feedapi.zhangxinhulian.com"
#define ServerHostFeed @"https://feedapi.zhangxinhulian.com" //#define ServerHostFeed @"https://feedapi.zhangxinhulian.com"
//#endif //#endif
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