Commit 5d0b6124 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent b188cce1
This diff is collapsed.
......@@ -11,7 +11,6 @@
#import "ZJJinJiViewController.h"
#import "ZJBasetableView.h"
#import "ZJXiaoXiViewController.h"
#import "ZJTianJiaViewController.h"
#import "ZhiJi-Swift.h"
#import "UIButton+Category.h"
#import "ZJFriendSettingView.h"
......
......@@ -7,6 +7,7 @@
//
#import "ZJBaseCareViewController.h"
#import "ZJMemberPayViewController.h"
@interface ZJBaseCareViewController() <CLLocationManagerDelegate>{
ZJFriendSettingView * friend;
......@@ -88,7 +89,7 @@
break;
}
} else {
[AlertControllerTool alertControllerWithTitle:@"定位服务未开启,请进入系统[设置]> [隐私] > [定位服务]中打开开关,并允许使用定位服务" message:@"知迹绘制您的轨迹需要您开启定位服务" cancelTitle:@"去设置" cancelBlock:^{
[AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_location_service") message:kLocalizedString(@"alert_location_authority") cancelTitle:kLocalizedString(@"alert_setting") cancelBlock:^{
NSURL * url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
......@@ -101,7 +102,7 @@
}
}
} confirm:@"取消" confirmBlock:^(id s) {
} confirm:kLocalizedString(@"alert_cancel") confirmBlock:^(id s) {
} finishBlock:nil];
}
......@@ -269,9 +270,9 @@
__weak typeof(friend) weakFriend = friend;
friend.removeCallBack = ^(ZJFriendModel * model) {
[AlertControllerTool alertControllerWithTitle:@"提示" message:@"确定要移除该好友?" cancelTitle:@"取消" cancelBlock:^{
[AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_notice") message:@"确定要移除该好友?" cancelTitle:kLocalizedString(@"alert_cancel") cancelBlock:^{
} confirm:@"确认" confirmBlock:^(id s) {
} confirm:kLocalizedString(@"alert_confirm") confirmBlock:^(id s) {
//数据处理
[weakSelf deleteFriend:model];
......@@ -287,7 +288,7 @@
vc.headerFriendsDataSource = [weakSelf.friendDataSource subarrayWithRange:NSMakeRange(1, weakSelf.friendDataSource.count-1)];
vc.LocationCallBlock = ^{
// [weakFriend show];
// weakFriend.addressStr = @"未知";
// weakFriend.addressStr = kLocalizedString(@"alert_unknow");
};
[weakSelf.navigationController pushViewController:vc animated:YES];
};
......@@ -330,7 +331,8 @@
[self.view.window addSubview:alert];
alert.callBack = ^{
ZJZhiFuViewController *zhiFuVC = [[ZJZhiFuViewController alloc] init];
// ZJZhiFuViewController *zhiFuVC = [[ZJZhiFuViewController alloc] init];
ZJMemberPayViewController * zhiFuVC = [[UIStoryboard storyboardWithName:@"Pay" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJMemberPayViewController"];
[self.navigationController pushViewController:zhiFuVC animated:YES];
zhiFuVC.payFinish = ^{
[[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
......
......@@ -8,6 +8,7 @@
#import "ZJCareStyle2ViewController.h"
#import "UITextField+LimitLength.h"
#import "ZJMemberPayViewController.h"
@interface ZJCareStyle2ViewController ()<UITableViewDataSource, UITableViewDelegate>
......@@ -46,12 +47,12 @@
make.size.mas_offset(CGSizeMake(KScaleWidth(10), KScaleWidth(12)));
}];
UIButton * trackBtn = [[UIButton alloc] initWithframe:CGRectMake(0, 0, 144, KScaleWidth(14)) setImage:@"care_style2_table_header_arrow" title:@"我自己的位置轨迹" titleFont:[UIFont systemFontOfSize:KFont(14)] titleColor:kColorWithRGB(34, 34, 34) backgroundColor:[UIColor clearColor] imageLeft:NO interval:KScaleWidth(6) target:self action:@selector(myTrack)];
UIButton * trackBtn = [[UIButton alloc] initWithframe:CGRectMake(0, 0, 188, KScaleWidth(14)) setImage:@"care_style2_table_header_arrow" title:kLocalizedString(@"track_mine") titleFont:[UIFont systemFontOfSize:KFont(14)] titleColor:kColorWithRGB(34, 34, 34) backgroundColor:[UIColor clearColor] imageLeft:NO interval:KScaleWidth(6) target:self action:@selector(myTrack)];
[self.view addSubview:trackBtn];
[trackBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(locationIV.mas_right);
make.centerY.mas_equalTo(self.xiaoXiButton);
make.size.mas_offset(CGSizeMake(144, KScaleWidth(14)));
make.size.mas_offset(CGSizeMake(188, KScaleWidth(14)));
}];
//MemberTabView
......@@ -101,7 +102,7 @@
self.phoneTF = [[UITextField alloc] init];
self.phoneTF.backgroundColor = [UIColor whiteColor];
self.phoneTF.placeholder = @"请输入手机号码";
self.phoneTF.placeholder = kLocalizedString(@"emergency_enter_phone");
self.phoneTF.borderStyle = UITextBorderStyleNone;
self.phoneTF.layer.cornerRadius = KScaleWidth(46)/2;
self.phoneTF.layer.borderWidth = 1;
......@@ -128,32 +129,32 @@
UIView * rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(89), KScaleWidth(46))];
self.addBtn = [[UIButton alloc] initWithFrame:rightView.bounds];
self.addBtn.backgroundColor = kColorWithRGB(82, 139, 255);
[self.addBtn setTitle:@"添加" forState:(UIControlStateNormal)];
[self.addBtn setTitle:@"添加" forState:(UIControlStateSelected)];
[self.addBtn setTitle:kLocalizedString(@"care_add") forState:(UIControlStateNormal)];
[self.addBtn setTitle:kLocalizedString(@"care_add") forState:(UIControlStateSelected)];
self.addBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(17)];
[self.addBtn addTarget:self action:@selector(tipsBtnClick:) forControlEvents:(UIControlEventTouchUpInside)];
[rightView addSubview:self.addBtn];
self.phoneTF.rightView = rightView;
self.phoneTF.rightViewMode = UITextFieldViewModeAlways;
_hintPrefixLab = [[UILabel alloc] init];
_hintPrefixLab.text = @"";
_hintPrefixLab.font = [UIFont systemFontOfSize:KFont(13)];
[_footerView_style2 addSubview:_hintPrefixLab];
[_hintPrefixLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(imageView.mas_bottom).mas_offset(23);
make.width.mas_equalTo(18);
make.left.equalTo(imageView).mas_offset(KScaleWidth(21));
}];
_hintLab = [UILabel labelWithtext:@"" font:[UIFont systemFontOfSize:KFont(13)] textColor:[UIColor colorWithHex:0x333333] alignment:NSTextAlignmentLeft];
_hintLab.numberOfLines = 0;
[_footerView_style2 addSubview:_hintLab];
[_hintLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(_hintPrefixLab);
make.left.equalTo(_hintPrefixLab.mas_right).mas_offset(KScaleWidth(0));
make.right.equalTo(imageView).mas_offset(KScaleWidth(-21));
}];
// _hintPrefixLab = [[UILabel alloc] init];
// _hintPrefixLab.text = @"";
// _hintPrefixLab.font = [UIFont systemFontOfSize:KFont(13)];
// [_footerView_style2 addSubview:_hintPrefixLab];
// [_hintPrefixLab mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(imageView.mas_bottom).mas_offset(23);
// make.width.mas_equalTo(18);
// make.left.equalTo(imageView).mas_offset(KScaleWidth(21));
// }];
//
// _hintLab = [UILabel labelWithtext:@"" font:[UIFont systemFontOfSize:KFont(13)] textColor:[UIColor colorWithHex:0x333333] alignment:NSTextAlignmentLeft];
// _hintLab.numberOfLines = 0;
// [_footerView_style2 addSubview:_hintLab];
// [_hintLab mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(_hintPrefixLab);
// make.left.equalTo(_hintPrefixLab.mas_right).mas_offset(KScaleWidth(0));
// make.right.equalTo(imageView).mas_offset(KScaleWidth(-21));
// }];
}
return _footerView_style2;
......@@ -208,8 +209,8 @@
self.addBtn.backgroundColor = kColorWithRGB(82, 139, 255);
if (phone.length != 11) {
[self.addBtn setTitle:@"添加" forState:0];
[self.addBtn setTitle:@"添加" forState:UIControlStateSelected];
[self.addBtn setTitle:kLocalizedString(@"care_add") forState:0];
[self.addBtn setTitle:kLocalizedString(@"care_add") forState:UIControlStateSelected];
return;
}
......@@ -223,8 +224,8 @@
}
if (![ZJUserInfoManager shared].isLogin || ![ZJUserInfoManager shared].isMember) {
[self.addBtn setTitle:@"立即查看" forState:0];
[self.addBtn setTitle:@"立即查看" forState:UIControlStateSelected];
[self.addBtn setTitle:kLocalizedString(@"care_find_now") forState:0];
[self.addBtn setTitle:kLocalizedString(@"care_find_now") forState:UIControlStateSelected];
self.addBtn.selected = NO;
return;
}
......@@ -247,8 +248,8 @@
}
break;
case 1:
[self.addBtn setTitle:@"添加" forState:0];
[self.addBtn setTitle:@"添加" forState:UIControlStateSelected];
[self.addBtn setTitle:kLocalizedString(@"care_add") forState:0];
[self.addBtn setTitle:kLocalizedString(@"care_add") forState:UIControlStateSelected];
self.addBtn.selected = NO;
break;
case 2:
......@@ -258,8 +259,8 @@
self.addBtn.backgroundColor = kColorWithRGB(221, 221, 221);
break;
case 3:
[self.addBtn setTitle:@"已添加" forState:0];
[self.addBtn setTitle:@"已添加" forState:UIControlStateSelected];
[self.addBtn setTitle:kLocalizedString(@"message_add") forState:0];
[self.addBtn setTitle:kLocalizedString(@"message_add") forState:UIControlStateSelected];
self.addBtn.selected = YES;
self.addBtn.backgroundColor = kColorWithRGB(221, 221, 221);
break;
......@@ -278,14 +279,14 @@
}
} failure:^(NSError * _Nonnull error) {
NSLog(@"失败");
NSLog(@"error");
}];
}
- (void)tipsBtnClick:(UIButton *)sender{
if (self.phoneTF.text.length != 11) {
[MBProgressHUD showMessage:@"请输入11位手机号"];
if (self.phoneTF.text.length == 0) {
[MBProgressHUD showMessage:@"请输入手机号"];
return;
}
......@@ -346,7 +347,8 @@
- (void)updateVIPData{
ZJZhiFuViewController *zhiFuVC = [[ZJZhiFuViewController alloc] init];
// ZJZhiFuViewController *zhiFuVC = [[ZJZhiFuViewController alloc] init];
ZJMemberPayViewController * zhiFuVC = [[UIStoryboard storyboardWithName:@"Pay" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJMemberPayViewController"];
[self.navigationController pushViewController:zhiFuVC animated:YES];
zhiFuVC.payFinish = ^{
......@@ -373,8 +375,7 @@
}
- (void)shareWX{
//invite
[ZJShareManager shareWithType:Share_invite currentVC:self];
}
- (void)myTrack{
......
//
// ZJCareViewController.h
// ZhiJi
//
// Created by Company on 2020/6/3.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJBaseCareViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZJCareViewController : ZJBaseCareViewController
@end
NS_ASSUME_NONNULL_END
//
// ZJCareViewController.m
// ZhiJi
//
// Created by Company on 2020/6/3.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJCareViewController.h"
@interface ZJCareViewController () <UITableViewDataSource, UITableViewDelegate>{
}
@property (nonatomic ,strong) UILabel *guanXinLabel;
//footView上的控件
@property (nonatomic ,strong) UIButton *addGuanXinButton;
@end
@implementation ZJCareViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.friendDataSource = [NSMutableArray new];
ZJFriendModel * model = [ZJFriendModel new];
[self.friendDataSource addObject:model];
}
- (void)updateMySelf:(CLPlacemark *)placemark{
[super updateMySelf:placemark];
ZJFriendModel * model = [self.friendDataSource firstObject];
model.address = [NSString stringWithFormat:@"%@%@%@%@", placemark.locality?:@"", placemark.subLocality?:@"", placemark.thoroughfare?:@"", placemark.subThoroughfare?:@""];
model.lastSyncTime = [self currentDate];
[self.memberTableView reloadData];
}
- (void)setUI{
[super setUI];
self.guanXinLabel = [UILabel labelWithtext:@"我关心的人" font:[UIFont systemFontOfSize:22 weight:UIFontWeightBold] textColor:[UIColor colorWithHex:0x212121] alignment:NSTextAlignmentCenter];
[self.view addSubview:self.guanXinLabel];
[self.guanXinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.xiaoXiButton);
make.left.equalTo(self.view).mas_offset(KScaleWidth(19));
make.height.offset(KScaleWidth(21));
}];
//MemberTabView
self.memberTableView = [[ZJBasetableView alloc] initWithFrame:CGRectZero];
[self.view addSubview:self.memberTableView];
[self.memberTableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.equalTo(self.guanXinLabel.mas_bottom).mas_offset(KScaleWidth(25));
}];
self.memberTableView.rowHeight = KScaleWidth(129+6);
self.memberTableView.dataSource = self;
self.memberTableView.delegate = self;
self.memberTableView.backgroundColor = self.view.backgroundColor;
// 取消cell间分割线
self.memberTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.memberTableView registerClass:[ZJTableViewCell class] forCellReuseIdentifier:ID];
//设置footview
UIView *footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.memberTableView.width, 110)];
footView.backgroundColor = self.view.backgroundColor;
self.memberTableView.tableFooterView = footView;
//addGuanxinButton
self.addGuanXinButton = [[UIButton alloc] init];
[footView addSubview:self.addGuanXinButton];
[self.addGuanXinButton setBackgroundColor:[UIColor colorWithHex:0xFCFCFC]];
[self.addGuanXinButton setImage:[UIImage imageNamed:@"home_care_add_btn"] forState:UIControlStateNormal];
[self.addGuanXinButton addTarget:self action:@selector(addGuanXinButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.addGuanXinButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(footView).mas_offset(KScaleWidth(9));
make.centerX.equalTo(footView);
make.size.mas_offset(CGSizeMake(KScaleWidth(285), KScaleWidth(75)));
}];
UIButton * hintBtn = [[UIButton alloc] initWithframe:CGRectZero setImage:@"安全" title:@"银行级数据加密防护" titleFont:[UIFont systemFontOfSize:KFont(11)] titleColor:kColorWithRGB(135, 135, 135) backgroundColor:[UIColor clearColor] imageLeft:YES interval:KScaleWidth(5) target:nil action:nil];
hintBtn.userInteractionEnabled = NO;
[footView addSubview:hintBtn];
[hintBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.addGuanXinButton.mas_bottom).mas_offset(KScaleWidth(0));
make.centerX.equalTo(footView);
make.size.mas_offset(CGSizeMake(SCREEN_WIDTH, KScaleWidth(14)));
}];
[self.view bringSubviewToFront:self.memberTableView];
}
//添加联系人按钮点击
- (void)addGuanXinButtonClick{
NSLog(@"添加关心的人");
ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init];
[self.navigationController pushViewController:tianJiaVC animated:YES];
}
#pragma mark 好友列表
- (void)getFriendList{
[self.memberTableView reloadData];
if (![ZJUserInfoManager shared].isLogin) {
//未登录
return;
}
[[TQNetworkTools shared] getWithAction:findFriendList parameters:@{} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){
if (self.friendDataSource.count > 1) {
[self.friendDataSource removeObjectsInRange:NSMakeRange(1, self.friendDataSource.count-1)];
}
for (NSDictionary * infoDic in response[@"result"][@"data"]) {
ZJFriendModel * model = [ZJFriendModel new];
[model setValuesForKeysWithDictionary:infoDic];
[self.friendDataSource addObject:model];
}
[self.memberTableView 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];
}];
}
#pragma mark tableView delegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.friendDataSource.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
ZJTableViewCell *tabCell = [tableView dequeueReusableCellWithIdentifier:ID forIndexPath:indexPath];
tabCell.model = self.friendDataSource[indexPath.row];
tabCell.sheZhiButton.hidden = indexPath.row == 0;
__weak typeof(self) weakSelf = self;
//弹窗
tabCell.buttonClick = ^{
if ([ZJUserInfoManager shared].userInfoModel.isMember) {
[weakSelf showFriendSet:self.friendDataSource[indexPath.row]];
}else{
[self showUpgradeLlert];
}
};
tabCell.backgroundColor = tableView.backgroundColor;
tabCell.contentView.backgroundColor = tableView.backgroundColor;
tabCell.selectionStyle = UITableViewCellSelectionStyleNone;
return tabCell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if ([ZJUserInfoManager shared].userInfoModel.isMember || indexPath.row==0) {
ZJFriendTrackMapViewController *trackMapVc = [[ZJFriendTrackMapViewController alloc] init];
trackMapVc.model = self.friendDataSource[indexPath.row];
trackMapVc.isMyTrack = (indexPath.row == 0);
[self.navigationController showViewController:trackMapVc sender:nil];
}else{
[self showUpgradeLlert];
}
}
@end
......@@ -85,12 +85,11 @@
}
- (void)faChuButtonClick{
NSLog(@"发出消息");
[self sendAllEmergencyContact];
}
- (void)tianJiaButtonClick{
NSLog(@"添加联系人");
if (_existEmergency) {
ZJEmergencyContactViewController * emergency = [[ZJEmergencyContactViewController alloc] init];
[self.navigationController pushViewController:emergency animated:YES];
......@@ -118,7 +117,7 @@
- (void)sendAllEmergencyContact{
if (![ZJUserInfoManager shared].isLogin) {
// [MBProgressHUD showMessage:@"请先进行登录"];
ZJOauthLoginConfig * config = [[ZJOauthLoginConfig alloc] initWithCurrentVC:self];
[config loginVerify:^(id _Nonnull model) {
if ([model isKindOfClass:[ZJMineUserInfoModel class]] ) {
......@@ -133,14 +132,14 @@
if([[response objectForKey:@"status"] integerValue] == 200){
[MBProgressHUD show:@"紧急求助发送成功" icon:@"发送成功" view:self.view];
[MBProgressHUD show:kLocalizedString(@"emergency_help_send_success") icon:@"发送成功" view:self.view];
}else{
[MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view];
}
} failure:^(NSError * _Nonnull error) {
// [MBProgressHUD showError:[NSString stringWithFormat:@"紧急求助发送失败\n%@", error.description] toView:self.view];
}];
}
......
//
// ZJTianJiaViewController.h
// ZhiJi
//
// Created by Company on 2020/6/5.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZJTianJiaViewController : ZJBaseViewController
@property (nonatomic, copy) void(^updateFriendListCallBack)(void);
@end
NS_ASSUME_NONNULL_END
......@@ -33,7 +33,7 @@ static NSString *ID = @"xiaoXi";
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = @"消息";
self.navigationItem.title = kLocalizedString(@"message");
self.view.backgroundColor = [UIColor whiteColor];
[self setUI];
......@@ -127,7 +127,7 @@ static NSString *ID = @"xiaoXi";
}
} failure:^(NSError * _Nonnull error) {
[MBProgressHUD showError:@"请稍后再试" toView:self.view];
[MBProgressHUD showError:kLocalizedString(@"alert_later") toView:self.view];
}];
}
......@@ -143,7 +143,7 @@ static NSString *ID = @"xiaoXi";
}
} failure:^(NSError * _Nonnull error) {
[MBProgressHUD showError:@"请稍后再试" toView:self.view];
[MBProgressHUD showError:kLocalizedString(@"alert_later") toView:self.view];
}];
}
......
......@@ -136,7 +136,7 @@
nickTextField.textAlignment = NSTextAlignmentRight;
addressTextField = customViewArr[2];
addressTextField.text = @"去设置";
addressTextField.text = kLocalizedString(@"alert_setting");
addressTextField.delegate = self;
addressTextField.font = [UIFont systemFontOfSize:KFont(14)];
addressTextField.textAlignment = NSTextAlignmentRight;
......@@ -151,7 +151,7 @@
removeBtn = customViewArr[3];
removeBtn.frame = CGRectMake(0, 0, KScaleWidth(70), KScaleWidth(35));
[removeBtn setTitle:@"解除" forState:0];
[removeBtn setTitle:kLocalizedString(@"alert_unfriend") forState:0];
[removeBtn setTitleColor:[UIColor colorWithHex:0x528BFF] forState:0];
[removeBtn.titleLabel setFont:[UIFont systemFontOfSize:KFont(14)]];
[removeBtn setBackgroundColor:[UIColor colorWithHex:0xffffff]];
......@@ -168,7 +168,7 @@
//确认
UIButton * confirmBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(175), KScaleWidth(58))];
[confirmBtn setTitle:@"确认" forState:UIControlStateNormal];
[confirmBtn setTitle:kLocalizedString(@"alert_confirm") forState:UIControlStateNormal];
[confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
confirmBtn.backgroundColor = kColorWithRGB(81, 139, 255);
confirmBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(17)];
......
......@@ -167,7 +167,7 @@
// [_diDianButton setBackgroundColor:[UIColor colorWithHex:0xffffff]];
[_diDianButton setImage:[UIImage imageNamed:@"icon_More"] forState:UIControlStateNormal];
[_diDianButton setTitle:@"去设置" forState:UIControlStateNormal];
[_diDianButton setTitle:kLocalizedString(@"alert_setting") forState:UIControlStateNormal];
[_beiJingView addSubview:_diDianButton];
[_diDianButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(hengXianView3).mas_offset(KScaleWidth(20));
......@@ -200,7 +200,7 @@
//guanXiButton
_guanXiButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_guanXiButton setTitle:@"解除" forState:0];
[_guanXiButton setTitle:kLocalizedString(@"alert_unfriend") forState:0];
[_guanXiButton setTitleColor:[UIColor colorWithHex:0x528BFF] forState:0];
[_guanXiButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(14)]];
[_guanXiButton setBackgroundColor:[UIColor colorWithHex:0xffffff]];
......@@ -231,7 +231,7 @@
//确认Button
_queRenButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_queRenButton setTitle:@"确认" forState:0];
[_queRenButton setTitle:kLocalizedString(@"alert_confirm") forState:0];
[_queRenButton setTitleColor:[UIColor colorWithHex:0xFFFFFF] forState:0];
[_queRenButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(14)]];
[_queRenButton setBackgroundColor:[UIColor colorWithHex:0x528BFF]];
......@@ -257,7 +257,7 @@
}
- (void)queRenButtonClick{
NSLog(@"确认");
NSLog(kLocalizedString(@"alert_confirm"));
}
- (void)xButtonClick{
......
......@@ -136,7 +136,7 @@
self.sheZhiButton.layer.borderWidth = 0.5;
self.sheZhiButton.layer.borderColor = [UIColor colorWithHex:0xCCCCCC].CGColor;
[self.sheZhiButton setTitle:@"设置" forState:UIControlStateNormal];
[self.sheZhiButton setTitle:kLocalizedString(@"setting") forState:UIControlStateNormal];
[imageView addSubview:self.sheZhiButton];
[self.sheZhiButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(imageView).mas_offset(KScaleWidth(32));
......@@ -153,8 +153,8 @@
if (model.id) {
[self.touXiangImageView sd_setImageWithURL:[NSURL URLWithString:model.headImage] placeholderImage:[UIImage imageNamed:@"矢量智能对象(1)"]];
self.nameLabel.text = model.nickname.length!=0 ? model.nickname :model.showName;
self.timeLabel.text = model.lastSyncTime.length!=0 ? model.lastSyncTime :@"未知";
self.weiZhiLabel.text = model.address.length!=0 ? model.address :@"未知";
self.timeLabel.text = model.lastSyncTime.length!=0 ? model.lastSyncTime :kLocalizedString(@"alert_unknow");
self.weiZhiLabel.text = model.address.length!=0 ? model.address :kLocalizedString(@"alert_unknow");
}else{
NSLog(@"%@", [ZJUserInfoManager shared].userInfoModel.headImage);
......
......@@ -64,7 +64,7 @@
}];
//Label
_label = [UILabel labelWithtext:@"暂无紧急联系人" font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter];
_label = [UILabel labelWithtext:kLocalizedString(@"emergency_none_yet") font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter];
[_beiJingView addSubview:_label];
[_label mas_makeConstraints:^(MASConstraintMaker *make) {
......@@ -78,7 +78,7 @@
[_beiJingView addSubview:_addButton];
// [_addButton setImage:[UIImage imageNamed:@"矩形 3"] forState:UIControlStateNormal];
[_addButton setBackgroundImage:[UIImage imageNamed:@"矩形 3"] forState:UIControlStateNormal];
[_addButton setTitle:@"去添加" forState:UIControlStateNormal];
[_addButton setTitle:kLocalizedString(@"emergency_add") forState:UIControlStateNormal];
[_addButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(_label.mas_bottom).mas_offset(KScaleWidth(22));
make.centerX.equalTo(_beiJingView);
......
......@@ -62,8 +62,8 @@
}];
UIButton * cancelBtn = [[UIButton alloc] init];
[cancelBtn setTitle:@"取消" forState:UIControlStateNormal];
[cancelBtn setTitle:@"取消" forState:UIControlStateSelected];
[cancelBtn setTitle:kLocalizedString(@"alert_cancel") forState:UIControlStateNormal];
[cancelBtn setTitle:kLocalizedString(@"alert_cancel") forState:UIControlStateSelected];
[cancelBtn setTitleColor:kColorWithRGB(99, 99, 99) forState:UIControlStateNormal];
[cancelBtn setTitleColor:kColorWithRGB(81, 139, 255) forState:UIControlStateSelected];
cancelBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(14)];
......@@ -77,8 +77,8 @@
}];
UIButton * confirmBtn = [[UIButton alloc] init];
[confirmBtn setTitle:@"确认" forState:UIControlStateNormal];
[confirmBtn setTitle:@"确认" forState:UIControlStateSelected];
[confirmBtn setTitle:kLocalizedString(@"alert_confirm") forState:UIControlStateNormal];
[confirmBtn setTitle:kLocalizedString(@"alert_confirm") forState:UIControlStateSelected];
[confirmBtn setTitleColor:kColorWithRGB(81, 139, 255) forState:UIControlStateNormal];
[confirmBtn setTitleColor:kColorWithRGB(81, 139, 255) forState:UIControlStateSelected];
confirmBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(14)];
......
......@@ -103,7 +103,7 @@
//tongYiButton
self.tongYiButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.tongYiButton setTitle:@"接受" forState:0];
[self.tongYiButton setTitle:kLocalizedString(@"message_confirm") forState:0];
[self.tongYiButton setTitleColor:[UIColor colorWithHex:0x528BFF] forState:0];
[self.tongYiButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(14)]];
[self.tongYiButton setBackgroundColor:[UIColor colorWithHex:0xffffff]];
......@@ -137,7 +137,7 @@
switch ([model.status integerValue]) {
case 1:
[self.tongYiButton setTitle:@"已添加" forState:0];
[self.tongYiButton setTitle:kLocalizedString(@"message_add") forState:0];
[self.tongYiButton setTitleColor:[UIColor colorWithHex:0xAAAAAA] forState:0];
self.tongYiButton.enabled = NO;
self.tongYiButton.layer.borderColor = [UIColor colorWithHex:0xAAAAAA].CGColor;
......@@ -149,7 +149,7 @@
self.tongYiButton.layer.borderColor = [UIColor colorWithHex:0xAAAAAA].CGColor;
break;
case 3:
[self.tongYiButton setTitle:@"接受" forState:0];
[self.tongYiButton setTitle:kLocalizedString(@"message_confirm") forState:0];
[self.tongYiButton setTitleColor:[UIColor colorWithHex:0x528BFF] forState:0];
self.tongYiButton.enabled = YES;
self.tongYiButton.layer.borderColor = [UIColor colorWithHex:0x528BFF].CGColor;
......
......@@ -46,7 +46,7 @@
//tiShiLabel
//提示Label
tiShiLabel = [UILabel labelWithtext:@"提示" font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter];
tiShiLabel = [UILabel labelWithtext:kLocalizedString(@"alert_notice") font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter];
//加粗
tiShiLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:17];
[_beiJingView addSubview:tiShiLabel];
......@@ -80,7 +80,7 @@
}];
// label
NSString *str = @"您接收本邀请,视为您已经充分理解并遵守《用户协议、《隐私协议》内容,同意授权平台按照隐私政策内容合法收集、储存和使用您的个人信息";
NSString *str = kLocalizedString(@"message_receive");
_label = [UILabel labelWithtext:str font:[UIFont systemFontOfSize:KFont(12)] textColor:[UIColor colorWithHex:0x999999] alignment:NSTextAlignmentCenter];
[_beiJingView addSubview:_label];
_label.numberOfLines = 0;
......@@ -113,7 +113,7 @@
//拒绝button
_juJueButton= [[UIButton alloc] init];
[_beiJingView addSubview:_juJueButton];
[_juJueButton setTitle:@"拒绝" forState:UIControlStateNormal];
[_juJueButton setTitle:kLocalizedString(@"alert_decline") forState:UIControlStateNormal];
[_juJueButton setTitleColor:[UIColor colorWithHex:0x528BFF] forState:UIControlStateNormal];
[_juJueButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(_jieSouButton.mas_bottom).mas_offset(KScaleWidth(17));
......@@ -131,7 +131,7 @@
}
- (void)jieSouButtonClick{
NSLog(@"接受");
NSLog(kLocalizedString(@"message_confirm"));
[self xButtonClick];
if(_acceptFriendInviteCallBack){
_acceptFriendInviteCallBack();
......
......@@ -33,7 +33,7 @@
// Do any additional setup after loading the view.
isShow = YES;
self.navigationItem.title = @"选择区域";
self.navigationItem.title = kLocalizedString(@"area");
self.view.backgroundColor = [UIColor whiteColor];
[self setupTableBiew];
......@@ -113,15 +113,15 @@
searchBar.backgroundColor = [UIColor clearColor];
// searchBar.showsCancelButton = NO;
searchBar.tintColor = kColorWithRGB(153, 153, 153);
searchBar.placeholder = @"搜索国家";
searchBar.placeholder = kLocalizedString(@"area_search");
searchBar.showsCancelButton = YES;
// [searchBar setShowsCancelButton:YES animated:YES];
if ([[[UIDevice currentDevice]systemVersion]floatValue] >= 9.0) {
[[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTitle:@"取消"];
[[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTitle:kLocalizedString(@"alert_cancel")];
[[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTitleTextAttributes:@{NSForegroundColorAttributeName : kMassColor} forState:UIControlStateNormal];
}else {
[[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil] setTitle:@"取消"];
[[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil] setTitle:kLocalizedString(@"alert_cancel")];
[[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil] setTitleTextAttributes:@{NSForegroundColorAttributeName : kMassColor} forState:UIControlStateNormal];
}
......@@ -141,7 +141,7 @@
textField.layer.masksToBounds = YES;
//设置默认文字颜色
UIColor *color = [UIColor grayColor];
[textField setAttributedPlaceholder:[[NSAttributedString alloc] initWithString:@"搜索国家" attributes:@{NSForegroundColorAttributeName:color, NSFontAttributeName : [UIFont systemFontOfSize:14]}]];
[textField setAttributedPlaceholder:[[NSAttributedString alloc] initWithString:kLocalizedString(@"area_search") attributes:@{NSForegroundColorAttributeName:color, NSFontAttributeName : [UIFont systemFontOfSize:14]}]];
//修改默认的放大镜图片
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
imageView.backgroundColor = textField.backgroundColor;
......
......@@ -59,7 +59,7 @@
}];
UILabel * quickLoginLab = [[UILabel alloc] init];
quickLoginLab.text = @"手机号快捷登录";
quickLoginLab.text = kLocalizedString(@"login_title");
quickLoginLab.font = [UIFont systemFontOfSize:KFont(28)];
quickLoginLab.textColor = kMassColor;
[self.view addSubview:quickLoginLab];
......@@ -87,7 +87,7 @@
phoneTextfield = [[UITextField alloc] init];
phoneTextfield.delegate = self;
phoneTextfield.text = @"";
phoneTextfield.placeholder = @"请输入手机号码";
phoneTextfield.placeholder = kLocalizedString(@"emergency_enter_phone");
phoneTextfield.font = [UIFont systemFontOfSize:KScaleWidth(17)];
[phoneTextfield limitTextLength:28];
phoneTextfield.keyboardType = UIKeyboardTypeNumberPad;
......@@ -109,7 +109,7 @@
sendBtn = [[UIButton alloc] init];
[sendBtn setTitle:@"发送验证码" forState:UIControlStateNormal];
[sendBtn setTitle:kLocalizedString(@"login_send_code") forState:UIControlStateNormal];
[sendBtn setTitleColor:kColorWithRGB(85, 142, 252) forState:UIControlStateNormal];
sendBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(18)];
[sendBtn addTarget:self action:@selector(sendSmsCode:) forControlEvents:(UIControlEventTouchUpInside)];
......@@ -174,8 +174,8 @@
UIButton * loginBtn = [[UIButton alloc] init];
[loginBtn setBackgroundImage:[UIImage imageNamed:@"login_phone_loginBtn_bg"] forState:(UIControlStateNormal)];
[loginBtn setBackgroundImage:[UIImage imageNamed:@"login_phone_loginBtn_bg"] forState:(UIControlStateSelected)];
[loginBtn setTitle:@"登录" forState:UIControlStateNormal];
[loginBtn setTitle:@"登录" forState:UIControlStateSelected];
[loginBtn setTitle:kLocalizedString(@"login") forState:UIControlStateNormal];
[loginBtn setTitle:kLocalizedString(@"login") forState:UIControlStateSelected];
loginBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(18)];
[loginBtn addTarget:self action:@selector(login) forControlEvents:(UIControlEventTouchUpInside)];
[self.view addSubview:loginBtn];
......@@ -215,7 +215,6 @@
- (void)textFieldChange:(UITextField *)textField{
NSString * str = textField.text;
NSLog(@"%@", str);
NSInteger count = str.length < 4 ? str.length : 4;
for (int x = 0; x < 4; x++) {
UILabel * lab = [self.view viewWithTag:0x64+x];
......@@ -237,7 +236,7 @@
[self removeKeyBoard];
if (phoneTextfield.text.length == 0) {
[MBProgressHUD showMessage:@"请输入手机号码"];
[MBProgressHUD showMessage:kLocalizedString(@"emergency_enter_phone")];
return;
}
if (!isSelect) {
......@@ -286,7 +285,7 @@
- (void)sendSmsCode:(UIButton *)sender{
if (phoneTextfield.text.length == 0) {
[MBProgressHUD showMessage:@"请输入手机号码"];
[MBProgressHUD showMessage:kLocalizedString(@"emergency_enter_phone")];
return;
}
......@@ -333,14 +332,19 @@
- (NSMutableAttributedString *)textView:(BOOL)select{
NSString * clauseStr = @" 已阅读并同意《用户协议》《隐私政策》";
NSString * str1 = kLocalizedString(@"login_read");
NSString * str2 = kLocalizedString(@"setting_service");
NSString * str3 = kLocalizedString(@"setting_privacy");
NSString * clauseStr = [NSString stringWithFormat:@" %@《%@》 《%@》", str1, str2, str3];
// NSString * clauseStr = @" 已阅读并同意《用户协议》《隐私政策》";
NSMutableAttributedString * attStr = [[NSMutableAttributedString alloc] initWithString:clauseStr];
NSMutableParagraphStyle * style = [[NSMutableParagraphStyle alloc] init];
style.lineSpacing = KScaleWidth(6);
[attStr addAttributes:@{NSForegroundColorAttributeName:kColorWithRGB(82, 139, 255), NSLinkAttributeName:@"user://"} range:[clauseStr rangeOfString:@"《用户协议》"]];
[attStr addAttributes:@{NSForegroundColorAttributeName:kColorWithRGB(82, 139, 255), NSLinkAttributeName:@"privacy://"} range:[clauseStr rangeOfString:@"《隐私政策》"]];
[attStr addAttributes:@{NSForegroundColorAttributeName:kColorWithRGB(82, 139, 255), NSLinkAttributeName:@"user://"} range:[clauseStr rangeOfString:str2]];
[attStr addAttributes:@{NSForegroundColorAttributeName:kColorWithRGB(82, 139, 255), NSLinkAttributeName:@"privacy://"} range:[clauseStr rangeOfString:str3]];
UIImage *image = [UIImage imageNamed:isSelect == NO ? @"quick_login_clause_select" : @"quick_login_clause_selected"];
......@@ -375,7 +379,7 @@
textview.textAlignment = NSTextAlignmentCenter;
return NO;
}else if ([URL.scheme isEqualToString:@"user"]){
NSLog(@"用户协议");
NSLog(kLocalizedString(@"setting_service"));
BaseWebViewController * web = [[BaseWebViewController alloc] init];
web.url = [dic objectForKey:@"user"];
......@@ -383,7 +387,7 @@
return NO;
}else if ([URL.scheme isEqualToString:@"privacy"]){
NSLog(@"隐私政策");
NSLog(kLocalizedString(@"setting_privacy"));
BaseWebViewController * web = [[BaseWebViewController alloc] init];
web.url = [dic objectForKey:@"privacy"];
......
......@@ -28,6 +28,4 @@ typedef NS_ENUM(NSUInteger, DYTTabBarIndex) {
@property (nonatomic, assign) BOOL launch;
- (void)updateChildVC;
@end
......@@ -9,8 +9,6 @@
#import "BaseTabBarViewController.h"
#import "ZhiJi-Swift.h"
#import "ZJMineViewController.h"
#import "ZJCareViewController.h"
#import "ZJMapViewController.h"
#import "ZJCareStyle2ViewController.h"
#import "ZJMapStyle2ViewController.h"
#import "Data.h"
......@@ -38,22 +36,6 @@
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
if(_launch){
[self fakeLaunchScreen];
}
}
- (void)fakeLaunchScreen{
self.launchScreen = [[UINib nibWithNibName:@"LaunchScreenPlaceHolderView" bundle:nil] instantiateWithOwner:self options:nil].firstObject;
[self.view addSubview:self.launchScreen];
[self.launchScreen mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self.view);
}];
__weak typeof(self) weakSelf = self;
self.launchScreen.finishCallBack = ^{
[weakSelf updateChildVC];
[weakSelf.launchScreen removeFromSuperview];
};
}
- (void)setTab {
......@@ -73,23 +55,20 @@
Data * data = [[Data alloc] init];
NSDictionary * switchDic = [[data Read] objectForKey:@"switch"];
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"];
BaseNavigationViewController *homeNav = [self baseNavigationWithTtitle:@"我关心的人"
BaseNavigationViewController *homeNav = [self baseNavigationWithTtitle:kLocalizedString(@"tabbar_care")
image:[UIImage imageNamed:@"关心"]
selectedImage:[UIImage imageNamed:@"关心_selected"]
index:DYTTabBarIndexHome
viewController:care_style2 ? [[ZJCareStyle2ViewController alloc] init] : [[ZJCareViewController alloc] init]];
viewController:[[ZJCareStyle2ViewController alloc] init]];
BaseNavigationViewController *iHospNav = [self baseNavigationWithTtitle:@""
image:nil
selectedImage:nil
index:DYTTabBarIndexIHOSP
viewController:map_style2 ? [[ZJMapStyle2ViewController alloc] init] : [[ZJMapViewController alloc] init]];
viewController:[[ZJMapStyle2ViewController alloc] init]];
BaseNavigationViewController *mineNav = [self baseNavigationWithTtitle:@"我的"
BaseNavigationViewController *mineNav = [self baseNavigationWithTtitle:kLocalizedString(@"tabbar_mine")
image:[UIImage imageNamed:@"我的"]
selectedImage:[UIImage imageNamed:@"我的_selected"]
index:DYTTabBarIndexMine
......@@ -114,42 +93,6 @@
}
}
- (void)updateChildVC{
Data * data = [[Data alloc] init];
NSDictionary * switchDic = [[data Read] objectForKey:@"switch"];
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"];;
NSMutableArray * sub = self.tabBarController.viewControllers.mutableCopy;
BOOL replace = false;
if (care_style2 && ![[self.tabBarController.viewControllers firstObject] isMemberOfClass:[ZJCareStyle2ViewController class]]) {
replace = YES;
BaseNavigationViewController *homeNav = [self baseNavigationWithTtitle:@"我关心的人"
image:[UIImage imageNamed:@"关心"]
selectedImage:[UIImage imageNamed:@"关心_selected"]
index:DYTTabBarIndexHome
viewController:care_style2 ? [[ZJCareViewController alloc] init] : [[ZJCareStyle2ViewController alloc] init]];
sub[0] = homeNav;
}
if (map_style2 && ![self.tabBarController.viewControllers[1] isMemberOfClass:[ZJMapStyle2ViewController class]]) {
replace = YES;
BaseNavigationViewController *iHospNav = [self baseNavigationWithTtitle:@""
image:nil
selectedImage:nil
index:DYTTabBarIndexIHOSP
viewController:map_style2 ? [[ZJMapViewController alloc] init] : [[ZJMapStyle2ViewController alloc] init]];
sub[1] = iHospNav;
}
if (replace) {
self.tabBarController.viewControllers = sub;
}
}
- (BaseNavigationViewController *)baseNavigationWithTtitle:(NSString *)title image:(UIImage *)image selectedImage:(UIImage *)seImage index:(NSInteger)index viewController:(BaseViewController *)viewController {
BaseNavigationViewController *vcNav = [[BaseNavigationViewController alloc] initWithRootViewController:viewController];
vcNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:title
......
......@@ -168,8 +168,8 @@
////参数 message为 js 方法 alert(<message>) 中的<message>
- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:message?:@"" preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:([UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:kLocalizedString(@"alert_notice") message:message?:@"" preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:([UIAlertAction actionWithTitle:kLocalizedString(@"alert_confirm") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
completionHandler();
}])];
[self presentViewController:alertController animated:YES completion:nil];
......@@ -180,12 +180,12 @@
//参数 message为 js 方法 confirm(<message>) 中的<message>
- (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL))completionHandler{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:message?:@"" preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:([UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:kLocalizedString(@"alert_notice") message:message?:@"" preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:([UIAlertAction actionWithTitle:kLocalizedString(@"alert_cancel") style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
completionHandler(NO);
}])];
[alertController addAction:([UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[alertController addAction:([UIAlertAction actionWithTitle:kLocalizedString(@"alert_confirm") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
completionHandler(YES);
}])];
......@@ -245,8 +245,7 @@
#pragma mark JSDelegate share
- (void)share{
//share
[ZJShareManager shareWithType:Share_share currentVC:self];
}
@end
//
// ZJTabBarViewController.h
// ZhiJi
//
// Created by Company on 2020/6/3.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJTabBarViewController : UITabBarController
@end
NS_ASSUME_NONNULL_END
//
// ZJTabBarViewController.m
// ZhiJi
//
// Created by Company on 2020/6/3.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJTabBarViewController.h"
#import "ZJNavViewController.h"
#import "ZJCareViewController.h"
#import "ZJMineViewController.h"
#import "ZJMapViewController.h"
#import "ZJUserInfoManager.h"
@interface ZJTabBarViewController ()
@property (nonatomic, strong) ZJMapViewController *mapVC;
@property (nonatomic, strong) UIButton *mapButton;
@end
@implementation ZJTabBarViewController
- (void)viewDidLoad {
[super viewDidLoad];
//定义数组
NSMutableArray * arrM = [NSMutableArray array];
//中间Btn
self.mapVC = [[ZJMapViewController alloc] init];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
self.mapButton = btn;
btn.frame = CGRectMake(0, 0, 76,76);
[btn setImage:[UIImage imageNamed:@"icon"] forState:UIControlStateNormal];
btn.center = self.tabBar.center;
[btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.bottom.equalTo(self.view.mas_bottom).mas_offset(KScaleWidth(-6)-BOTTOM_MARGIN);
make.size.mas_offset(CGSizeMake(KScaleWidth(76), KScaleWidth(76)));
}];
//添加子控制器
[arrM addObject:[self addChildViewControllerWithClassName:@"ZJCareViewController" andTitle:@"我关心的人" andImageName:@"关心"]];
[arrM addObject:self.mapVC];
[arrM addObject:[self addChildViewControllerWithClassName:@"ZJMineViewController" andTitle:@"我的" andImageName:@"我的"]];
//赋值
self.viewControllers = arrM.copy;
}
//加载子控制器
- (UIViewController *) addChildViewControllerWithClassName:(NSString *) className andTitle:(NSString *) title andImageName:(NSString *) imageName
{
//根据了类名 创建对应的类
Class cla = NSClassFromString(className);
//断言
NSAssert([cla isSubclassOfClass:[UIViewController class]], @"这不是控制器的类 %@",className);
//创建控制器
UIViewController * vc = [[cla alloc] init];
//设置标题
vc.title = title;
//设置标签图片
UIImage *image = [UIImage imageNamed:imageName];
image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
vc.tabBarItem.image = image;
//拼接选中图片的名字
NSString * selectedImageName = [NSString stringWithFormat:@"%@_selected",imageName];
UIImage * selectedImage = [UIImage imageNamed:selectedImageName];
//修改图片的渲染模式
selectedImage = [selectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
//设置选中图片
vc.tabBarItem.selectedImage = selectedImage;
//包装成导航控制器
ZJNavViewController * nav = [[ZJNavViewController alloc] initWithRootViewController:vc];
return nav;
}
-(void)setHidesBottomBarWhenPushed:(BOOL)hidesBottomBarWhenPushed{
self.mapButton.hidden = hidesBottomBarWhenPushed;
}
- (void)btnClick{
NSLog(@"显示地图");
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -45,7 +45,7 @@
_bgView.layer.cornerRadius = KScaleWidth(10);
_bgView.layer.masksToBounds = YES;
//提示Label
_biaoTiLabel = [UILabel labelWithtext:@"温馨提示" font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter];
_biaoTiLabel = [UILabel labelWithtext:kLocalizedString(@"alert_notice") font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter];
//加粗
_biaoTiLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:17];
[_bgView addSubview:_biaoTiLabel];
......@@ -83,14 +83,15 @@
_textView = [[UITextView alloc] initWithFrame:CGRectMake(10, 100, 400, 100)];
[_bgView addSubview:_textView];
NSString *text1 = @"阅读完整版";
NSString *text2 = @"《知迹隐私协议》";
NSString *text3 = @"《知迹用户协议》";
NSString *text4 = @"了解全部内容";
NSString *text1 = kLocalizedString(@"alert_read");
NSString *text2 = [NSString stringWithFormat:@"《%@》", kLocalizedString(@"setting_privacy")];
NSString *text3 = kLocalizedString(@"alert_and");
NSString *text4 = [NSString stringWithFormat:@"《%@》", kLocalizedString(@"setting_service")];
NSString *text5 = kLocalizedString(@"alert_learn");
NSMutableAttributedString * attributeStr1 = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@%@和%@%@",text1,text2,text3,text4]];
NSMutableAttributedString * attributeStr1 = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@%@%@%@%@", text1, text2, text3, text4, text5]];
[attributeStr1 addAttribute:NSLinkAttributeName value:@"click1://" range:NSMakeRange(text1.length, text2.length)];
[attributeStr1 addAttribute:NSLinkAttributeName value:@"click2://" range:NSMakeRange(text1.length + text2.length + 1, text3.length)];
[attributeStr1 addAttribute:NSLinkAttributeName value:@"click2://" range:NSMakeRange(text1.length + text2.length + text3.length, text4.length)];
[attributeStr1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, attributeStr1.length)];
......@@ -117,7 +118,7 @@
// 左侧按钮
_lBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_lBtn setTitle:@"不同意" forState:0];
[_lBtn setTitle:kLocalizedString(@"alert_disagree") forState:0];
[_lBtn setTitleColor:[UIColor colorWithHex:0x568EFC] forState:0];
[_lBtn.titleLabel setFont:[UIFont systemFontOfSize:KFont(15)]];
[_lBtn setBackgroundColor:[UIColor colorWithHex:0xffffff]];
......@@ -136,7 +137,7 @@
// 右侧按钮
_rBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_rBtn setTitle:@"同意并继续" forState:0];
[_rBtn setTitle:kLocalizedString(@"alert_agree") forState:0];
[_rBtn setTitleColor:[UIColor colorWithHex:0xffffff] forState:UIControlStateNormal];
[_rBtn.titleLabel setFont:[UIFont systemFontOfSize:KFont(15)]];
[_rBtn setBackgroundColor:[UIColor colorWithHex:0x568EFC]];
......@@ -169,29 +170,18 @@
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange interaction:(UITextItemInteraction)interaction {
if ([[URL scheme] isEqualToString:@"click1"]) {
NSLog(@"做跳转1");
if(self.buttonClick){
self.buttonClick(@1);
}
return NO;
}
if ([[URL scheme] isEqualToString:@"click2"]) {
NSLog(@"做跳转2");
if(self.buttonClick){
self.buttonClick(@2);
}
return NO;
}
}
return YES;
}
@end
......@@ -13,10 +13,10 @@
#import "ZJFriendTrackMapViewController.h"
#import "ZJUserInfoManager.h"
#import "ZJMapCardFriendSelectView.h"
#import "ZJTianJiaViewController.h"
#import "ZJOauthLoginConfig.h"
#import "ZJUpgradeAlertView.h"
#import "ZJZhiFuViewController.h"
#import "ZJMemberPayViewController.h"
NS_ASSUME_NONNULL_BEGIN
......
......@@ -63,7 +63,8 @@
ZJUpgradeAlertView * alert = [[ZJUpgradeAlertView alloc] init];
[self.view.window addSubview:alert];
alert.callBack = ^{
ZJZhiFuViewController *zhiFuVC = [[ZJZhiFuViewController alloc] init];
// ZJMemberPayViewController *zhiFuVC = [[ZJMemberPayViewController alloc] init];
ZJMemberPayViewController * zhiFuVC = [[UIStoryboard storyboardWithName:@"Pay" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJMemberPayViewController"];
[self.navigationController pushViewController:zhiFuVC animated:YES];
zhiFuVC.payFinish = ^{
[[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
......@@ -84,7 +85,7 @@
// 轨迹
weakSelf.cardView.changeFriendActionHandle = ^{
if (weakSelf.friendDataSource.count <= 1) {
[MBProgressHUD showMessage:@"暂无可选好友"];
[MBProgressHUD showMessage:kLocalizedString(@"track_no_friend")];
return;
}
weakSelf.selectView = [[ZJMapCardFriendSelectView alloc] initWithBoundView:weakSelf.cardView.selectFriendButton dataSource: weakSelf.friendDataSource delegate: weakSelf];
......@@ -92,12 +93,6 @@
};
}
//添加关心的人
- (void)addCardFriend {
ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init];
[self.navigationController pushViewController:tianJiaVC animated:YES];
}
#pragma mark 好友列表
- (void)getFriendList{
......
......@@ -46,9 +46,9 @@
self.view.backgroundColor = [UIColor whiteColor];
if ( (self.model.friendUid.length <= 0) || (self.model.friendUid == [ZJUserInfoManager shared].uid)) {
self.navigationItem.title = @"我的轨迹";
self.navigationItem.title = kLocalizedString(@"mine_track");
} else {
self.navigationItem.title = @"TA的轨迹";
self.navigationItem.title = kLocalizedString(@"track_friend");
}
self.locations = [NSMutableArray array];
......@@ -79,11 +79,11 @@
[self.alertView show];
if (self.isMyTrack) {
self.alertView.alertTitle.text = @"您当前时段未收录位置信息";
self.alertView.alertSubtitle.text = @"请查看其它时段或稍等几分钟";
self.alertView.alertTitle.text = kLocalizedString(@"track_mine_timeWithin_no_location");
self.alertView.alertSubtitle.text = kLocalizedString(@"track_friend_check_noData_alert");
} else {
self.alertView.alertTitle.text = @"对方该时间段未收录位置信息";
self.alertView.alertSubtitle.text = @"请确定对方是否授权知迹位置权限";
self.alertView.alertTitle.text = kLocalizedString(@"track_friend_timeWithin_no_location");
self.alertView.alertSubtitle.text = kLocalizedString(@"track_friend_authority_alert");
}
......@@ -93,7 +93,7 @@
if (self.isMyTrack) {
NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
BaseWebViewController * web = [[BaseWebViewController alloc] init];
web.title = @"定位权限设置";
web.title = kLocalizedString(@"mine_location_setting");
web.neverRefreshTitle = YES;
web.url = [dic objectForKey:@"tutorial"];
[self.navigationController pushViewController:web animated:YES];
......@@ -175,8 +175,8 @@
// do nothing
} else if ([CLLocationManager authorizationStatus] ==kCLAuthorizationStatusDenied) {
//定位不能用
[AlertControllerTool alertControllerWithTitle:@"打开定位开关" message:@"定位服务未开启,请进入系统[设置]> [隐私] > [定位服务]中打开开关,并允许使用定位服务" cancelTitle:@"取消" cancelBlock:^{
} confirm:@"去设置" confirmBlock:^(id s) {
[AlertControllerTool alertControllerWithTitle:@"打开定位开关" message:kLocalizedString(@"alert_location_service") cancelTitle:kLocalizedString(@"alert_cancel") cancelBlock:^{
} confirm:kLocalizedString(@"alert_setting") confirmBlock:^(id s) {
NSURL * url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if([[UIApplication sharedApplication] canOpenURL:url]) {
if (@available(iOS 10.0, *)) {
......@@ -397,7 +397,7 @@
NSLog(@"%@", self.locations);
if (_self.locations.count <= 0) {
[_self showAlertView];
// [MBProgressHUD showMessage:@"对方该时间段未收录位置信息"];
// [MBProgressHUD showMessage:kLocalizedString(@"track_friend_timeWithin_no_location")];
return;
}
[_self drawLineAction];
......
......@@ -24,7 +24,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self getHintStyle];
// [self getHintStyle];
}
- (void)setupUI {
......@@ -37,12 +37,12 @@
make.top.mas_equalTo(self.view);
make.left.mas_equalTo(self.view);
make.right.mas_equalTo(self.view);
make.height.mas_offset(StatusBarHeight+KScaleWidth(119));
make.height.mas_offset(StatusBarHeight+KScaleWidth(77));
}];
self.phoneTF = [[UITextField alloc] init];
self.phoneTF.backgroundColor = [UIColor whiteColor];
self.phoneTF.placeholder = @"请输入手机号码";
self.phoneTF.placeholder = kLocalizedString(@"emergency_enter_phone");
self.phoneTF.borderStyle = UITextBorderStyleNone;
self.phoneTF.layer.cornerRadius = KScaleWidth(46)/2;
self.phoneTF.layer.borderWidth = 1;
......@@ -83,25 +83,25 @@
self.phoneTF.rightView = rightView;
self.phoneTF.rightViewMode = UITextFieldViewModeAlways;
_hintPrefixLab = [[UILabel alloc] init];
_hintPrefixLab.text = @"";
_hintPrefixLab.font = [UIFont systemFontOfSize:KFont(13)];
_hintPrefixLab.textColor = [UIColor whiteColor];
[self.style2BgImV addSubview:_hintPrefixLab];
[_hintPrefixLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(_phoneTF.mas_bottom).mas_offset(10);
make.left.equalTo(_phoneTF).mas_offset(-KScaleWidth(6));
make.width.mas_equalTo(24);
}];
_hintLab = [UILabel labelWithtext:@"" font:[UIFont systemFontOfSize:KFont(13)] textColor:[UIColor whiteColor] alignment:NSTextAlignmentLeft];
_hintLab.numberOfLines = 0;
[self.style2BgImV addSubview:_hintLab];
[_hintLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(_hintPrefixLab);
make.left.equalTo(_hintPrefixLab.mas_right).mas_offset(KScaleWidth(0));
make.right.equalTo(_phoneTF).mas_offset(KScaleWidth(6));
}];
// _hintPrefixLab = [[UILabel alloc] init];
// _hintPrefixLab.text = @"";
// _hintPrefixLab.font = [UIFont systemFontOfSize:KFont(13)];
// _hintPrefixLab.textColor = [UIColor whiteColor];
// [self.style2BgImV addSubview:_hintPrefixLab];
// [_hintPrefixLab mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(_phoneTF.mas_bottom).mas_offset(10);
// make.left.equalTo(_phoneTF).mas_offset(-KScaleWidth(6));
// make.width.mas_equalTo(24);
// }];
//
// _hintLab = [UILabel labelWithtext:@"" font:[UIFont systemFontOfSize:KFont(13)] textColor:[UIColor whiteColor] alignment:NSTextAlignmentLeft];
// _hintLab.numberOfLines = 0;
// [self.style2BgImV addSubview:_hintLab];
// [_hintLab mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(_hintPrefixLab);
// make.left.equalTo(_hintPrefixLab.mas_right).mas_offset(KScaleWidth(0));
// make.right.equalTo(_phoneTF).mas_offset(KScaleWidth(6));
// }];
}
- (void)changedTextField:(UITextField *)textField{
......@@ -128,8 +128,8 @@
}
if (![ZJUserInfoManager shared].isLogin || ![ZJUserInfoManager shared].isMember) {
[self.addBtn setTitle:@"立即查看" forState:0];
[self.addBtn setTitle:@"立即查看" forState:UIControlStateSelected];
[self.addBtn setTitle:kLocalizedString(@"care_find_now") forState:0];
[self.addBtn setTitle:kLocalizedString(@"care_find_now") forState:UIControlStateSelected];
self.addBtn.selected = NO;
return;
}
......@@ -162,8 +162,8 @@
self.addBtn.selected = YES;
break;
case 3:
[self.addBtn setTitle:@"已添加" forState:0];
[self.addBtn setTitle:@"已添加" forState:UIControlStateSelected];
[self.addBtn setTitle:kLocalizedString(@"message_add") forState:0];
[self.addBtn setTitle:kLocalizedString(@"message_add") forState:UIControlStateSelected];
self.addBtn.selected = YES;
break;
......@@ -246,7 +246,8 @@
- (void)updateVIPData{
ZJZhiFuViewController *zhiFuVC = [[ZJZhiFuViewController alloc] init];
// ZJMemberPayViewController *zhiFuVC = [[ZJMemberPayViewController alloc] init];
ZJMemberPayViewController * zhiFuVC = [[UIStoryboard storyboardWithName:@"Pay" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJMemberPayViewController"];
[self.navigationController pushViewController:zhiFuVC animated:YES];
zhiFuVC.payFinish = ^{
......@@ -272,8 +273,7 @@
}
- (void)shareWX{
//invite
[ZJShareManager shareWithType:Share_invite currentVC:self];
}
#pragma mark 获取bottomHintView样式
......
//
// ZJMapViewController.h
// ZhiJi
//
// Created by Mazy on 2020/6/8.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJBaseMapViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZJMapViewController : ZJBaseMapViewController
@end
NS_ASSUME_NONNULL_END
//
// ZJMapViewController.m
// ZhiJi
//
// Created by Mazy on 2020/6/8.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJMapViewController.h"
@interface ZJMapViewController ()
@end
@implementation ZJMapViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)setupUI {
[super setupUI];
self.addCareButton = [UIButton buttonWithType: UIButtonTypeSystem];
[self.addCareButton setBackgroundImage: [UIImage imageNamed: @"map_add_care_people_btn_bg"] forState: UIControlStateNormal];
[self.addCareButton addTarget:self action:@selector(addCardFriend) forControlEvents:UIControlEventTouchUpInside];
self.addCareButton.contentMode = UIViewContentModeCenter;
self.addCareButton.imageView.contentMode = UIViewContentModeCenter;
[self.view addSubview:self.addCareButton];
[self.addCareButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.top.equalTo(@(kStatusBarHeight));
make.size.mas_offset(CGSizeMake(275, 73));
}];
}
//添加关心的人
- (void)addCardFriend {
ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init];
[self.navigationController pushViewController:tianJiaVC animated:YES];
}
@end
......@@ -18,6 +18,7 @@
- (void)awakeFromNib {
[super awakeFromNib];
[_selectFriendButton setTitle:kLocalizedString(@"care_find_others") forState:(UIControlStateNormal)];
}
- (void)configWithFriendModel: (ZJFriendModel *)model {
......
......@@ -41,7 +41,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = @"紧急联系人";
self.navigationItem.title = kLocalizedString(@"mine_emergenry_contacts");
[self setUI];
}
......@@ -121,7 +121,7 @@
}];
UILabel * hintLab = [[UILabel alloc] init];
hintLab.text = @"您还没有添加紧急联系人哦~";
hintLab.text = kLocalizedString(@"emergency_none");
hintLab.textColor = kColorWithRGB(153, 153, 153);
hintLab.font = [UIFont systemFontOfSize:KFont(17)];
hintLab.textAlignment = NSTextAlignmentCenter;
......@@ -133,7 +133,7 @@
}];
UIButton * addBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(125), KScaleWidth(42))];
[addBtn setTitle:@"去添加" forState:UIControlStateNormal];
[addBtn setTitle:kLocalizedString(@"emergency_add") forState:UIControlStateNormal];
[addBtn setTitleColor:kColorWithRGB(85, 142, 252) forState:UIControlStateNormal];
addBtn.layer.cornerRadius = addBtn.frame.size.height/2;
addBtn.layer.borderWidth = 1.f;
......@@ -152,9 +152,9 @@
- (void)deletePerson:(NSInteger)index{
[AlertControllerTool alertControllerWithTitle:@"提示" message:@"确定要删除该紧急联系人吗?" cancelTitle:@"取消" cancelBlock:^{
[AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_notice") message:@"确定要删除该紧急联系人吗?" cancelTitle:kLocalizedString(@"alert_cancel") cancelBlock:^{
} confirm:@"确认" confirmBlock:^(id s) {
} confirm:kLocalizedString(@"alert_confirm") confirmBlock:^(id s) {
[self removeEmergencyContact:self.dataSource[index]];
......
......@@ -8,7 +8,6 @@
#import "ZJMineViewController.h"
#import "ZJMineTableViewCell.h"
#import "ZJTouBuImageView.h"
#import "UIButton+Category.h"
#import "ZJOauthLoginConfig.h"
#import "ZJUserInfoManager.h" //userInfo
......@@ -116,13 +115,10 @@ static NSString *ID = @"mineID";
}
- (void)MyTrack {
// ZJFriendTrackMapViewController *trackMapVc = [[ZJFriendTrackMapViewController alloc] init];\
// trackMapVc.isMyTrack = true;
// trackMapVc.autoTrack = true;
// [self.navigationController showViewController:trackMapVc sender:nil];
ZJMemberPayViewController * pay = [[UIStoryboard storyboardWithName:@"Pay" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJMemberPayViewController"];
[self.navigationController pushViewController:pay animated:YES];
ZJFriendTrackMapViewController *trackMapVc = [[ZJFriendTrackMapViewController alloc] init];\
trackMapVc.isMyTrack = true;
trackMapVc.autoTrack = true;
[self.navigationController showViewController:trackMapVc sender:nil];
}
- (void)urgencyPerson {
......@@ -195,30 +191,30 @@ static NSString *ID = @"mineID";
- (NSArray *)updateListDataSource{
NSArray * dataSource;
if (_isVip) {
dataSource = @[@{@"icon":@"Mine_Cell_Icon_2", @"title":@"我的轨迹"},
@{@"icon":@"Mine_Cell_Icon_3", @"title":@"紧急联系人"},
@{@"icon":@"Mine_Cell_Icon_4", @"title":@"使用教程"},
@{@"icon":@"Mine_Cell_Icon_5", @"title":@"分享"},
@{@"icon":@"Mine_Cell_Icon_6", @"title":@"定位权限设置"},
@{@"icon":@"Mine_Cell_Icon_7", @"title":@"在线客服"}];
dataSource = @[@{@"icon":@"Mine_Cell_Icon_2", @"title":kLocalizedString(@"mine_track")},
@{@"icon":@"Mine_Cell_Icon_3", @"title":kLocalizedString(@"mine_emergenry_contacts")},
@{@"icon":@"Mine_Cell_Icon_4", @"title":kLocalizedString(@"mine_guides")},
@{@"icon":@"Mine_Cell_Icon_5", @"title":kLocalizedString(@"mine_share")},
@{@"icon":@"Mine_Cell_Icon_6", @"title":kLocalizedString(@"mine_location_setting")},
@{@"icon":@"Mine_Cell_Icon_7", @"title":kLocalizedString(@"mine_online_service")}];
if(![ZJShareManager installed]){
dataSource = @[@{@"icon":@"Mine_Cell_Icon_2", @"title":@"我的轨迹"},
@{@"icon":@"Mine_Cell_Icon_3", @"title":@"紧急联系人"},
@{@"icon":@"Mine_Cell_Icon_4", @"title":@"使用教程"},
@{@"icon":@"Mine_Cell_Icon_6", @"title":@"定位权限设置"},
@{@"icon":@"Mine_Cell_Icon_7", @"title":@"在线客服"}];
dataSource = @[@{@"icon":@"Mine_Cell_Icon_2", @"title":kLocalizedString(@"mine_track")},
@{@"icon":@"Mine_Cell_Icon_3", @"title":kLocalizedString(@"mine_emergenry_contacts")},
@{@"icon":@"Mine_Cell_Icon_4", @"title":kLocalizedString(@"mine_guides")},
@{@"icon":@"Mine_Cell_Icon_6", @"title":kLocalizedString(@"mine_location_setting")},
@{@"icon":@"Mine_Cell_Icon_7", @"title":kLocalizedString(@"mine_online_service")}];
}
}else {
dataSource = @[@{@"icon":@"Mine_Cell_Icon_2", @"title":@"我的轨迹"},
@{@"icon":@"Mine_Cell_Icon_3", @"title":@"紧急联系人"},
@{@"icon":@"Mine_Cell_Icon_4", @"title":@"使用教程"},
@{@"icon":@"Mine_Cell_Icon_5", @"title":@"分享"},
@{@"icon":@"Mine_Cell_Icon_6", @"title":@"定位权限设置"}];
dataSource = @[@{@"icon":@"Mine_Cell_Icon_2", @"title":kLocalizedString(@"mine_track")},
@{@"icon":@"Mine_Cell_Icon_3", @"title":kLocalizedString(@"mine_emergenry_contacts")},
@{@"icon":@"Mine_Cell_Icon_4", @"title":kLocalizedString(@"mine_guides")},
@{@"icon":@"Mine_Cell_Icon_5", @"title":kLocalizedString(@"mine_share")},
@{@"icon":@"Mine_Cell_Icon_6", @"title":kLocalizedString(@"mine_location_setting")}];
if(![ZJShareManager installed]){
dataSource = @[@{@"icon":@"Mine_Cell_Icon_2", @"title":@"我的轨迹"},
@{@"icon":@"Mine_Cell_Icon_3", @"title":@"紧急联系人"},
@{@"icon":@"Mine_Cell_Icon_4", @"title":@"使用教程"},
@{@"icon":@"Mine_Cell_Icon_6", @"title":@"定位权限设置"}];
dataSource = @[@{@"icon":@"Mine_Cell_Icon_2", @"title":kLocalizedString(@"mine_track")},
@{@"icon":@"Mine_Cell_Icon_3", @"title":kLocalizedString(@"mine_emergenry_contacts")},
@{@"icon":@"Mine_Cell_Icon_4", @"title":kLocalizedString(@"mine_guides")},
@{@"icon":@"Mine_Cell_Icon_6", @"title":kLocalizedString(@"mine_location_setting")}];
}
}
return dataSource;
......@@ -259,11 +255,11 @@ static NSString *ID = @"mineID";
// [ZJUserInfoManager shared].userInfoModel && ![ZJUserInfoManager shared].userInfoModel.isMember
if (![ZJUserInfoManager shared].userInfoModel.isMember) {
ZJZhiFuViewController *vc = [[ZJZhiFuViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
// ZJMemberPayViewController *zhiFuVC = [[ZJMemberPayViewController alloc] init];
ZJMemberPayViewController * zhiFuVC = [[UIStoryboard storyboardWithName:@"Pay" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJMemberPayViewController"];
[self.navigationController pushViewController:zhiFuVC animated:YES];
vc.payFinish = ^{
zhiFuVC.payFinish = ^{
[[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
self.isVip = model.isMember;
......
......@@ -30,7 +30,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view
self.navigationItem.title = @"选择紧急联系人";
self.navigationItem.title = kLocalizedString(@"emergency_emergency_select");
self.view.backgroundColor = [UIColor whiteColor];
[self getFriendList];
......@@ -76,7 +76,7 @@
_headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScaleWidth(43))];
_headerView.backgroundColor = [UIColor whiteColor];
UILabel *lab = [UILabel labelWithtext:@"" font:[UIFont fontWithName:@"PingFangSC-Regular" size:KFont(13)] textColor:[UIColor colorWithHex:0x888888] alignment:NSTextAlignmentLeft];
NSString *str = @"* 在您发出紧急求助时,紧急联系人会在第一时间收到短信提醒";
NSString *str = [NSString stringWithFormat:@"* %@", kLocalizedString(@"emergency_first_send_hint")];
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc]initWithString:str];
[attr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:0xFF2121] range:NSMakeRange(0, 1)];
[attr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:0x888888] range:NSMakeRange(1, str.length - 1)];
......@@ -115,7 +115,7 @@
}];
UILabel * hintLab = [[UILabel alloc] init];
hintLab.text = @"您的好友列表没有人哦~";
hintLab.text = kLocalizedString(@"emergency_none_friends");
hintLab.textColor = kColorWithRGB(153, 153, 153);
hintLab.font = [UIFont systemFontOfSize:KFont(17)];
hintLab.textAlignment = NSTextAlignmentCenter;
......@@ -127,7 +127,7 @@
}];
UIButton * addBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(125), KScaleWidth(42))];
[addBtn setTitle:@"返回" forState:UIControlStateNormal];
[addBtn setTitle:kLocalizedString(@"alert_back") forState:UIControlStateNormal];
[addBtn setTitleColor:kColorWithRGB(85, 142, 252) forState:UIControlStateNormal];
addBtn.layer.cornerRadius = addBtn.frame.size.height/2;
addBtn.layer.borderWidth = 1.f;
......
......@@ -31,7 +31,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = @"设置";
self.navigationItem.title = kLocalizedString(@"setting");
self.view.backgroundColor = [UIColor whiteColor];
self.setTableView = [[ZJBasetableView alloc] initWithFrame:CGRectMake(0, kNavigationBarHeight, self.view.width, self.view.frame.size.height-kNavigationBarHeight)];
......@@ -89,7 +89,7 @@
- (UIButton *)logOutBtn {
if (!_logOutBtn) {
_logOutBtn = [[UIButton alloc]init];
[_logOutBtn setTitle:@"退出登录" forState:UIControlStateNormal];
[_logOutBtn setTitle:kLocalizedString(@"setting_sign_out") forState:UIControlStateNormal];
[_logOutBtn setTitleColor:[UIColor colorWithHex:0x558EFC] forState:UIControlStateNormal];
_logOutBtn.titleLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:16];
_logOutBtn.layer.borderWidth = 1;
......@@ -104,16 +104,16 @@
if (!_dataSource) {
if (![ZJUserInfoManager shared].isLogin) {
_dataSource = @[@"版本检测",
@"隐私政策",
@"知迹用户协议",
@"知迹用户付费协议",
kLocalizedString(@"setting_privacy"),
kLocalizedString(@"setting_service"),
kLocalizedString(@"setting_payment_service"),
];
}else{
_dataSource = @[@"版本检测",
@"隐私政策",
@"知迹用户协议",
@"知迹用户付费协议",
@"注销账户"
kLocalizedString(@"setting_privacy"),
kLocalizedString(@"setting_service"),
kLocalizedString(@"setting_payment_service"),
kLocalizedString(@"setting_delete_account")
];
}
}
......@@ -179,7 +179,7 @@
}
}
if (!needUpdate) {
// [AlertControllerTool alertControllerWithTitle:@"提示" message:@"当前已经是最新版本" cancelTitle:@"确认" cancelBlock:nil finishBlock:nil];
// [AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_notice") message:@"当前已经是最新版本" cancelTitle:kLocalizedString(@"alert_confirm") cancelBlock:nil finishBlock:nil];
}
}
......@@ -254,7 +254,7 @@
break;
case 4:
{
[AlertControllerTool alertControllerWithTitle:@"提示" message:@"您确定要注销账户吗" cancelTitle:@"取消" cancelBlock:nil confirm:@"确定" confirmBlock:^(id s) {
[AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_notice") message:@"您确定要注销账户吗" cancelTitle:kLocalizedString(@"alert_cancel") cancelBlock:nil confirm:kLocalizedString(@"alert_confirm_style2") confirmBlock:^(id s) {
[self userCancellation];
} finishBlock:nil];
}
......
......@@ -48,7 +48,7 @@
}];
UILabel * titleLabel = [[UILabel alloc] init];
titleLabel.text = @"添加紧急联系人(最多3位)";
titleLabel.text = kLocalizedString(@"emergency_add_alert");
titleLabel.textColor = kColorWithRGB(33, 33, 33);
titleLabel.font = [UIFont systemFontOfSize:KFont(17)];
titleLabel.textAlignment = NSTextAlignmentCenter;
......@@ -71,7 +71,7 @@
phoneTextField = [[UITextField alloc] init];
phoneTextField.text = @"";
phoneTextField.placeholder = @"请输入手机号";
phoneTextField.placeholder = kLocalizedString(@"emergency_enter_phone");
phoneTextField.keyboardType = UIKeyboardTypeNumberPad;
phoneTextField.font = [UIFont systemFontOfSize:KFont(16)];
[phoneTextField limitTextLength:11];
......@@ -88,7 +88,7 @@
//
UIView * phoneTFRightBgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(85), KScaleWidth(35))];
UIButton * phoneTFRightBtn = [[UIButton alloc] initWithFrame:phoneTFRightBgView.frame];
[phoneTFRightBtn setTitle:@"通讯录" forState:(UIControlStateNormal)];
[phoneTFRightBtn setTitle:kLocalizedString(@"emergency_contact") forState:(UIControlStateNormal)];
[phoneTFRightBtn setTitleColor:kColorWithRGB(82, 139, 252) forState:(UIControlStateNormal)];
phoneTFRightBtn.titleLabel.textColor = kColorWithRGB(82, 139, 252);
phoneTFRightBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(15)];
......@@ -120,7 +120,7 @@
//好友列表
friendTextField = [[UITextField alloc] init];
friendTextField.text = @"在好友列表中选择";
friendTextField.text = kLocalizedString(@"emergency_friend_select");
friendTextField.delegate = self;
friendTextField.font = [UIFont systemFontOfSize:KFont(16)];
[bgview addSubview:friendTextField];
......@@ -165,7 +165,7 @@
//确认
UIButton * confirmBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(175), KScaleWidth(58))];
[confirmBtn setTitle:@"确认" forState:UIControlStateNormal];
[confirmBtn setTitle:kLocalizedString(@"alert_confirm") forState:UIControlStateNormal];
[confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
confirmBtn.backgroundColor = kColorWithRGB(81, 139, 255);
confirmBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(17)];
......@@ -306,7 +306,7 @@
- (void)showAlertViewAboutNotAuthorAccessContact{
[AlertControllerTool alertControllerWithTitle:@"请授权通讯录权限" message:@"请在iPhone的\"设置-隐私-通讯录\"选项中,允许APP访问你的通讯录" cancelTitle:@"好的" cancelBlock:nil finishBlock:nil];
[AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_addressBook_allow") message:kLocalizedString(@"alert_addressBook_setting") cancelTitle:kLocalizedString(@"alert_OK") cancelBlock:nil finishBlock:nil];
}
- (void)openContact{
......
......@@ -73,7 +73,7 @@
[weakSelf clickType:HeaderTapTypeHead];
}];
//[[data Read] objectForKey:@"NickName"]
self.nicknameLabel = [UILabel labelWithtext:@"点击登录" font:[UIFont systemFontOfSize:KFont(24)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft];
self.nicknameLabel = [UILabel labelWithtext:kLocalizedString(@"mine_sign") font:[UIFont systemFontOfSize:KFont(24)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft];
self.nicknameLabel.font = [UIFont systemFontOfSize:24 weight:UIFontWeightBold];
//[UIFont fontWithName:@"PingFangSC-Medium" size:KFont(24)];
[self addSubview:self.nicknameLabel];
......@@ -89,7 +89,7 @@
//nickName hint
self.userIdLabel = [UILabel labelWithtext:@"点击昵称可自定义昵称" font:[UIFont systemFontOfSize:KFont(13)] textColor:[UIColor colorWithHex:0x666666] alignment:NSTextAlignmentCenter];
self.userIdLabel = [UILabel labelWithtext:kLocalizedString(@"mine_click_nickname") font:[UIFont systemFontOfSize:KFont(13)] textColor:[UIColor colorWithHex:0x666666] alignment:NSTextAlignmentCenter];
[self addSubview:self.userIdLabel];
self.userIdLabel.textAlignment = NSTextAlignmentLeft;
[self.userIdLabel setUserInteractionEnabled:true];
......@@ -161,7 +161,7 @@
}];
//timeLabel
self.timeLabel = [UILabel labelWithtext:@"解锁使用更多功能" font:[UIFont systemFontOfSize:KFont(10)] textColor:[UIColor colorWithHex:0x989BAD] alignment:NSTextAlignmentLeft];
self.timeLabel = [UILabel labelWithtext:kLocalizedString(@"mine_unlock_more_services") font:[UIFont systemFontOfSize:KFont(10)] textColor:[UIColor colorWithHex:0x989BAD] alignment:NSTextAlignmentLeft];
[functionImageView addSubview:self.timeLabel];
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.gongNengLabel.mas_bottom).mas_offset(KScaleWidth(9));
......@@ -182,13 +182,13 @@
_xuFeiButton.hidden = !_dengJiImageView.hidden;
if (isLogin) {
if (Member) {
_gongNengLabel.text = @"功能已解锁";
_gongNengLabel.text = kLocalizedString(@"mine_unlocked");
_timeLabel.text = @"终身免费使用";
// _xuFeiButton.hidden = YES;
}else{
_gongNengLabel.text = @"功能未解锁";
_timeLabel.text = @"解锁使用更多功能";
[_xuFeiButton setTitle:@"解锁" forState:(UIControlStateNormal)];
_timeLabel.text = kLocalizedString(@"mine_unlock_more_services");
[_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)];
}
if ([userInfo.nickname isEqual:@""]) {
_nicknameLabel.text = userInfo.phoneNo;
......@@ -196,20 +196,20 @@
_nicknameLabel.text = userInfo.nickname;
}
}else{
_nicknameLabel.text = @"点击登录"; // [[data Read] objectForKey:@"NickName"];
_nicknameLabel.text = kLocalizedString(@"mine_sign"); // [[data Read] objectForKey:@"NickName"];
_gongNengLabel.text = @"功能未解锁";
_timeLabel.text = @"解锁使用更多功能";
[_xuFeiButton setTitle:@"解锁" forState:(UIControlStateNormal)];
_timeLabel.text = kLocalizedString(@"mine_unlock_more_services");
[_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)];
}
if ([userInfo.uid isEqual: @""]) {
self.userIdLabel.text = @"点击昵称可自定义昵称";
self.userIdLabel.text = kLocalizedString(@"mine_click_nickname");
} else {
self.userIdLabel.text = [NSString stringWithFormat:@"用户id: %@", userInfo.uid];
self.userIdLabel.text = [NSString stringWithFormat:@"%@: %@", kLocalizedString(@"mine_userID"), userInfo.uid];
}
if (userInfo.isTourist) {
_nicknameLabel.text = @"点击登录";
_nicknameLabel.text = kLocalizedString(@"mine_sign");
}
[self updateHeaderPortraitWithImage:[UIImage new] urlStr:userInfo.headImage];
......@@ -224,10 +224,10 @@
- (void)clean{
_touXiangImageView.image = [UIImage imageNamed:@"mine_user_header"];
_nicknameLabel.text = @"点击登录"; // [[data Read] objectForKey:@"NickName"];
_nicknameLabel.text = kLocalizedString(@"mine_sign"); // [[data Read] objectForKey:@"NickName"];
_gongNengLabel.text = @"功能未解锁";
_timeLabel.text = @"解锁使用更多功能";
[_xuFeiButton setTitle:@"解锁" forState:(UIControlStateNormal)];
_timeLabel.text = kLocalizedString(@"mine_unlock_more_services");
[_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)];
}
@end
......@@ -43,8 +43,8 @@
self.addPersonBtn = [[UIButton alloc]init];
[self.addPersonBtn addTarget:self action:@selector(addBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[self.addPersonBtn setTitle:@"已添加" forState:UIControlStateNormal];
[self.addPersonBtn setTitle:@"添加" forState:UIControlStateSelected];
[self.addPersonBtn setTitle:kLocalizedString(@"message_add") forState:UIControlStateNormal];
[self.addPersonBtn setTitle:kLocalizedString(@"care_add") forState:UIControlStateSelected];
self.addPersonBtn.titleLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:14];
[self.addPersonBtn setTitleColor:[UIColor colorWithHex:0xAAAAAA] forState:UIControlStateNormal];
[self.addPersonBtn setTitleColor:[UIColor colorWithHex:0x558EFC] forState:UIControlStateSelected];
......
......@@ -54,7 +54,7 @@
self.versionLab.sd_layout.centerYEqualToView(self.contentView).rightSpaceToView(self.pushIcon, 4).heightIs(11).widthIs(90);
self.setTitleLabel.sd_layout.centerYEqualToView(self.contentView).leftSpaceToView(self.contentView, 18).heightIs(15).widthIs(120);
self.setTitleLabel.sd_layout.centerYEqualToView(self.contentView).leftSpaceToView(self.contentView, 18).heightIs(15).widthIs(360);
}
......
//
// ZJTouBuImageView.h
// ZhiJi
//
// Created by Company on 2020/6/5.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJTouBuImageView : UIImageView
@property (nonatomic, strong) UIButton *sheZhiButton;
@property (nonatomic, strong) UIImageView *touXiangImageView;
@end
NS_ASSUME_NONNULL_END
//
// ZJTouBuImageView.m
// ZhiJi
//
// Created by Company on 2020/6/5.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJTouBuImageView.h"
@interface ZJTouBuImageView()
//@property (nonatomic, strong) UIImageView *touXiangImageView;
//@property (nonatomic, strong) UIButton *niChengButton;
@property (nonatomic, strong) UILabel *niChengLabel;
@property (nonatomic, strong) UILabel *tiShiLabel;
@property (nonatomic, strong) UIImageView *beiJingImageView;
@property (nonatomic, strong) UILabel *gongNengLabel;
@property (nonatomic, strong) UIImageView *dengJiImageView;
@property (nonatomic, strong) UILabel *timeLabel;
@property (nonatomic, strong) UIButton *xuFeiButton;
@end
@implementation ZJTouBuImageView
// 写initWithFrame:方法,创建子控件并 - 添加
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self setUI];
}
return self;
}
// 重写layoutSubviews,子控件设置frame
- (void)layoutSubviews {
[super layoutSubviews];
[self setImage:[UIImage imageNamed:@"头底"]];
self.contentMode = UIViewContentModeScaleToFill;
}
- (void)setUI{
self.userInteractionEnabled = YES;
//touXiangImageView
self.touXiangImageView = [[UIImageView alloc] init];
self.touXiangImageView.image = [UIImage imageNamed:@"头像"];
self.touXiangImageView.contentMode = UIViewContentModeScaleAspectFit;
self.touXiangImageView.userInteractionEnabled = YES;
[self addSubview:self.touXiangImageView];
[self.touXiangImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self).offset(KScaleWidth(73));
make.left.equalTo(self).offset(KScaleWidth(20));
make.size.mas_offset(CGSizeMake(KScaleWidth(57), KScaleWidth(57)));
}];
//sheZhiButton
self.sheZhiButton = [[UIButton alloc] init];
[self.sheZhiButton setImage:[UIImage imageNamed:@"设置"] forState:UIControlStateNormal];
[self addSubview:self.sheZhiButton];
[self.sheZhiButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self).mas_offset(KScaleWidth(37) + StatusBarDif);
make.size.mas_offset(CGSizeMake(KScaleWidth(27), KScaleWidth(24)));
make.right.equalTo(self).mas_offset(KScaleWidth(-21.5));
}];
[self.sheZhiButton addTarget:self action: @selector(settingBtnClick) forControlEvents: UIControlEventTouchUpInside];
//niChengButton
// self.niChengButton = [[UIButton alloc] init];
// [self addSubview:self.niChengButton];
// [self.niChengButton setTitleColor:[UIColor colorWithHex:0x222222] forState:0];
// [self.niChengButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(17)]];
// [self.niChengButton setBackgroundColor:[UIColor colorWithHex:0xffffff]];
//
// [self.niChengButton setTitle:@"13288888888" forState:UIControlStateNormal];
// [self.niChengButton addSubview:self.sheZhiButton];
// [self.niChengButton mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(self.touXiangImageView).mas_offset(KScaleWidth(7.5));
// make.size.mas_offset(CGSizeMake(KScaleWidth(149), KScaleWidth(17.5)));
// make.left.equalTo(self.touXiangImageView.mas_right).mas_offset(KScaleWidth(17.5));
// }];
self.niChengLabel = [UILabel labelWithtext:@"13288888888" font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft];
[self addSubview:self.niChengLabel];
self.niChengLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:17];
[self.niChengLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.touXiangImageView).mas_offset(KScaleWidth(7.5));
make.size.mas_offset(CGSizeMake(KScaleWidth(149), KScaleWidth(17.5)));
make.left.equalTo(self.touXiangImageView.mas_right).mas_offset(KScaleWidth(17.5));
}];
//tiShiLabel
self.tiShiLabel = [UILabel labelWithtext:@"点击昵称可自定义昵称" font:[UIFont systemFontOfSize:KFont(13)] textColor:[UIColor colorWithHex:0x666666] alignment:NSTextAlignmentCenter];
[self addSubview:self.tiShiLabel];
[self.tiShiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.niChengLabel.mas_bottom).mas_offset(KScaleWidth(12.5));
make.left.equalTo(self.niChengLabel).mas_offset(0);
make.height.mas_offset(12.5);
}];
//beiJingImageView
self.beiJingImageView = [[UIImageView alloc] init];
self.beiJingImageView.image = [UIImage imageNamed:@"底框11"];
self.beiJingImageView.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:self.beiJingImageView];
[self.beiJingImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self).offset(KScaleWidth(0));
make.bottom.equalTo(self).offset(KScaleWidth(0));
make.size.mas_offset(CGSizeMake(KScaleWidth(322), KScaleWidth(69.5)));
}];
//gomngNnegLabel
self.gongNengLabel = [UILabel labelWithtext:@"功能已解锁" font:[UIFont systemFontOfSize:KFont(16)] textColor:[UIColor colorWithHex:0xFFFFFF] alignment:NSTextAlignmentCenter];
self.gongNengLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:16];
[self addSubview:self.gongNengLabel];
[self.gongNengLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.beiJingImageView).mas_offset(KScaleWidth(17.5));
make.left.equalTo(self.beiJingImageView).mas_offset(20.5);
make.height.mas_offset(15.5);
}];
//dengJiImageView
self.dengJiImageView = [[UIImageView alloc] init];
self.dengJiImageView.image = [UIImage imageNamed:@"形状 11"];
self.dengJiImageView.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:self.dengJiImageView];
[self.dengJiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.gongNengLabel).offset(KScaleWidth(0));
make.left.equalTo(self.gongNengLabel.mas_right).offset(KScaleWidth(4));
make.size.mas_offset(CGSizeMake(KScaleWidth(14), KScaleWidth(12)));
}];
//timeLabel
self.timeLabel = [UILabel labelWithtext:@"到期时间 2020-06-21" font:[UIFont systemFontOfSize:KFont(10)] textColor:[UIColor colorWithHex:0x989BAD] alignment:NSTextAlignmentCenter];
[self addSubview:self.timeLabel];
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.gongNengLabel.mas_bottom).mas_offset(KScaleWidth(8.5));
make.left.equalTo(self.gongNengLabel).mas_offset(0);
make.height.mas_offset(9.5);
}];
//xufeiButton
self.xuFeiButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.xuFeiButton setTitle:@"续费" forState:0];
[self.xuFeiButton setTitleColor:[UIColor colorWithHex:0x38180D] forState:0];
[self.xuFeiButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(13)]];
[self.xuFeiButton setBackgroundColor:[UIColor colorWithHex:0xEBC6B4]];
[self addSubview:self.xuFeiButton];
[self.xuFeiButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.beiJingImageView).mas_offset(KScaleWidth(-23));
make.centerY.equalTo(self.beiJingImageView).mas_offset(KScaleWidth(0));
make.size.mas_offset(CGSizeMake(KScaleWidth(80), KScaleWidth(30)));
}];
self.xuFeiButton.layer.cornerRadius = KScaleWidth(15);
self.xuFeiButton.layer.masksToBounds = YES;
self.xuFeiButton.layer.borderWidth = 0.5;
self.xuFeiButton.layer.borderColor = [UIColor colorWithHex:0x568EFC].CGColor;
[self.xuFeiButton addTarget:self action:@selector(lBtnClick) forControlEvents:UIControlEventTouchUpInside];
}
- (void)settingBtnClick{
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
......@@ -43,7 +43,7 @@
}];
UILabel * titleLabel = [[UILabel alloc] init];
titleLabel.text = @"修改昵称";
titleLabel.text = kLocalizedString(@"mine_edit_nickname");
titleLabel.textColor = kColorWithRGB(33, 33, 33);
titleLabel.font = [UIFont systemFontOfSize:KFont(17)];
titleLabel.textAlignment = NSTextAlignmentCenter;
......@@ -78,7 +78,7 @@
nickNameTextField = [[UITextField alloc] init];
nickNameTextField.text = @"";
nickNameTextField.placeholder = @"请输入新昵称";
nickNameTextField.placeholder = kLocalizedString(@"mine_enter_nickname");
nickNameTextField.keyboardType = UIKeyboardTypeDefault;
nickNameTextField.font = [UIFont systemFontOfSize:KFont(16)];
[nickNameTextField limitTextLength:20];//暂定
......@@ -101,7 +101,7 @@
}];
UIButton * confirmBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(175), KScaleWidth(58))];
[confirmBtn setTitle:@"确认" forState:UIControlStateNormal];
[confirmBtn setTitle:kLocalizedString(@"alert_confirm") forState:UIControlStateNormal];
[confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
confirmBtn.backgroundColor = kColorWithRGB(81, 139, 255);
confirmBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(17)];
......
......@@ -60,7 +60,7 @@
NSString *productId = self.currentProduct.productId;
if (productId.length <= 0) {
[MBProgressHUD showError:@"获取产品信息失败"];
[MBProgressHUD showError:kLocalizedString(@"pay_produce_info_fail")];
return;
}
[ZTPurchaseManager purchaseWithProductIdWithProductId:productId inView:self.view success:^{
......
......@@ -86,7 +86,7 @@
self.fanHuiButton = [[UIButton alloc] init];
[self.fanHuiButton setImage:[UIImage imageNamed:@"支付返回"] forState:UIControlStateNormal];
[self.fanHuiButton setTitle:@"设置" forState:UIControlStateNormal];
[self.fanHuiButton setTitle:kLocalizedString(@"setting") forState:UIControlStateNormal];
[self.view addSubview:self.fanHuiButton];
[self.fanHuiButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.view).mas_offset(KScaleWidth(32) + StatusBarDif);
......@@ -312,7 +312,7 @@
// NSString *product = self.productID;
// if (self.currentProduct == nil){
// [MBProgressHUD showError:@"获取产品信息失败"];
// [MBProgressHUD showError:kLocalizedString(@"pay_produce_info_fail")];
// return;
// }
// if([SKPaymentQueue canMakePayments]){
......@@ -323,7 +323,7 @@
NSString *productId = self.currentProduct.productId;
if (productId.length <= 0) {
[MBProgressHUD showError:@"获取产品信息失败"];
[MBProgressHUD showError:kLocalizedString(@"pay_produce_info_fail")];
return;
}
[ZTPurchaseManager purchaseWithProductIdWithProductId:productId inView:self.view success:^{
......
......@@ -225,7 +225,7 @@
// count--;
// }else{
// dispatch_async(dispatch_get_main_queue(), ^{
// [confirmBtn setTitle:@"确认" forState:UIControlStateNormal];
// [confirmBtn setTitle:kLocalizedString(@"alert_confirm") forState:UIControlStateNormal];
// [confirmBtn setTitleColor:MassColor forState:(UIControlStateNormal)];
// confirmBtn.selected = YES;
// confirmBtn.enabled = YES;
......
......@@ -31,7 +31,7 @@
[self.view addSubview:self.guideScrollView];
[self fakeLaunchScreen];
// [self fakeLaunchScreen];
}
- (void)fakeLaunchScreen{
......@@ -42,17 +42,23 @@
}];
__weak typeof(self) weakSelf = self;
self.launchScreen.finishCallBack = ^{
[weakSelf.launchScreen removeFromSuperview];
Data * data = [[Data alloc] init];
NSDictionary * switchDic = [[data Read] objectForKey:@"switch"];
BOOL open = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"first_open_navigate"]] isEqualToString:@"1"];
if (!open) {
// 切换至tabVc
if (weakSelf.clickCallBack) {
weakSelf.clickCallBack(YES, NO);
}
}
dispatch_async(dispatch_get_global_queue(0, 0), ^{
dispatch_sync(dispatch_get_main_queue(), ^{
[weakSelf.launchScreen removeFromSuperview];
Data * data = [[Data alloc] init];
NSDictionary * switchDic = [[data Read] objectForKey:@"switch"];
BOOL open = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"first_open_navigate"]] isEqualToString:@"1"];
if (!open) {
// 切换至tabVc
if (weakSelf.clickCallBack) {
weakSelf.clickCallBack(YES, NO);
}
}
});
});
};
}
......@@ -138,7 +144,8 @@
// }
UIImageView *guidePage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[name stringByAppendingFormat:@"%d", i+1]]];
guidePage.tag = i;
guidePage.contentMode = UIViewContentModeScaleAspectFill;
guidePage.contentMode = UIViewContentModeScaleToFill;
// guidePage.contentMode = UIViewContentModeScaleAspectFill;
// guidePage.contentMode = UIViewContentModeScaleAspectFit;
guidePage.clipsToBounds = YES;
......
......@@ -23,12 +23,12 @@
#pragma mark 等待显示
+ (MBProgressHUD *)show{
MBProgressHUD * hud = [MBProgressHUD showHUD:@"加载中..." view:nil];
MBProgressHUD * hud = [MBProgressHUD showHUD:kLocalizedString(@"alert_loading") view:nil];
return hud;
}
+ (MBProgressHUD *)showWithView:(UIView *)view{
MBProgressHUD * hud = [MBProgressHUD showHUD:@"加载中..." view:view];
MBProgressHUD * hud = [MBProgressHUD showHUD:kLocalizedString(@"alert_loading") view:view];
return hud;
}
......
......@@ -84,15 +84,15 @@ static ZJImagePickerManager * manager;
- (void)chooseHeadPortrait{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"选择头像" message:nil preferredStyle: UIAlertControllerStyleActionSheet];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:kLocalizedString(@"alert_profile") message:nil preferredStyle: UIAlertControllerStyleActionSheet];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:kLocalizedString(@"alert_cancel") style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *deleteAction = [UIAlertAction actionWithTitle:@"打开照相机" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
UIAlertAction *deleteAction = [UIAlertAction actionWithTitle:kLocalizedString(@"alert_camera") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self chooseHeadPortrait:UIImagePickerControllerSourceTypeCamera];
}];
UIAlertAction *archiveAction = [UIAlertAction actionWithTitle:@"从手机相册获取" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
UIAlertAction *archiveAction = [UIAlertAction actionWithTitle:kLocalizedString(@"alert_album") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self chooseHeadPortrait:UIImagePickerControllerSourceTypePhotoLibrary];
}];
......@@ -138,7 +138,7 @@ static ZJImagePickerManager * manager;
if (isPicker) {
[self.currentVC presentViewController:self.picker animated:YES completion:nil];
}else {
[AlertControllerTool alertControllerWithTitle:@"错误" message:@"相机不可用" cancelTitle:@"确定" cancelBlock:nil finishBlock:nil];
[AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_error") message:kLocalizedString(@"alert_camera_unuse") cancelTitle:kLocalizedString(@"alert_confirm_style2") cancelBlock:nil finishBlock:nil];
}
}
......
......@@ -183,7 +183,7 @@ static TQNetworkTools* _tools = nil;
[dict setValue: UIDevice.currentDevice.model forKey: @"model"];
[dict setValue: @([[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] integerValue]) forKey: @"vc"];
// [dict setValue: [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"] forKey: @"vn"];
// [dict setValue: kLocalizedString(@"appName") forKey: @"vn"];
if (token) {
[dict setValue: [ZJUserInfoManager shared].token forKey: @"token"];
......@@ -230,7 +230,7 @@ static TQNetworkTools* _tools = nil;
// }
//appLs
[dict setValue: @"d904ceaa1b3f6444" forKey: @"appLs"];
[dict setValue: @"040087e60c36fd63" forKey: @"appLs"];
// 设置网络类型
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
......@@ -487,7 +487,7 @@ static TQNetworkTools* _tools = nil;
// version code
[dict setValue: [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] forKey: @"vc"];
// version number
// [dict setValue: [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"] forKey: @"vn"];
// [dict setValue: kLocalizedString(@"appName") forKey: @"vn"];
// platform
[dict setValue: @"ios" forKey: @"platform"];
......@@ -520,7 +520,7 @@ static TQNetworkTools* _tools = nil;
// }
//appLs
[dict setValue: @"d904ceaa1b3f6444" forKey: @"appLs"];
[dict setValue: @"040087e60c36fd63" forKey: @"appLs"];
[dict addEntriesFromDictionary:[self signParams:dict]];
......
......@@ -79,6 +79,8 @@ isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bo
#define kColorWithRGB(r, g, b) [UIColor colorWithRed:(r) / 255.f green:(g) / 255.f blue:(b) / 255.f alpha:1.f]
#define kMassColor kColorWithRGB(86, 142, 252)
#define kLocalizedString(key) NSLocalizedString(key, @"")
// 第三方头文件
#import <Masonry.h>
#import <YYModel.h>
......
......@@ -11,7 +11,7 @@
#define DefaultPage 1
#define NoMoreMessage @"没有更多了"
#define NoMoreMessage kLocalizedString(@"alert_noMore")
@interface RefreshTool ()
......
......@@ -24,8 +24,8 @@
+ (void)shareWithType:(ShareType)type currentVC:(UIViewController *)currentVC{
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *appCurName = [infoDictionary objectForKey:@"CFBundleName"];
// NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *appCurName = kLocalizedString(@"appName");
NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
NSString * shareUrl;
NSString * title;
......@@ -33,13 +33,13 @@
if (type == Share_invite) {
shareUrl = [NSString stringWithFormat:@"%@?headImage=%@&phoneNo=%@&shareCode=%@", [dic objectForKey:@"invite"], [ZJUserInfoManager shared].userInfoModel.headImage, [ZJUserInfoManager shared].userInfoModel.phoneNo, [ZJUserInfoManager shared].userInfoModel.shareCode];
title = @"邀请您成为好友";
message = [NSString stringWithFormat:@"下载%@APP,实时查看我的位置,守护彼此安全。", appCurName];
title = kLocalizedString(@"share_invite");
message = [NSString stringWithFormat:kLocalizedString(@"share_upload"), appCurName];
}else if (type == Share_share){
shareUrl = [NSString stringWithFormat:@"%@%@", [dic objectForKey:@"wx_share"], @"?app_source=ios"];
title = @"分享";
message = [NSString stringWithFormat:@"分享%@APP,实时查看我的位置,守护彼此安全。", appCurName];
title = kLocalizedString(@"mine_share");
message = [NSString stringWithFormat:kLocalizedString(@"share_friend"), appCurName];
}
FBSDKShareLinkContent *linkContent = [[FBSDKShareLinkContent alloc] init];
......
......@@ -261,8 +261,8 @@ static ZJUserInfoManager * manager;
}
} else if (kCLAuthorizationStatusDenied == status) {
NSString *alertTitle = [NSString stringWithFormat:@"位置权限未开启,请进入系统[设置]> [%@] > [位置]中允许访问位置信息,用来绘制您的轨迹", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]];
[AlertControllerTool alertControllerWithTitle:alertTitle message: @"知迹绘制您的轨迹需要您开启定位服务" cancelTitle:@"去开启" cancelBlock:^{
NSString *alertTitle = [NSString stringWithFormat:kLocalizedString(@"alert_location_setting"), kLocalizedString(@"appName")];
[AlertControllerTool alertControllerWithTitle:alertTitle message: kLocalizedString(@"alert_location_authority") cancelTitle:kLocalizedString(@"alert_location_enble") cancelBlock:^{
NSURL * url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
......@@ -275,7 +275,7 @@ static ZJUserInfoManager * manager;
[[UIApplication sharedApplication] openURL:url];
}
}
} confirm:@"取消" confirmBlock:nil finishBlock:nil];
} confirm:kLocalizedString(@"alert_cancel") confirmBlock:nil finishBlock:nil];
}else if (kCLAuthorizationStatusAuthorizedWhenInUse == status || kCLAuthorizationStatusAuthorizedAlways == status){
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8){
locationManager = [[CLLocationManager alloc] init];
......@@ -284,7 +284,7 @@ static ZJUserInfoManager * manager;
}
}
}else{
[AlertControllerTool alertControllerWithTitle:@"定位服务未开启,请进入系统[设置]> [隐私] > [定位服务]中打开开关,并允许使用定位服务" message:@"知迹绘制您的轨迹需要您开启定位服务" cancelTitle:@"去设置" cancelBlock:^{
[AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_location_service") message:kLocalizedString(@"alert_location_authority") cancelTitle:kLocalizedString(@"alert_setting") cancelBlock:^{
NSURL * url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
......@@ -297,7 +297,7 @@ static ZJUserInfoManager * manager;
}
}
} confirm:@"取消" confirmBlock:^(id s) {
} confirm:kLocalizedString(@"alert_cancel") confirmBlock:^(id s) {
} finishBlock:nil];
}
......
......@@ -48,7 +48,7 @@
NSString *type;
if (ary.count <= 0) {
// [UIAlertController showAlertViewWithTitle:@"提示" Message:@"数据源不能为空" BtnTitles:@[@"确定"] ClickBtn:nil];
// [UIAlertController showAlertViewWithTitle:kLocalizedString(@"alert_notice") Message:@"数据源不能为空" BtnTitles:@[kLocalizedString(@"alert_confirm_style2")] ClickBtn:nil];
return sortDic;
}
......@@ -85,7 +85,7 @@
break;
}
if (i == propertyCount -1) {
[UIAlertController showAlertViewWithTitle:@"提示" Message:[NSString stringWithFormat:@"数据源中的Model没有你指定的属性:%@",name] BtnTitles:@[@"确定"] ClickBtn:nil];
[UIAlertController showAlertViewWithTitle:kLocalizedString(@"alert_notice") Message:[NSString stringWithFormat:@"数据源中的Model没有你指定的属性:%@",name] BtnTitles:@[kLocalizedString(@"alert_confirm_style2")] ClickBtn:nil];
return sortDic;
}
}
......
......@@ -17,7 +17,7 @@
NSMutableArray * dataSourceArray = [[NSMutableArray alloc]init];
NSString * type;
if(originalArray.count <= 0){
// UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"数据源不能为空" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
// UIAlertView * alert = [[UIAlertView alloc]initWithTitle:kLocalizedString(@"alert_notice") message:@"数据源不能为空" delegate:nil cancelButtonTitle:kLocalizedString(@"alert_confirm_style2") otherButtonTitles: nil];
// [alert show];
return originalArray;
}
......@@ -38,7 +38,7 @@
}
}
if (!isExit) {
UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"提示" message:[NSString stringWithFormat:@"数据源中的字典没有你指定的key:%@",propertyName] delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
UIAlertView * alert = [[UIAlertView alloc]initWithTitle:kLocalizedString(@"alert_notice") message:[NSString stringWithFormat:@"数据源中的字典没有你指定的key:%@",propertyName] delegate:nil cancelButtonTitle:kLocalizedString(@"alert_confirm_style2") otherButtonTitles: nil];
[alert show];
return originalArray;
}
......@@ -65,7 +65,7 @@
}
}
if (!isExit) {
UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"提示" message:[NSString stringWithFormat:@"数据源中的Model没有你指定的属性:%@",propertyName] delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
UIAlertView * alert = [[UIAlertView alloc]initWithTitle:kLocalizedString(@"alert_notice") message:[NSString stringWithFormat:@"数据源中的Model没有你指定的属性:%@",propertyName] delegate:nil cancelButtonTitle:kLocalizedString(@"alert_confirm_style2") otherButtonTitles: nil];
[alert show];
return originalArray;
}
......
......@@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
......@@ -58,6 +60,8 @@
<string>fbapi</string>
<string>fb-messenger-share-api</string>
</array>
<key>LSHasLocalizedDisplayName</key>
<true/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......
......@@ -12,7 +12,6 @@
#import "BaseTabBarViewController.h"
#import "ZJGuideConfig.h"
#import "ZJUserInfoManager.h"
#import "ZJCareViewController.h"
#import "ZJNavViewController.h"
@interface SceneDelegate ()
......
......@@ -6,4 +6,14 @@
Copyright © 2020 Company. All rights reserved.
*/
CFBundleDisplayName = "zhijiTest";
CFBundleDisplayName = "Family Mapp";
NSCameraUsageDescription = "知迹修改您的头像 test";
NSPhotoLibraryUsageDescription = "知迹修改您的头像需 test";
NSContactsUsageDescription = "知迹获取您的好友需要您的 test";
NSLocationAlwaysUsageDescription = "知迹绘制您的轨迹需要您的 test";
NSLocationWhenInUseUsageDescription = "知迹绘制您的轨迹需要您的 test";
NSLocationAlwaysAndWhenInUseUsageDescription = "知迹绘制您的轨迹需要您的 test";
NSLocationWhenInUseUsageDescription = "知迹绘制您的轨迹需要您的 test";
......@@ -7,55 +7,70 @@
*/
//alert
"温馨提示"="";
"阅读完整版"="";
"了解全部内容"="";
"不同意"="";
"同意并继续"="";
"和"="and";
"取消"="";
"确认"="";
"提示"="";
"错误"="";
"返回"="";
"解除"="";
"拒绝"="";
"未知"="";
"请稍后再试"="";
"位置权限未开启,请进入系统[设置]> [] > [位置]中允许访问位置信息,用来绘制您的轨迹"="";
"去开启"="";
"知迹绘制您的轨迹需要您开启定位服务"="";
"定位服务未开启,请进入系统[设置]> [隐私] > [定位服务]中打开开关,并允许使用定位服务"="";
"去设置"="";
"选择头像"="";
"打开照相机"="";
"从手机相册获取"="";
"相机不可用"="";
"加载中..."="";
"没有更多了"="";
"请授权通讯录权限"="";
"请在iPhone的\"设置-隐私-通讯录\"选项中,允许APP访问你的通讯录"="";
appName = "Family Mapp";
"alert_notice"="Notice";
"alert_read"="Read the complete";
"alert_learn"="to learn all contents";
"alert_disagree"="Disagree";
"alert_agree"="Agree";
"alert_and"="and";
"alert_cancel"="Cancel";
"alert_confirm"="Confirm";
"alert_confirm_style2"="Confirm";
"alert_notice"="Notice";
"alert_error"="Error";
"alert_back"="Back";
"alert_unfriend"="Unfriend";
"alert_decline"="Decline";
"alert_unknow"="Unknow";
"alert_later"="Please try again later";
"alert_location_setting"="Location permission is not enabled, please enter the system [Settings]> [%@]> [Location] to allow access to location information in order to draw your track";
"alert_location_enble"="Go to enable";
"alert_location_authority"="Family Mapp drawing your track requires you to turn on the location service";
"alert_location_service"="The location service has not been turned on, please go to the system [Settings]> [Privacy]> [Location Service] and turn on the switch, and allow the location service to be used";
"alert_addressBook_allow"="Please allow Family Mapp to access address book permissions";
"alert_addressBook_setting"="In the \"Settings-Privacy-Address Book\" option of the iPhone, please allow Family Mapp to access your address book";
"alert_setting"="Setting";
"alert_OK"="OK";
"alert_profile"="Select profile picture";
"alert_camera"="Turn on camera";
"alert_camera_unuse"="Camera unavailable";
"alert_album"="Select from album";
"alert_loading"="Loading...";
"alert_noMore"="No more data";
//tabbar
"我关心的人"="";
"我的"="";
"定位"="";
"tabbar_care"="Friends";
"tabbar_mine"="Me";
"tabbar_map"="Map";
//login
"login"="Login";
"login_title"="Sign in";
"login_send_code"="Send confirmation code";
"login_already_send_code"="Send confirmation code";
"login_read"="I accept";
"area"="Select the area";
"area_search"="Search countries";
"手机号快捷登录"="";
"请输入手机号码"="";
"请输入验证码"="";
"发送验证码"="";
"登录"="";
"已阅读并同意"="";
"重新发送"="";
"已发送"="";
//care
"我自己的位置轨迹"="";
"care_find_now"="Find now";
"care_find_others"="View others";
"添加位置关心"="";
"添加"="";
"care_add"="Add";
"立即查看"="";
"我自己"="";
"添加关心的人"="";
......@@ -79,65 +94,65 @@
"已发送邀请"="";
"暂未注册"="";
//message
"消息"="";
"接受"="";
"已添加"="";
"已同意"="";
"您接收本邀请,视为您已经充分理解并遵守《用户协议、《隐私协议》内容,同意授权平台按照隐私政策内容合法收集、储存和使用您的个人信息"="";
"message"="Messages";
"message_confirm"="Confirm";
"message_add"="Added";
"message_complete"="Confirmed";
"message_receive"="When you receive this invitation, you are deemed to have fully understood and complied with the contents of the \"User Agreement\" and \"Privacy Agreement\" and agreed to authorize the platform to legally collect, store and use your personal information in accordance with the contents of the privacy policy";
//track
"TA的轨迹"="";
"请确定对方是否授权知迹位置权限"="";
"对方该时间段未收录位置信息"="";
"请查看其它时段或稍等几分钟"="";
"您当前时段未收录位置信息"="";
"我自己的位置轨迹"="";
"查看Ta的位置"="";
"·在地图上查看实时位置\n·遇见问题一键呼救\n·每时每刻守护好友安全"="";
"暂无可选好友"="";
"track_friend"="Friends' History Foots";
"track_friend_authority_alert"="Please confirm whether the other party authorizes Family Mapp to allow location authority";
"track_friend_timeWithin_no_location"="The other party did not record location information during this time";
"track_friend_check_noData_alert"="Please check other time periods or wait a few minutes";
"track_mine_timeWithin_no_location"="You did not record location information during this time";
"track_mine"="My location and history";
"track_cleck"="View His/Her Location";
"track_no_friend"="No friend yet";
//mine
"点击登录"="";
"点击昵称可自定义昵称"="";
"解锁使用更多功能"="";
"解锁"="";
"终身免费使用"="";
"用户id:"="";
"我的轨迹"="";
"紧急联系人"="";
"使用教程"="";
"分享"="";
"定位权限设置"="";
"在线客服"="";
"功能已解锁"="";
"到期时间"="";
"续费"="";
"请输入新昵称"="";
"修改昵称"="";
"mine_sign"="Sign in";
"mine_click_nickname"="Click nickname to edit";
"mine_unlock_more_services"="Unlock to access Premium services";
"mine_unlock"="Unlock";
"mine_userID"="User ID";
"mine_track"="My track";
"mine_emergenry_contacts"="Emergency contacts";
"mine_guides"="Guides";
"mine_share"="Share";
"mine_location_setting"="Location permission settings";
"mine_online_service"="Help";
"mine_unlocked"="unlocked";
"mine_valid_until"="Valid until";
"mine_renewal"="Renewal";
"mine_enter_nickname"="Enter a new username";
"mine_edit_nickname"="Change username";
//setting
"设置"="";
"隐私政策"="";
"用户协议"="";
"用户付费协议"="";
"注销账户"="";
"退出登录"="";
"setting"="Settings";
"setting_privacy"="Privacy Policy";
"setting_service"="Terms of Service";
"setting_payment_service"="Payment Terms of Service";
"setting_delete_account"="Delete Account";
"setting_sign_out"="Sign out";
//emergency contact
"您还没有添加紧急联系人哦~"="";
"去添加"="";
"添加紧急联系人(最多3位)"="";
"请输入手机号"="";
"通讯录"="";
"在好友列表中选择"="";
"选择紧急联系人"="";
"在您发出紧急求助时,紧急联系人会在第一时间收到短息提醒"="";
"您的好友列表没有人哦~"="";
"暂无紧急联系人"="";
"紧急求助发送成功"="";
"紧急求助发送成功"="";
"emergency_none"="You haven't added any emergency contact";
"emergency_add"="Go to add";
"emergency_add_alert"="Add Emergency Contacts (up to 3)";
"emergency_enter_phone"="Enter a phone number";
"emergency_contact"="Contact";
"emergency_friend_select"="Select from friend list";
"emergency_emergency_select"="Select Emergency Contacts";
"emergency_first_send_hint"="The emergency contact will receive your alert right away";
"emergency_none_friends"="You haven’t added anybody yet.";
"emergency_none_yet"="You have no emergency contact yet";
"emergency_help_send_success"="SOS message sent successfully";
//pay
"付款信息"="";
"恢复使用"="";
"获取产品信息失败"="";
"pay_produce_info_fail"="Failed to obtain product information";
//share
"邀请您成为好友"="";
"下载AppNameAPP,实时查看我的位置,守护彼此安全。"="";
"share_invite"="Let’s be friend in Family Mapp";
"share_upload"="View real-time location Be long-time companion";
"share_friend"="Let’s be friend in %@";
......@@ -7,3 +7,13 @@
*/
CFBundleDisplayName = "知迹海外";
NSCameraUsageDescription = "知迹修改您的头像需要您的相机权限";
NSPhotoLibraryUsageDescription = "知迹修改您的头像需要您的相册权限";
NSContactsUsageDescription = "知迹获取您的好友需要您的通讯录权限";
NSLocationAlwaysUsageDescription = "知迹绘制您的轨迹需要您的定位权限";
NSLocationWhenInUseUsageDescription = "知迹绘制您的轨迹需要您的定位权限";
NSLocationAlwaysAndWhenInUseUsageDescription = "知迹绘制您的轨迹需要您的定位权限";
NSLocationWhenInUseUsageDescription = "知迹绘制您的轨迹需要您的定位权限";
......@@ -5,3 +5,124 @@
Created by 明津李 on 2020/6/28.
Copyright © 2020 Company. All rights reserved.
*/
appName = "知迹";
//alert
"alert_notice"="温馨提示";
"alert_read"="阅读完整版";
"alert_learn"="了解全部内容";
"alert_disagree"="不同意";
"alert_agree"="同意并继续";
"alert_and"="和";
"alert_cancel"="取消";
"alert_confirm"="确认";
"alert_confirm_style2"="确定";
"alert_notice"="提示";
"alert_error"="错误";
"alert_back"="返回";
"alert_unfriend"="解除";
"alert_decline"="拒绝";
"alert_unknow"="未知";
"alert_later"="请稍后再试";
"alert_location_setting"="位置权限未开启,请进入系统[设置]> [%@] > [位置]中允许访问位置信息,用来绘制您的轨迹";
"alert_location_enble"="去开启";
"alert_location_authority"="知迹绘制您的轨迹需要您开启定位服务";
"alert_location_service"="定位服务未开启,请进入系统[设置]> [隐私] > [定位服务]中打开开关,并允许使用定位服务";
"alert_addressBook_allow"="请授权通讯录权限";
"alert_addressBook_setting"="请在iPhone的\"设置-隐私-通讯录\"选项中,允许知迹访问你的通讯录";
"alert_setting"="去设置";
"alert_OK"="好的";
"alert_profile"="选择头像";
"alert_camera"="打开照相机";
"alert_camera_unuse"="相机不可用";
"alert_album"="从手机相册获取";
"alert_loading"="加载中...";
"alert_noMore"="没有更多了";
//tabbar
"tabbar_care"="我关心的人";
"tabbar_mine"="我的";
"tabbar_map"="定位";
//login
"login"="登录";
"login_title"="登录";
"login_send_code"="发送验证码";
"login_already_send_code"="已发送";
"login_read"="已阅读并同意";
"area"="区域";
"area_search"="搜索国家";
//care
"care_find_now"="立即查看";
"care_find_others"="查看其他好友";
"care_add"="添加";
//message
"message"="消息";
"message_confirm"="接受";
"message_add"="已添加";
"message_complete"="已同意";
"message_receive"="您接收本邀请,视为您已经充分理解并遵守《用户协议》、《隐私协议》内容,同意授权平台按照隐私政策内容合法收集、储存和使用您的个人信息";
//track
"track_friend"="TA的轨迹";
"track_friend_authority_alert"="请确定对方是否授权知迹位置权限";
"track_friend_timeWithin_no_location"="对方该时间段未收录位置信息";
"track_friend_check_noData_alert"="请查看其它时段或稍等几分钟";
"track_mine_timeWithin_no_location"="您当前时段未收录位置信息";
"track_mine"="我自己的位置轨迹";
"track_cleck"="查看Ta的位置";
"track_no_friend"="暂无可选好友";
//mine
"mine_sign"="点击登录";
"mine_click_nickname"="点击昵称可自定义昵称";
"mine_unlock_more_services"="解锁使用更多功能";
"mine_unlock"="解锁";
"mine_userID"="用户id";
"mine_track"="我的轨迹";
"mine_emergenry_contacts"="紧急联系人";
"mine_guides"="使用教程";
"mine_share"="分享";
"mine_location_setting"="定位权限设置";
"mine_online_service"="在线客服";
"mine_unlocked"="功能已解锁";
"mine_valid_until"="到期时间";
"mine_renewal"="续费";
"mine_enter_nickname"="请输入新昵称";
"mine_edit_nickname"="修改昵称";
//setting
"setting"="设置";
"setting_privacy"="隐私政策";
"setting_service"="用户协议";
"setting_payment_service"="用户付费协议";
"setting_delete_account"="注销账户";
"setting_sign_out"="退出登录";
//emergency contact
"emergency_none"="您还没有添加紧急联系人哦~";
"emergency_add"="去添加";
"emergency_add_alert"="添加紧急联系人(最多3位)";
"emergency_enter_phone"="请输入手机号码";
"emergency_contact"="通讯录";
"emergency_friend_select"="在好友列表中选择";
"emergency_emergency_select"="选择紧急联系人";
"emergency_first_send_hint"="在您发出紧急求助时,紧急联系人会在第一时间收到短息提醒";
"emergency_none_friends"="您的好友列表没有人哦~";
"emergency_none_yet"="暂无紧急联系人";
"emergency_help_send_success"="紧急求助发送成功";
//pay
"pay_produce_info_fail"="获取产品信息失败";
//share
"share_invite"="邀请您成为好友";
"share_upload"="下载%@APP,实时查看我的位置,守护彼此安全。";
"share_friend"="快来%@看一看吧";
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