Browse Source

【代码优化】定位权限弹窗修改到地图界面加载

master
公司电脑 6 months ago
parent
commit
bcfd57dca9
  1. 8
      tongxin.xcodeproj/project.pbxproj
  2. 2
      tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme
  3. BIN
      tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate
  4. 1280
      tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  5. 2
      tongxin/AppDelegate.h
  6. 13
      tongxin/AppDelegate.m
  7. 3
      tongxin/VC/HomeMeg/CommonPopView.h
  8. 67
      tongxin/VC/HomeMeg/CommonPopView.m
  9. 20
      tongxin/VC/Login/LoginViewController.m
  10. 77
      tongxin/VC/Login/RegisteredViewController.m
  11. 6
      tongxin/VC/Map/MapViewController.m
  12. 18
      tongxin/VC/More/Set/AboutViewController.m

8
tongxin.xcodeproj/project.pbxproj

@ -7108,7 +7108,7 @@ @@ -7108,7 +7108,7 @@
CODE_SIGN_ENTITLEMENTS = tongxin/tongxin.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.3.9;
CURRENT_PROJECT_VERSION = 1.1.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 8P345JS8F2;
ENABLE_BITCODE = NO;
@ -7162,7 +7162,7 @@ @@ -7162,7 +7162,7 @@
"$(PROJECT_DIR)/sdk/lib/ios",
);
MACH_O_TYPE = mh_execute;
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.1.1;
"OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--generate-entitlement-der";
OTHER_LDFLAGS = (
"$(inherited)",
@ -7226,7 +7226,7 @@ @@ -7226,7 +7226,7 @@
CODE_SIGN_ENTITLEMENTS = tongxin/tongxin.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.3.9;
CURRENT_PROJECT_VERSION = 1.1.1;
DEVELOPMENT_TEAM = 8P345JS8F2;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))";
@ -7273,7 +7273,7 @@ @@ -7273,7 +7273,7 @@
"$(PROJECT_DIR)/tongxin/ThirdPartyLib/ShareSDK/ShareSDK/Support/PlatformSDK/WeChatSDK",
"$(PROJECT_DIR)/sdk/lib/ios",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.1.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-Objc",

2
tongxin.xcodeproj/xcshareddata/xcschemes/yisai-LeKan.xcscheme

@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"

BIN
tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

1280
tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

File diff suppressed because it is too large Load Diff

2
tongxin/AppDelegate.h

@ -83,5 +83,7 @@ @@ -83,5 +83,7 @@
- (void)registerForRemoteNotification;
- (void)showRootViewController;
- (void)upding;
@end

13
tongxin/AppDelegate.m

@ -112,10 +112,21 @@ @@ -112,10 +112,21 @@
// [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
// 并在 info.plist文件里 设置 View controller-based status bar appearance = NO ,APPlication 设置的为准.
NSString *str = [userDefault objectForKey:@"YINSI"];
if (![str isEqualToString:@"YINSI"])
{
AfterDispatch(0.2, ^{
WEAKSELF
CommonPopView *popView = [CommonPopView new];
[popView diyicipopView:^{
// [weakSelf upding];
[userDefault setObject:@"YINSI" forKey:@"YINSI"];
}];
});
}
[User loadFormFile];
[self upding];
// [[UINavigationBar appearance] setBarTintColor:KKWhiteColorColor];

3
tongxin/VC/HomeMeg/CommonPopView.h

@ -39,6 +39,9 @@ typedef void(^okTouch)(void); @@ -39,6 +39,9 @@ typedef void(^okTouch)(void);
/// 举报弹窗
- (void)reportPopView:(NSString *)reportID;
/// 第一次隐私协议
- (void)diyicipopView:(void (^)(void))okTouchBlock;
@end
NS_ASSUME_NONNULL_END

67
tongxin/VC/HomeMeg/CommonPopView.m

@ -409,6 +409,73 @@ @@ -409,6 +409,73 @@
/// 第一次隐私协议
- (void)diyicipopView:(void (^)(void))okTouchBlock;
{
WEAKSELF
UIView *bgView = [UICommon ui_view:CGRectZero backgroundColor:KKWhiteColorColor cornerRadius:12 borderWidth:0 borderColor:KKWhiteColorColor];
self.bgView = bgView;
[self addSubview:bgView];
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self);
make.centerY.equalTo(self);
make.size.mas_equalTo(CGSizeMake(300, 320));
}];
UILabel *titleLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:FontBold_(18) textColor:KKBlack20 text:@"协议与政策" Radius:0];
[bgView addSubview:titleLabel];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(bgView).inset(10);
make.top.equalTo(bgView).offset(24);
}];
NSString *str = @"感谢您信任并使用作业帮手表,在使用作业帮手表之前,请认真阅读《用户服务协议》、《隐私政策》和《儿童隐私政策》的全部内容。以了解用户权利义务和个人信息处理规则。";
NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:str];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineSpacing = 5;
paragraphStyle.alignment = NSTextAlignmentLeft;
[string addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, string.length)];
UILabel *textsLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentLeft font:Font_(16) textColor:KKGrey102 text:@"" Radius:0];
textsLabel.attributedText = string;
[bgView addSubview:textsLabel];
[textsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(bgView).inset(20);
make.top.equalTo(titleLabel.mas_bottom).offset(18);
}];
UIButton *escBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(14) normalColor:KKGrey219 normalText:@"不同意并退出应用" click:^(id x) {
[weakSelf dismiss];
[UIView animateWithDuration:0.5 animations:^{
} completion:^(BOOL finished) {
exit(0);
}];
}];
[bgView addSubview:escBtn];
[escBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(bgView.mas_bottom).inset(20);
make.left.right.equalTo(bgView).inset(30);
make.height.mas_equalTo(40);
}];
UIButton *okBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(16) normalColor:KKWhiteColorColor normalText: @"同意" click:^(id x) {
[weakSelf dismiss];
okTouchBlock();
}];
okBtn.backgroundColor = mainColor;
okBtn.layer.cornerRadius = 24;
okBtn.layer.masksToBounds = YES;
[bgView addSubview:okBtn];
[okBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(escBtn.mas_top).inset(10);
make.right.left.equalTo(bgView).inset(40);
make.height.mas_equalTo(48);
}];
[self showPopView];
}
- (void)showPopView
{
[self showWithAlert:self.bgView];

20
tongxin/VC/Login/LoginViewController.m

@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
//去除配置 可自定义链接样式
lable.linkTextAttributes = @{};
// lable.text = @"点击“注册”即表示你同意《用户服务协议》";
NSString * userAgreement = @"《用户协议》";
NSString * userAgreement = @"《用户服务协议》";
NSString * privacyPolicy = @"《隐私政策》";
NSString * erprivacyPolicy = @"《儿童隐私政策》";
NSString * allStr = [NSString stringWithFormat:@"同意%@、%@和%@",userAgreement,privacyPolicy,erprivacyPolicy];
@ -257,7 +257,19 @@ @@ -257,7 +257,19 @@
//跳转手机页面
if (!self.agreementBtn.selected)
{
[UICommon MessageErrorText:@"同意以下协议才能登录"];
EasyAlertView *alertV = [EasyAlertView alertViewWithTitle:@"同意《用户服务协议》、《隐私政策》和《儿童隐私政策》" subtitle:nil AlertViewType:AlertViewTypeSystemAlert config:nil];
[alertV addAlertItem:^EasyAlertItem *{
return [EasyAlertItem itemWithTitle:@"取消" type:AlertItemTypeSystemCancel callback:^(EasyAlertView *showview, long index) {
}];
}];
[alertV addAlertItem:^EasyAlertItem *{
return [EasyAlertItem itemWithTitle:@"手机号登录" type:AlertItemTypeSystemDefault callback:^(EasyAlertView *showview, long index) {
self.agreementBtn.selected = YES;
[self pushPhoneVCAction:nil];
}];
}];
[alertV showAlertView];
return;
}
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LoginStoryboard" bundle:nil];
@ -347,10 +359,10 @@ @@ -347,10 +359,10 @@
{
WebViewController *vc = [WebViewController new];
vc.url = AccoutXieYiURLStr;
vc.title = @"用户协议";
vc.title = @"用户服务协议";
[self.navigationController pushViewController:vc animated:YES];
return NO;
}
}
else if ([URL.absoluteString containsString:PrivacyPolicyURLStr]) {
WebViewController *vc = [WebViewController new];
vc.url = PrivacyPolicyURLStr;

77
tongxin/VC/Login/RegisteredViewController.m

@ -53,6 +53,8 @@ @@ -53,6 +53,8 @@
@property (nonatomic ,strong) NSString *checkCode;
@property (nonatomic ,weak) UIButton *agreementBtn;
@end
@implementation RegisteredViewController
@ -116,7 +118,8 @@ @@ -116,7 +118,8 @@
// lable.text = @"点击“注册”即表示你同意《用户服务协议》";
NSString * userAgreement = @"《用户服务协议》";
NSString * privacyPolicy = @"《隐私政策》";
NSString * allStr = [NSString stringWithFormat:@"点击注册即表示您同意%@和%@",userAgreement,privacyPolicy];
NSString * erprivacyPolicy = @"《儿童隐私政策》";
NSString * allStr = [NSString stringWithFormat:@"同意%@、%@和%@",userAgreement,privacyPolicy,erprivacyPolicy];
NSMutableAttributedString * attributedStr = [[NSMutableAttributedString alloc] initWithString:allStr];
[attributedStr addAttribute:NSForegroundColorAttributeName value:KKBlack20 range:[allStr rangeOfString:userAgreement]];
@ -125,23 +128,43 @@ @@ -125,23 +128,43 @@
[attributedStr addAttribute:NSForegroundColorAttributeName value:KKBlack20 range:[allStr rangeOfString:privacyPolicy]];
[attributedStr addAttribute:NSLinkAttributeName value:PrivacyPolicyURLStr range:[allStr rangeOfString:privacyPolicy]];
// [attributedStr addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:[allStr rangeOfString:@"点击注册即表示您同意"]];
// [attributedStr addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:[allStr rangeOfString:@"和"]];
[attributedStr addAttribute:NSForegroundColorAttributeName value:KKBlack20 range:[allStr rangeOfString:erprivacyPolicy]];
[attributedStr addAttribute:NSLinkAttributeName value:PrivacyPolicyURLStr_er range:[allStr rangeOfString:erprivacyPolicy]];
[attributedStr addAttribute:NSForegroundColorAttributeName value:RGB(121, 121, 121) range:[allStr rangeOfString:@"同意"]];
[attributedStr addAttribute:NSForegroundColorAttributeName value:RGB(121, 121, 121) range:[allStr rangeOfString:@"、"]];
[attributedStr addAttribute:NSForegroundColorAttributeName value:RGB(121, 121, 121) range:[allStr rangeOfString:@"和"]];
lable.attributedText = attributedStr;
lable.textAlignment = NSTextAlignmentCenter;
lable.font = [UIFont systemFontOfSize:10];
lable.font = Font_(12);
// lable.backgroundColor = mainColor;
CGRect rect = [UICommon GetTextWidth:allStr ViewHeight:30 fontSize:Font_(12) type:@"w"];
[self.view addSubview:lable];
//设置约束
[lable mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view.mas_centerX);
make.centerX.equalTo(self.view.mas_centerX).offset(Adapted(15));
if(ScreenHeight >= 812){
make.bottom.equalTo(self.view.mas_bottom).offset(-25);
}else{
make.bottom.equalTo(self.view.mas_bottom).offset(-20);
}
make.height.offset(30);
make.width.offset(SWIDTH-28);
make.width.offset(rect.size.width+10);
}];
UIButton *agreementBtn = [UICommon ui_buttonSimple:CGRectZero font:FontADA_(0) normalColor:KKWhiteColorColor normalText:@"" click:^(UIButton *btn) {
btn.selected = !btn.selected;
}];
[agreementBtn setImage:ImageName_(@"login_no_the_selected_icon") forState:UIControlStateNormal];
[agreementBtn setImage:ImageName_(@"login_the_selected_icon") forState:UIControlStateSelected];
// agreementBtn.selected = YES;
self.agreementBtn = agreementBtn;
[self.view addSubview:agreementBtn];
[agreementBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(lable.mas_centerY);
make.right.equalTo(lable.mas_left);
make.size.mas_equalTo(CGSizeMake(Adapted(15), Adapted(15)));
}];
[xMyHttp getZYBTokenSuccess:^(id responseObject) {
@ -226,14 +249,33 @@ @@ -226,14 +249,33 @@
[UICommon MessageErrorText:@"密码不一致"];
}else{
}
else if (!self.agreementBtn.selected)
{
EasyAlertView *alertV = [EasyAlertView alertViewWithTitle:@"同意《用户服务协议》、《隐私政策》和《儿童隐私政策》" subtitle:nil AlertViewType:AlertViewTypeSystemAlert config:nil];
[alertV addAlertItem:^EasyAlertItem *{
return [EasyAlertItem itemWithTitle:@"取消" type:AlertItemTypeSystemCancel callback:^(EasyAlertView *showview, long index) {
}];
}];
[alertV addAlertItem:^EasyAlertItem *{
return [EasyAlertItem itemWithTitle:@"注册" type:AlertItemTypeSystemDefault callback:^(EasyAlertView *showview, long index) {
self.agreementBtn.selected = YES;
[self registerAction];
}];
}];
[alertV showAlertView];
return;
}
else
{
//设置国家代码
NSString * code = [UserDefaults valueForKey:kSelectCountryCodeKey];
[self.parameters setValue:code forKey:@"country_code"];
WEAKSELF
[User newUserWithParameters:self.parameters success:^(id responseObject) {
if(weakSelf.successBack){weakSelf.successBack(weakSelf.parameters[@"phone"]);}
if(weakSelf.successBack){weakSelf.successBack(weakSelf.parameters[@"phone"]);}
[UICommon MessageSuccessText:@"注册成功,请登录账号" isImg:YES];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf.navigationController popViewControllerAnimated:YES];
@ -492,25 +534,30 @@ @@ -492,25 +534,30 @@
}
}
//MARK: ========UITextViewDelegate=========
//MARK: UITextViewDelegate
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange {
if ([URL.absoluteString containsString:AccoutXieYiURLStr]) {
xLog(@"跳转到用户协议");
if ([URL.absoluteString containsString:AccoutXieYiURLStr])
{
WebViewController *vc = [WebViewController new];
vc.url = AccoutXieYiURLStr;
vc.title = @"用户服务协议";
[self.navigationController pushViewController:vc animated:YES];
return NO;
} else if ([URL.absoluteString containsString:PrivacyPolicyURLStr]) {
xLog(@"跳转到隐私政策");
}
else if ([URL.absoluteString containsString:PrivacyPolicyURLStr]) {
WebViewController *vc = [WebViewController new];
vc.url = PrivacyPolicyURLStr;
vc.title = @"隐私政策";
[self.navigationController pushViewController:vc animated:YES];
return NO;
}
else if ([URL.absoluteString containsString:PrivacyPolicyURLStr_er]) {
WebViewController *vc = [WebViewController new];
vc.url = PrivacyPolicyURLStr_er;
vc.title = @"儿童隐私政策";
[self.navigationController pushViewController:vc animated:YES];
return NO;
}
return YES;
}

6
tongxin/VC/Map/MapViewController.m

@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
#import "EllipsePageControl.h"
#import "LineStatusViewController.h"
#import "AppDelegate.h"
//默认的定位位置 北京
#define DefineLocate CLLocationCoordinate2DMake(39.9086828351,116.3980865479)
@ -147,6 +149,10 @@ @@ -147,6 +149,10 @@
}
- (void)viewDidLoad {
[super viewDidLoad];
AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
[app upding];
//检查隐私合规
[MAMapView updatePrivacyShow:AMapPrivacyShowStatusDidShow privacyInfo:AMapPrivacyInfoStatusDidContain];
[MAMapView updatePrivacyAgree:AMapPrivacyAgreeStatusDidAgree];

18
tongxin/VC/More/Set/AboutViewController.m

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
-(NSMutableArray *)myDataSource{
if(!_myDataSource){
_myDataSource = [NSMutableArray arrayWithArray:@[@[@"用户协议",@"隐私政策",@"儿童隐私政策",@"意见反馈"]]];
_myDataSource = [NSMutableArray arrayWithArray:@[@[@"用户服务协议",@"隐私政策",@"儿童隐私政策",@"个人信息收集清单",@"第三方共享个人信息清单",@"意见反馈"]]];
}
return _myDataSource;
}
@ -93,7 +93,7 @@ @@ -93,7 +93,7 @@
[[UIApplication sharedApplication] openURL:emailURL];
}
}
else if ([title isEqualToString:@"用户协议"])
else if ([title isEqualToString:@"用户服务协议"])
{
WebViewController *webVC = [WebViewController new];
webVC.title = @"用户服务协议";;
@ -114,6 +114,20 @@ @@ -114,6 +114,20 @@
vc.title = @"儿童隐私政策";
[self.navigationController pushViewController:vc animated:YES];
}
else if ([title isEqualToString:@"个人信息收集清单"])
{
WebViewController *vc = [[WebViewController alloc] init];
vc.url = @"http://4g.watch.ecellsz.com:8080/app/personal_information.html";
vc.title = @"个人信息收集清单";
[self.navigationController pushViewController:vc animated:YES];
}
else if ([title isEqualToString:@"第三方共享个人信息清单"])
{
WebViewController *vc = [[WebViewController alloc] init];
vc.url = @"http://4g.watch.ecellsz.com:8080/app/third_personal_information.html";
vc.title = @"第三方共享个人信息清单";
[self.navigationController pushViewController:vc animated:YES];
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];

Loading…
Cancel
Save