Commit d770985b authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

strings

parent 916b95fa
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "686A7C932487644600C7200C" BlueprintIdentifier = "686A7C932487644600C7200C"
BuildableName = "&#x77e5;&#x8ff9;.app" BuildableName = "Family Mapp.app"
BlueprintName = "ZhiJi" BlueprintName = "ZhiJi"
ReferencedContainer = "container:ZhiJi.xcodeproj"> ReferencedContainer = "container:ZhiJi.xcodeproj">
</BuildableReference> </BuildableReference>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "686A7C932487644600C7200C" BlueprintIdentifier = "686A7C932487644600C7200C"
BuildableName = "&#x77e5;&#x8ff9;.app" BuildableName = "Family Mapp.app"
BlueprintName = "ZhiJi" BlueprintName = "ZhiJi"
ReferencedContainer = "container:ZhiJi.xcodeproj"> ReferencedContainer = "container:ZhiJi.xcodeproj">
</BuildableReference> </BuildableReference>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "686A7C932487644600C7200C" BlueprintIdentifier = "686A7C932487644600C7200C"
BuildableName = "&#x77e5;&#x8ff9;.app" BuildableName = "Family Mapp.app"
BlueprintName = "ZhiJi" BlueprintName = "ZhiJi"
ReferencedContainer = "container:ZhiJi.xcodeproj"> ReferencedContainer = "container:ZhiJi.xcodeproj">
</BuildableReference> </BuildableReference>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch. // Override point for customization after application launch.
[self initializeIQKeyboardManager]; [self initializeIQKeyboardManager];
[AMapServices sharedServices].apiKey = @"501f8a894329f4b57bbfee208a11676f"; [AMapServices sharedServices].apiKey = @"501f8a894329f4b57bbfee208a11676f";
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "添加按钮@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "添加按钮@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "迹录1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "迹录1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,12 +5,11 @@ ...@@ -5,12 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "showLocationInfo@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "showLocationInfo@3x.png", "filename" : "451593682664_.pic_hd.jpg",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,11 @@ ...@@ -5,12 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "按钮@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "按钮@3x.png", "filename" : "511593683993_.pic_hd.jpg",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
//紧急Button //紧急Button
self.jinJiButton = [UIButton buttonWithType:UIButtonTypeCustom]; self.jinJiButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.view addSubview:self.jinJiButton]; [self.view addSubview:self.jinJiButton];
[self.jinJiButton setBackgroundImage:[UIImage imageNamed:@"紧急警报"] forState:UIControlStateNormal]; [self.jinJiButton setBackgroundImage:[UIImage imageNamed:kLocalizedString(@"friend_emergency_alert")] forState:UIControlStateNormal];
[self.jinJiButton setTitleColor:[UIColor colorWithHex:0xffffff] forState:UIControlStateNormal]; [self.jinJiButton setTitleColor:[UIColor colorWithHex:0xffffff] forState:UIControlStateNormal];
[self.jinJiButton addTarget:self action:@selector(jinJiButtonClick) forControlEvents:UIControlEventTouchUpInside]; [self.jinJiButton addTarget:self action:@selector(jinJiButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.jinJiButton mas_makeConstraints:^(MASConstraintMaker *make) { [self.jinJiButton mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
__weak typeof(friend) weakFriend = friend; __weak typeof(friend) weakFriend = friend;
friend.removeCallBack = ^(ZJFriendModel * model) { friend.removeCallBack = ^(ZJFriendModel * model) {
[AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_notice") message:@"确定要移除该好友?" cancelTitle:kLocalizedString(@"alert_cancel") cancelBlock:^{ [AlertControllerTool alertControllerWithTitle:kLocalizedString(@"alert_notice") message:kLocalizedString(@"friend_remove") cancelTitle:kLocalizedString(@"alert_cancel") cancelBlock:^{
} confirm:kLocalizedString(@"alert_confirm") confirmBlock:^(id s) { } confirm:kLocalizedString(@"alert_confirm") confirmBlock:^(id s) {
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
}]; }];
UILabel * hintLab = [[UILabel alloc] init]; UILabel * hintLab = [[UILabel alloc] init];
hintLab.text = @"添加位置关心"; hintLab.text = kLocalizedString(@"care_add_location_cincerns");
hintLab.font = [UIFont systemFontOfSize:KFont(15)]; hintLab.font = [UIFont systemFontOfSize:KFont(15)];
[imageView addSubview:hintLab]; [imageView addSubview:hintLab];
[hintLab mas_makeConstraints:^(MASConstraintMaker *make) { [hintLab mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
_hintPrefixLab.textColor = kColorWithRGB(243, 44, 44); _hintPrefixLab.textColor = kColorWithRGB(243, 44, 44);
_hintLab.textColor = _hintPrefixLab.textColor; _hintLab.textColor = _hintPrefixLab.textColor;
} else if (style == 1) { } else if (style == 1) {
_hintPrefixLab.text = @"注:"; _hintPrefixLab.text = kLocalizedString(@"friend_note");
_hintPrefixLab.textColor = kColorWithRGB(153, 153, 153); _hintPrefixLab.textColor = kColorWithRGB(153, 153, 153);
_hintLab.textColor = _hintPrefixLab.textColor; _hintLab.textColor = _hintPrefixLab.textColor;
}else{ }else{
...@@ -215,8 +215,8 @@ ...@@ -215,8 +215,8 @@
} }
if ([phone isEqualToString:[ZJUserInfoManager shared].userInfoModel.phoneNo]){ if ([phone isEqualToString:[ZJUserInfoManager shared].userInfoModel.phoneNo]){
[self.addBtn setTitle:@"自己" forState:0]; [self.addBtn setTitle:kLocalizedString(@"myself") forState:0];
[self.addBtn setTitle:@"自己" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"myself") forState:UIControlStateSelected];
self.addBtn.selected = YES; self.addBtn.selected = YES;
self.addBtn.userInteractionEnabled = NO; self.addBtn.userInteractionEnabled = NO;
self.addBtn.backgroundColor = kColorWithRGB(221, 221, 221); self.addBtn.backgroundColor = kColorWithRGB(221, 221, 221);
...@@ -239,12 +239,12 @@ ...@@ -239,12 +239,12 @@
switch (status) { switch (status) {
case 0: case 0:
[self.addBtn setTitle:@"微信邀请" forState:0]; [self.addBtn setTitle:kLocalizedString(@"care_invite_facebook") forState:0];
[self.addBtn setTitle:@"微信邀请" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"care_invite_facebook") forState:UIControlStateSelected];
self.addBtn.selected = NO; self.addBtn.selected = NO;
if(![ZJShareManager installed]){ if(![ZJShareManager installed]){
[self.addBtn setTitle:@"邀请好友" forState:0]; [self.addBtn setTitle:kLocalizedString(@"care_invite_friends") forState:0];
[self.addBtn setTitle:@"邀请好友" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"care_invite_friends") forState:UIControlStateSelected];
} }
break; break;
case 1: case 1:
...@@ -253,8 +253,8 @@ ...@@ -253,8 +253,8 @@
self.addBtn.selected = NO; self.addBtn.selected = NO;
break; break;
case 2: case 2:
[self.addBtn setTitle:@"自己" forState:0]; [self.addBtn setTitle:kLocalizedString(@"myself") forState:0];
[self.addBtn setTitle:@"自己" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"myself") forState:UIControlStateSelected];
self.addBtn.selected = YES; self.addBtn.selected = YES;
self.addBtn.backgroundColor = kColorWithRGB(221, 221, 221); self.addBtn.backgroundColor = kColorWithRGB(221, 221, 221);
break; break;
...@@ -266,8 +266,8 @@ ...@@ -266,8 +266,8 @@
break; break;
default: default:
[self.addBtn setTitle:@"已发送" forState:0]; [self.addBtn setTitle:kLocalizedString(@"login_already_send_code") forState:0];
[self.addBtn setTitle:@"已发送" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"login_already_send_code") forState:UIControlStateSelected];
self.addBtn.selected = YES; self.addBtn.selected = YES;
self.addBtn.backgroundColor = kColorWithRGB(221, 221, 221); self.addBtn.backgroundColor = kColorWithRGB(221, 221, 221);
break; break;
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
[[TQNetworkTools shared] postWithAction:friendPhoneNoInvite parameters:@{@"phoneNo":phone} success:^(id _Nonnull response) { [[TQNetworkTools shared] postWithAction:friendPhoneNoInvite parameters:@{@"phoneNo":phone} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){ if([[response objectForKey:@"status"] integerValue] == 200){
[MBProgressHUD showSuccess:@"已发送邀请" toView:self.view]; [MBProgressHUD showSuccess:kLocalizedString(@"location_send_invite") toView:self.view];
}else{ }else{
[MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view]; [MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view];
} }
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
self.tianJiaButton.layer.cornerRadius = KScaleWidth(27); self.tianJiaButton.layer.cornerRadius = KScaleWidth(27);
self.tianJiaButton.layer.masksToBounds = YES; self.tianJiaButton.layer.masksToBounds = YES;
[self.tianJiaButton setImage:[UIImage imageNamed:@"编组"] forState:UIControlStateNormal]; [self.tianJiaButton setImage:[UIImage imageNamed:@"编组"] forState:UIControlStateNormal];
[self.tianJiaButton setTitle:@"添加联系人" forState:UIControlStateNormal]; [self.tianJiaButton setTitle:kLocalizedString(@"friend_add_contact") forState:UIControlStateNormal];
[self.tianJiaButton mas_makeConstraints:^(MASConstraintMaker *make) { [self.tianJiaButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.faChuButton.mas_bottom).mas_offset(KScaleWidth(23)); make.top.equalTo(self.faChuButton.mas_bottom).mas_offset(KScaleWidth(23));
make.centerX.equalTo(self.view); make.centerX.equalTo(self.view);
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
}]; }];
UILabel * titleLabel = [[UILabel alloc] init]; UILabel * titleLabel = [[UILabel alloc] init];
titleLabel.text = @"好友设置"; titleLabel.text = kLocalizedString(@"friend_setting");
titleLabel.textColor = kColorWithRGB(33, 33, 33); titleLabel.textColor = kColorWithRGB(33, 33, 33);
titleLabel.font = [UIFont systemFontOfSize:KFont(17)]; titleLabel.font = [UIFont systemFontOfSize:KFont(17)];
titleLabel.textAlignment = NSTextAlignmentCenter; titleLabel.textAlignment = NSTextAlignmentCenter;
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
make.height.mas_equalTo(KScaleWidth(1)); make.height.mas_equalTo(KScaleWidth(1));
}]; }];
NSArray * titleArr = @[@"手机号", @"昵称", @"到达/离开地点提醒", @"好友关系"]; NSArray * titleArr = @[kLocalizedString(@"friend_phone"), kLocalizedString(@"Nickname"), kLocalizedString(@"friend_reminder"), kLocalizedString(@"friend_Friendship")];
NSMutableArray * customViewArr = [NSMutableArray new]; NSMutableArray * customViewArr = [NSMutableArray new];
CGFloat start = KScaleWidth(57); CGFloat start = KScaleWidth(57);
CGFloat interval = KScaleWidth(55); CGFloat interval = KScaleWidth(55);
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
nickTextField = customViewArr[1]; nickTextField = customViewArr[1];
nickTextField.text = @""; nickTextField.text = @"";
nickTextField.placeholder = @"点击输入你对他的称呼"; nickTextField.placeholder = kLocalizedString(@"friend_click_name");
nickTextField.delegate = self; nickTextField.delegate = self;
nickTextField.font = [UIFont systemFontOfSize:KFont(14)]; nickTextField.font = [UIFont systemFontOfSize:KFont(14)];
nickTextField.textAlignment = NSTextAlignmentRight; nickTextField.textAlignment = NSTextAlignmentRight;
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
//提示Label //提示Label
_tiShiLabel = [UILabel labelWithtext:@"好友设置" font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter]; _tiShiLabel = [UILabel labelWithtext:kLocalizedString(@"friend_setting") font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter];
//加粗 //加粗
_tiShiLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:17]; _tiShiLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:17];
[_beiJingView addSubview:_tiShiLabel]; [_beiJingView addSubview:_tiShiLabel];
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
}]; }];
//shouJiLabel //shouJiLabel
_shouJiLabel = [UILabel labelWithtext:@"手机号" font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft]; _shouJiLabel = [UILabel labelWithtext:kLocalizedString(@"friend_phone") font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft];
[_beiJingView addSubview:_shouJiLabel]; [_beiJingView addSubview:_shouJiLabel];
[_shouJiLabel mas_makeConstraints:^(MASConstraintMaker *make) { [_shouJiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(_hengXianView.mas_bottom).mas_offset(KScaleWidth(20)); make.top.mas_equalTo(_hengXianView.mas_bottom).mas_offset(KScaleWidth(20));
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
}]; }];
//_niChengNumLabel //_niChengNumLabel
_niChengNumLabel = [UILabel labelWithtext:@"昵称" font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft]; _niChengNumLabel = [UILabel labelWithtext:kLocalizedString(@"Nickname") font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft];
[_beiJingView addSubview:_niChengNumLabel]; [_beiJingView addSubview:_niChengNumLabel];
[_niChengNumLabel mas_makeConstraints:^(MASConstraintMaker *make) { [_niChengNumLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(hengXianView2.mas_bottom).mas_offset(KScaleWidth(20)); make.top.mas_equalTo(hengXianView2.mas_bottom).mas_offset(KScaleWidth(20));
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
//niChengTextField //niChengTextField
_niChengTextField = [[UITextField alloc] init]; _niChengTextField = [[UITextField alloc] init];
[_beiJingView addSubview:_niChengTextField]; [_beiJingView addSubview:_niChengTextField];
_niChengTextField.placeholder = @"点击输入你对他的称呼"; _niChengTextField.placeholder = kLocalizedString(@"friend_click_name");
_niChengTextField.font = [UIFont systemFontOfSize:14]; _niChengTextField.font = [UIFont systemFontOfSize:14];
_niChengTextField.textColor = [UIColor colorWithHex:0x999999]; _niChengTextField.textColor = [UIColor colorWithHex:0x999999];
_niChengTextField.delegate = self; _niChengTextField.delegate = self;
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
}]; }];
//_diDianLabel //_diDianLabel
_diDianLabel = [UILabel labelWithtext:@"到达/离开地点提醒" font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft]; _diDianLabel = [UILabel labelWithtext:kLocalizedString(@"friend_reminder") font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft];
[_beiJingView addSubview:_diDianLabel]; [_beiJingView addSubview:_diDianLabel];
[_diDianLabel mas_makeConstraints:^(MASConstraintMaker *make) { [_diDianLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(hengXianView3.mas_bottom).mas_offset(KScaleWidth(20)); make.top.mas_equalTo(hengXianView3.mas_bottom).mas_offset(KScaleWidth(20));
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
}]; }];
//_guanxiLabel //_guanxiLabel
_guanXiLabel = [UILabel labelWithtext:@"好友关系" font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft]; _guanXiLabel = [UILabel labelWithtext:kLocalizedString(@"friend_Friendship") font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentLeft];
[_beiJingView addSubview:_guanXiLabel]; [_beiJingView addSubview:_guanXiLabel];
[_guanXiLabel mas_makeConstraints:^(MASConstraintMaker *make) { [_guanXiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(hengXianView4.mas_bottom).mas_offset(KScaleWidth(20)); make.top.mas_equalTo(hengXianView4.mas_bottom).mas_offset(KScaleWidth(20));
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
}]; }];
//nameLabel //nameLabel
self.nameLabel = [UILabel labelWithtext:@"我自己" font:[UIFont systemFontOfSize:KFont(16)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter]; self.nameLabel = [UILabel labelWithtext:kLocalizedString(@"myself_style2") font:[UIFont systemFontOfSize:KFont(16)] textColor:[UIColor colorWithHex:0x222222] alignment:NSTextAlignmentCenter];
self.nameLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:16]; self.nameLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:16];
[imageView addSubview:self.nameLabel]; [imageView addSubview:self.nameLabel];
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
NSLog(@"%@", [ZJUserInfoManager shared].userInfoModel.headImage); NSLog(@"%@", [ZJUserInfoManager shared].userInfoModel.headImage);
[self.touXiangImageView sd_setImageWithURL:[NSURL URLWithString:[ZJUserInfoManager shared].userInfoModel.headImage] placeholderImage:[UIImage imageNamed:@"矢量智能对象(1)"]]; [self.touXiangImageView sd_setImageWithURL:[NSURL URLWithString:[ZJUserInfoManager shared].userInfoModel.headImage] placeholderImage:[UIImage imageNamed:@"矢量智能对象(1)"]];
self.nameLabel.text = @"我自己"; self.nameLabel.text = kLocalizedString(@"myself_style2");
self.timeLabel.text = model.lastSyncTime; self.timeLabel.text = model.lastSyncTime;
self.weiZhiLabel.text = model.address; self.weiZhiLabel.text = model.address;
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}]; }];
UILabel * titleLabel = [[UILabel alloc] init]; UILabel * titleLabel = [[UILabel alloc] init];
titleLabel.text = @"未解锁该功能!马上解锁开启好友\n实时位置和历史记录等功能吧~"; titleLabel.text = kLocalizedString(@"friend_lock_hint");
titleLabel.textColor = kColorWithRGB(22, 22, 22); titleLabel.textColor = kColorWithRGB(22, 22, 22);
titleLabel.font = [UIFont systemFontOfSize:KFont(14)]; titleLabel.font = [UIFont systemFontOfSize:KFont(14)];
titleLabel.textAlignment = NSTextAlignmentCenter; titleLabel.textAlignment = NSTextAlignmentCenter;
......
...@@ -21,19 +21,19 @@ ...@@ -21,19 +21,19 @@
<rect key="frame" x="36" y="359" width="342" height="178"/> <rect key="frame" x="36" y="359" width="342" height="178"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="对方该时间段未收录位置信息" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hoz-Eb-z9r"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="对方该时间段未收录位置信息" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hoz-Eb-z9r">
<rect key="frame" x="28" y="30" width="286" height="21.5"/> <rect key="frame" x="28" y="26" width="286" height="21.5"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请确定对方是否授权Family Mapp位置权限" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RiW-bm-Ym2"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="请确定对方是否授权Family Mapp位置权限" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RiW-bm-Ym2">
<rect key="frame" x="10" y="63.5" width="322" height="17"/> <rect key="frame" x="10" y="59.5" width="322" height="54.5"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cZn-YZ-lp6"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cZn-YZ-lp6">
<rect key="frame" x="26" y="110.5" width="137" height="44"/> <rect key="frame" x="26" y="124" width="137" height="44"/>
<color key="backgroundColor" red="0.96861571069999997" green="0.96862143280000002" blue="0.96863609549999996" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> <color key="backgroundColor" red="0.96861571069999997" green="0.96862143280000002" blue="0.96863609549999996" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="44" id="EBF-wW-f5n"/> <constraint firstAttribute="height" constant="44" id="EBF-wW-f5n"/>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="e2s-u7-pzI"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="e2s-u7-pzI">
<rect key="frame" x="179" y="110.5" width="137" height="44"/> <rect key="frame" x="179" y="124" width="137" height="44"/>
<color key="backgroundColor" red="0.37147963049999999" green="0.54078811410000005" blue="0.96867829559999996" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> <color key="backgroundColor" red="0.37147963049999999" green="0.54078811410000005" blue="0.96867829559999996" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<state key="normal" title="知道了"> <state key="normal" title="知道了">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
...@@ -65,18 +65,18 @@ ...@@ -65,18 +65,18 @@
<constraint firstItem="RiW-bm-Ym2" firstAttribute="top" secondItem="hoz-Eb-z9r" secondAttribute="bottom" constant="12" id="3fw-vL-IfG"/> <constraint firstItem="RiW-bm-Ym2" firstAttribute="top" secondItem="hoz-Eb-z9r" secondAttribute="bottom" constant="12" id="3fw-vL-IfG"/>
<constraint firstItem="e2s-u7-pzI" firstAttribute="height" secondItem="cZn-YZ-lp6" secondAttribute="height" id="5Cc-n5-97g"/> <constraint firstItem="e2s-u7-pzI" firstAttribute="height" secondItem="cZn-YZ-lp6" secondAttribute="height" id="5Cc-n5-97g"/>
<constraint firstAttribute="trailing" secondItem="hoz-Eb-z9r" secondAttribute="trailing" constant="28" id="Eds-19-Iyh"/> <constraint firstAttribute="trailing" secondItem="hoz-Eb-z9r" secondAttribute="trailing" constant="28" id="Eds-19-Iyh"/>
<constraint firstItem="hoz-Eb-z9r" firstAttribute="top" secondItem="CGI-ke-b0A" secondAttribute="top" constant="30" id="Hoy-S8-QSV"/> <constraint firstItem="hoz-Eb-z9r" firstAttribute="top" secondItem="CGI-ke-b0A" secondAttribute="top" constant="26" id="Hoy-S8-QSV"/>
<constraint firstItem="RiW-bm-Ym2" firstAttribute="leading" secondItem="CGI-ke-b0A" secondAttribute="leading" constant="10" id="Kuz-rQ-kh6"/> <constraint firstItem="RiW-bm-Ym2" firstAttribute="leading" secondItem="CGI-ke-b0A" secondAttribute="leading" constant="10" id="Kuz-rQ-kh6"/>
<constraint firstAttribute="trailing" secondItem="e2s-u7-pzI" secondAttribute="trailing" constant="26" id="QtK-IE-Nj7"/> <constraint firstAttribute="trailing" secondItem="e2s-u7-pzI" secondAttribute="trailing" constant="26" id="QtK-IE-Nj7"/>
<constraint firstItem="e2s-u7-pzI" firstAttribute="top" secondItem="RiW-bm-Ym2" secondAttribute="bottom" constant="30" id="R8G-yq-VZf"/> <constraint firstItem="e2s-u7-pzI" firstAttribute="top" relation="lessThanOrEqual" secondItem="RiW-bm-Ym2" secondAttribute="bottom" constant="10" id="R8G-yq-VZf"/>
<constraint firstItem="e2s-u7-pzI" firstAttribute="width" secondItem="cZn-YZ-lp6" secondAttribute="width" id="RTv-E3-fjO"/> <constraint firstItem="e2s-u7-pzI" firstAttribute="width" secondItem="cZn-YZ-lp6" secondAttribute="width" id="RTv-E3-fjO"/>
<constraint firstAttribute="trailing" secondItem="RiW-bm-Ym2" secondAttribute="trailing" constant="10" id="XRT-y6-ggA"/> <constraint firstAttribute="trailing" secondItem="RiW-bm-Ym2" secondAttribute="trailing" constant="10" id="XRT-y6-ggA"/>
<constraint firstItem="hoz-Eb-z9r" firstAttribute="leading" secondItem="CGI-ke-b0A" secondAttribute="leading" constant="28" id="a2J-P8-Hjc"/> <constraint firstItem="hoz-Eb-z9r" firstAttribute="leading" secondItem="CGI-ke-b0A" secondAttribute="leading" constant="28" id="a2J-P8-Hjc"/>
<constraint firstAttribute="height" constant="178" id="dvZ-VX-JJ4"/> <constraint firstAttribute="height" constant="178" id="dvZ-VX-JJ4"/>
<constraint firstItem="e2s-u7-pzI" firstAttribute="leading" secondItem="cZn-YZ-lp6" secondAttribute="trailing" constant="16" id="fpW-9Y-gyK"/> <constraint firstItem="e2s-u7-pzI" firstAttribute="leading" secondItem="cZn-YZ-lp6" secondAttribute="trailing" constant="16" id="fpW-9Y-gyK"/>
<constraint firstItem="cZn-YZ-lp6" firstAttribute="leading" secondItem="CGI-ke-b0A" secondAttribute="leading" constant="26" id="gTn-dv-w2c"/> <constraint firstItem="cZn-YZ-lp6" firstAttribute="leading" secondItem="CGI-ke-b0A" secondAttribute="leading" constant="26" id="gTn-dv-w2c"/>
<constraint firstItem="cZn-YZ-lp6" firstAttribute="top" secondItem="RiW-bm-Ym2" secondAttribute="bottom" constant="30" id="hvi-vf-4z3"/> <constraint firstAttribute="bottom" secondItem="cZn-YZ-lp6" secondAttribute="bottom" constant="10" id="kuO-cG-xYR"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="cZn-YZ-lp6" secondAttribute="bottom" constant="4" id="kuO-cG-xYR"/> <constraint firstItem="e2s-u7-pzI" firstAttribute="centerY" secondItem="cZn-YZ-lp6" secondAttribute="centerY" id="paQ-pj-jEg"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
......
...@@ -20,9 +20,11 @@ class ZJLocationVC: UIViewController { ...@@ -20,9 +20,11 @@ class ZJLocationVC: UIViewController {
@IBOutlet weak var detailsLab_3: UILabel! @IBOutlet weak var detailsLab_3: UILabel!
@IBOutlet weak var detailsLab_4: UILabel! @IBOutlet weak var detailsLab_4: UILabel!
@IBOutlet weak var detailsLab_Imv: UIImageView!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
title = "定位Ta教程" title = NSLocalizedString("location_tutorial_location", comment: "")
detailsLab_0.text = NSLocalizedString("location_alert_details_0", comment: "") detailsLab_0.text = NSLocalizedString("location_alert_details_0", comment: "")
detailsLab_1.text = NSLocalizedString("location_alert_details_1", comment: "") detailsLab_1.text = NSLocalizedString("location_alert_details_1", comment: "")
...@@ -31,6 +33,8 @@ class ZJLocationVC: UIViewController { ...@@ -31,6 +33,8 @@ class ZJLocationVC: UIViewController {
detailsLab_4.text = NSLocalizedString("location_alert_details_4", comment: "") detailsLab_4.text = NSLocalizedString("location_alert_details_4", comment: "")
shareAppButton.setTitle(NSLocalizedString("location_alert_share", comment: ""), for: .normal) shareAppButton.setTitle(NSLocalizedString("location_alert_share", comment: ""), for: .normal)
detailsLab_Imv.image = UIImage.init(named: NSLocalizedString("showLocationInfo", comment: ""))
self.shareAppButton.addTarget(self, action: #selector(shareApp), for: .touchUpInside) self.shareAppButton.addTarget(self, action: #selector(shareApp), for: .touchUpInside)
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<outlet property="detailsLab_2" destination="YK4-n6-cGm" id="rnz-K5-h5b"/> <outlet property="detailsLab_2" destination="YK4-n6-cGm" id="rnz-K5-h5b"/>
<outlet property="detailsLab_3" destination="V3d-Sr-7wE" id="FWd-BE-7Hg"/> <outlet property="detailsLab_3" destination="V3d-Sr-7wE" id="FWd-BE-7Hg"/>
<outlet property="detailsLab_4" destination="46g-dc-NS9" id="LWb-y4-lcQ"/> <outlet property="detailsLab_4" destination="46g-dc-NS9" id="LWb-y4-lcQ"/>
<outlet property="detailsLab_Imv" destination="eCq-Sh-7TY" id="c3w-vx-bqf"/>
<outlet property="shareAppButton" destination="22h-Ja-XjZ" id="MD0-h8-Kho"/> <outlet property="shareAppButton" destination="22h-Ja-XjZ" id="MD0-h8-Kho"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
...@@ -98,7 +99,7 @@ mbvlvZUDA ...@@ -98,7 +99,7 @@ mbvlvZUDA
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="showLocationInfo" translatesAutoresizingMaskIntoConstraints="NO" id="eCq-Sh-7TY"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="showLocationInfo" translatesAutoresizingMaskIntoConstraints="NO" id="eCq-Sh-7TY">
<rect key="frame" x="34.5" y="229" width="345" height="285.5"/> <rect key="frame" x="34.5" y="229" width="345" height="190"/>
</imageView> </imageView>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
...@@ -138,6 +139,6 @@ mbvlvZUDA ...@@ -138,6 +139,6 @@ mbvlvZUDA
</view> </view>
</objects> </objects>
<resources> <resources>
<image name="showLocationInfo" width="290.5" height="285.5"/> <image name="showLocationInfo" width="193.33332824707031" height="190"/>
</resources> </resources>
</document> </document>
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#import "ZJAreaCodeModel.h" #import "ZJAreaCodeModel.h"
#import "ZJAreaCodeCell.h" #import "ZJAreaCodeCell.h"
#import "ZYPinYinSearch.h" #import "ZYPinYinSearch.h"
#import "ZJUserInfoManager.h"
#import "UIImageView+WebCache.h"
@interface ZJAreaCodeSearchVC ()<UITableViewDataSource,UITableViewDelegate,UISearchBarDelegate,UISearchDisplayDelegate>{ @interface ZJAreaCodeSearchVC ()<UITableViewDataSource,UITableViewDelegate,UISearchBarDelegate,UISearchDisplayDelegate>{
BOOL isShow; BOOL isShow;
...@@ -41,53 +43,26 @@ ...@@ -41,53 +43,26 @@
} }
- (void)reviceDataSourse{ - (void)reviceDataSourse{
_dataSourceArr = [[NSMutableArray alloc] init]; _dataSourceArr = [ZJUserInfoManager shared].countryCodes.mutableCopy;
// [[IRBHttpRequest manager] httpRequestWithUrl:BASEURL body:[@{@"busiNo":@"106", @"type":@"0",@"userId":[[self.data Read] objectForKey:@"userId"]} mutableCopy] success:^(id responseObject, NSDictionary *responseDic) { if (!_dataSourceArr) {
// _dataSourceArr = [[NSMutableArray alloc] init];
// NSData * decryptData =[[responseDic objectForKey:@"list"] dataUsingEncoding:NSUTF8StringEncoding]; NSArray * countryCodeArr = [[self.data Read] objectForKey:@"countryCodes"];
// for (NSDictionary * dic in countryCodeArr) {
// NSMutableArray * bankArr = [NSJSONSerialization JSONObjectWithData:decryptData options:NSJSONReadingMutableContainers error:nil]; ZJAreaCodeModel * model = [ZJAreaCodeModel new];
// [model setValuesForKeysWithDictionary:dic];
// for (NSDictionary * dic in bankArr) { [_dataSourceArr addObject:model];
// Bank * bank = [Bank new]; }
// [bank setValuesForKeysWithDictionary:dic]; }
// [_dataSourceArr addObject:bank];
// }
ZJAreaCodeModel * model = [ZJAreaCodeModel new];
model.code = @"1";
model.codeName = @"adasd";
ZJAreaCodeModel * mode2 = [ZJAreaCodeModel new];
mode2.code = @"22";
mode2.codeName = @"asdasda";
ZJAreaCodeModel * mode3 = [ZJAreaCodeModel new];
mode3.code = @"333";
mode3.codeName = @"bvcnbvn";
ZJAreaCodeModel * mode4= [ZJAreaCodeModel new];
mode4.code = @"444";
mode4.codeName = @"werwer";
ZJAreaCodeModel * mode5 = [ZJAreaCodeModel new];
mode5.code = @"555";
mode5.codeName = @"uiouio";
ZJAreaCodeModel * model6 = [ZJAreaCodeModel new];
model6.code = @"666";
model6.codeName = @"qqw";
_dataSourceArr = @[model, mode2, mode3, mode4, mode5, model6].mutableCopy;
_searchDataSource = [NSMutableArray new]; _searchDataSource = [NSMutableArray new];
//对原数据进行排序重新分组 //对原数据进行排序重新分组
_allDataSource = [HCSortString sortAndGroupForArray:_dataSourceArr PropertyName:@"codeName"]; _allDataSource = [HCSortString sortAndGroupForArray:_dataSourceArr PropertyName:[ZJUserInfoManager CNLanguage] ? @"chineseName" : @"englishName"];
//获取索引的首字母 //获取索引的首字母
_indexDataSource = [HCSortString sortForStringAry:[_allDataSource allKeys]]; _indexDataSource = [HCSortString sortForStringAry:[_allDataSource allKeys]];
[_tableView reloadData]; [_tableView reloadData];
// } failure:^(NSString *errorMsg) {
//
// }];
} }
- (void)setupTableBiew{ - (void)setupTableBiew{
...@@ -200,13 +175,13 @@ ...@@ -200,13 +175,13 @@
if (isShow) { if (isShow) {
NSArray *value = [_allDataSource objectForKey:_indexDataSource[indexPath.section]]; NSArray *value = [_allDataSource objectForKey:_indexDataSource[indexPath.section]];
cell.codelab.text = ((ZJAreaCodeModel *)value[indexPath.row]).code; cell.codelab.text = [NSString stringWithFormat:@"+%@", ((ZJAreaCodeModel *)value[indexPath.row]).phoneCode];
cell.arealab.text = ((ZJAreaCodeModel *)value[indexPath.row]).codeName; cell.arealab.text = [ZJUserInfoManager CNLanguage] ? ((ZJAreaCodeModel *)value[indexPath.row]).chineseName : ((ZJAreaCodeModel *)value[indexPath.row]).englishName;
cell.areaImV.backgroundColor = [UIColor redColor]; [cell.areaImV sd_setImageWithURL:[NSURL URLWithString:((ZJAreaCodeModel *)value[indexPath.row]).imageUrl]];
}else{ }else{
cell.codelab.text = ((ZJAreaCodeModel *)_searchDataSource[indexPath.row]).code; cell.codelab.text = [NSString stringWithFormat:@"+%@", ((ZJAreaCodeModel *)_searchDataSource[indexPath.row]).phoneCode];
cell.arealab.text = ((ZJAreaCodeModel *)_searchDataSource[indexPath.row]).codeName; cell.arealab.text = [ZJUserInfoManager CNLanguage] ? ((ZJAreaCodeModel *)_searchDataSource[indexPath.row]).chineseName : ((ZJAreaCodeModel *)_searchDataSource[indexPath.row]).englishName;
cell.areaImV.backgroundColor = [UIColor redColor]; [cell.areaImV sd_setImageWithURL:[NSURL URLWithString:((ZJAreaCodeModel *)_searchDataSource[indexPath.row]).imageUrl]];
} }
cell.textLabel.adjustsFontSizeToFitWidth = YES; cell.textLabel.adjustsFontSizeToFitWidth = YES;
...@@ -227,9 +202,9 @@ ...@@ -227,9 +202,9 @@
}else{ }else{
model = _searchDataSource[indexPath.row]; model = _searchDataSource[indexPath.row];
} }
if (_areaCodeCallBack) { if (_areaCodeCallBack) {
_areaCodeCallBack(model.code); _areaCodeCallBack([NSString stringWithFormat:@"+%@", model.phoneCode]);
} }
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
...@@ -245,7 +220,7 @@ ...@@ -245,7 +220,7 @@
[_searchDataSource addObjectsFromArray:ary]; [_searchDataSource addObjectsFromArray:ary];
}else { }else {
isShow = NO; isShow = NO;
ary = [ZYPinYinSearch searchWithOriginalArray:ary andSearchText:searchText andSearchByPropertyName:@"codeName"]; ary = [ZYPinYinSearch searchWithOriginalArray:ary andSearchText:searchText andSearchByPropertyName:[ZJUserInfoManager CNLanguage] ? @"chineseName" : @"englishName"];
[_searchDataSource addObjectsFromArray:ary]; [_searchDataSource addObjectsFromArray:ary];
} }
[self.tableView reloadData]; [self.tableView reloadData];
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
BOOL isSend;//验证码发送 BOOL isSend;//验证码发送
dispatch_source_t timer; dispatch_source_t timer;
NSString * currentCountryCode;
} }
@end @end
...@@ -106,9 +107,16 @@ ...@@ -106,9 +107,16 @@
make.top.bottom.left.right.mas_equalTo(phoneTFBgView); make.top.bottom.left.right.mas_equalTo(phoneTFBgView);
}]; }];
UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(58), KScaleWidth(50))]; UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(64), KScaleWidth(50))];
UIButton * areaCodeBtn = [[UIButton alloc] initWithFrame:leftView.frame]; UIButton * areaCodeBtn = [[UIButton alloc] initWithFrame:leftView.frame];
[areaCodeBtn setTitle:@"+86" forState:(UIControlStateNormal)]; areaCodeBtn.titleLabel.adjustsFontSizeToFitWidth = YES;
if ([[self.data Read] objectForKey:@"currentCountryCode"]) {
currentCountryCode = [[self.data Read] objectForKey:@"currentCountryCode"];
[areaCodeBtn setTitle:[NSString stringWithFormat:@"%@", [[self.data Read] objectForKey:@"currentCountryCode"]] forState:(UIControlStateNormal)];
}else{
currentCountryCode = @"+86";
[areaCodeBtn setTitle:@"+86" forState:(UIControlStateNormal)];
}
[areaCodeBtn setTitleColor:kColorWithRGB(33, 33, 33) forState:(UIControlStateNormal)]; [areaCodeBtn setTitleColor:kColorWithRGB(33, 33, 33) forState:(UIControlStateNormal)];
[areaCodeBtn addTarget:self action:@selector(areaBtnClick:) forControlEvents:(UIControlEventTouchUpInside)]; [areaCodeBtn addTarget:self action:@selector(areaBtnClick:) forControlEvents:(UIControlEventTouchUpInside)];
[leftView addSubview:areaCodeBtn]; [leftView addSubview:areaCodeBtn];
...@@ -217,7 +225,9 @@ ...@@ -217,7 +225,9 @@
[self.navigationController pushViewController:search animated:YES]; [self.navigationController pushViewController:search animated:YES];
search.areaCodeCallBack = ^(NSString * _Nonnull code) { search.areaCodeCallBack = ^(NSString * _Nonnull code) {
[sender setTitle:code forState:(UIControlStateNormal)]; [self.data WirteDic:code Key:@"currentCountryCode"];
[sender setTitle:[NSString stringWithFormat:@"%@", code] forState:(UIControlStateNormal)];
self->currentCountryCode = code;
}; };
} }
...@@ -255,7 +265,12 @@ ...@@ -255,7 +265,12 @@
[self logCollection]; [self logCollection];
[[TQNetworkTools shared] postWithAction:loginWithPhone parameters:@{@"phoneNo":phoneTextfield.text, @"code":codeTextfield.text} success:^(id _Nonnull response) { // NSString * phone = [NSString stringWithFormat:@"%@ %@", currentCountryCode, phoneTextfield.text];
NSString * phone = [NSString stringWithFormat:@"%@", phoneTextfield.text];
NSString *encodedString = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)phone, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8));
[[TQNetworkTools shared] postWithAction:loginWithPhone parameters:@{@"phoneNo":encodedString, @"code":codeTextfield.text} success:^(id _Nonnull response) {
NSLog(@"---------------loginWithPhone %@", response); NSLog(@"---------------loginWithPhone %@", response);
...@@ -281,7 +296,7 @@ ...@@ -281,7 +296,7 @@
} }
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
NSLog(@"loginWithPhone 失败 %@", error); NSLog(@"loginWithPhone error %@", error);
}]; }];
} }
...@@ -298,12 +313,18 @@ ...@@ -298,12 +313,18 @@
[self removeKeyBoard]; [self removeKeyBoard];
[[TQNetworkTools shared] postWithAction:getSmsCode parameters:@{@"phoneNo":phoneTextfield.text} success:^(id _Nonnull response) { // NSString * phone = [NSString stringWithFormat:@"%@ %@", currentCountryCode, phoneTextfield.text];
NSString * phone = [NSString stringWithFormat:@"%@", phoneTextfield.text];
NSString *encodedString = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)phone, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8));
[[TQNetworkTools shared] postWithAction:getSmsCode parameters:@{@"phoneNo":encodedString} success:^(id _Nonnull response) {
// self->isSend = YES; // self->isSend = YES;
NSLog(@"getSmsCode response %@", response); NSLog(@"getSmsCode response %@", response);
[self countDown:sender]; [self countDown:sender];
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
NSLog(@"loginWithPhone 失败 %@", error); NSLog(@"loginWithPhone error %@", error);
}]; }];
} }
...@@ -315,7 +336,7 @@ ...@@ -315,7 +336,7 @@
dispatch_source_set_event_handler(timer, ^{ dispatch_source_set_event_handler(timer, ^{
if (count >= 0) { if (count >= 0) {
NSString * countStr = [NSString stringWithFormat:@"已发送%ds",count]; NSString * countStr = [NSString stringWithFormat:@"%@%ds", kLocalizedString(@"login_already_send_code"), count];
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[sender setTitle:countStr forState:UIControlStateNormal]; [sender setTitle:countStr forState:UIControlStateNormal];
[sender setTitleColor:kColorWithRGB(153, 153, 153) forState:UIControlStateNormal]; [sender setTitleColor:kColorWithRGB(153, 153, 153) forState:UIControlStateNormal];
...@@ -325,7 +346,7 @@ ...@@ -325,7 +346,7 @@
count--; count--;
}else{ }else{
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[sender setTitle:@"重新发送" forState:UIControlStateNormal]; [sender setTitle:kLocalizedString(@"login_send_code_again") forState:UIControlStateNormal];
[sender setTitleColor:kColorWithRGB(85, 142, 252) forState:UIControlStateNormal]; [sender setTitleColor:kColorWithRGB(85, 142, 252) forState:UIControlStateNormal];
sender.titleLabel.textColor = kColorWithRGB(85, 142, 252); sender.titleLabel.textColor = kColorWithRGB(85, 142, 252);
sender.layer.borderColor = sender.titleLabel.textColor.CGColor; sender.layer.borderColor = sender.titleLabel.textColor.CGColor;
......
...@@ -12,9 +12,12 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -12,9 +12,12 @@ NS_ASSUME_NONNULL_BEGIN
@interface ZJAreaCodeModel : BaseModel @interface ZJAreaCodeModel : BaseModel
@property(nonatomic, copy) NSString * code; @property(nonatomic, copy) NSString * chineseName;
@property(nonatomic, copy) NSString * codeName; @property(nonatomic, copy) NSString * countryCode;
@property(nonatomic, copy) NSString * areaUrl; @property(nonatomic, copy) NSString * englishName;
@property(nonatomic, copy) NSString * id;
@property(nonatomic, copy) NSString * imageUrl;
@property(nonatomic, copy) NSString * phoneCode;
@end @end
......
...@@ -112,15 +112,15 @@ ...@@ -112,15 +112,15 @@
- (void)uploadLog:(NSInteger)index{ - (void)uploadLog:(NSInteger)index{
NSArray * array = @[@"我关心的人", @"定位", @"我的"]; NSArray * array = @[@"我关心的人", @"定位", @"我的"];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"tab_imp", @"tab_imp": array[index]}.mutableCopy; NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"tab_imp", @"tab_imp": array[index]}.mutableCopy;
[[TQNetworkTools shared] postWithLogCollection:logCollection parameters: dict success:^(__autoreleasing id *response) { [[TQNetworkTools shared] postWithLogCollection:logCollection parameters: dict success:^(__autoreleasing id *response) {
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
}]; }];
} }
- (void)setDYTSelectIndex:(DYTTabBarIndex)DYTSelectIndex { - (void)setDYTSelectIndex:(DYTTabBarIndex)DYTSelectIndex {
......
...@@ -93,6 +93,27 @@ ...@@ -93,6 +93,27 @@
}; };
} }
- (void)mapView:(UIView *)mapView regionDidChangeAnimated:(BOOL)animated {
// if(mapView.isHidden) {
// return;
// }
//
// if(self.isSwitching) {
// self.isSwitching = NO;
// return;
// }
//
if([mapView isKindOfClass:[MAMapView class]]) {
if(!AMapDataAvailableForCoordinate(self.mapView.centerCoordinate)) {
}
} else {
if(AMapDataAvailableForCoordinate(self.mapView.centerCoordinate)) {
}
}
}
#pragma mark 好友列表 #pragma mark 好友列表
- (void)getFriendList{ - (void)getFriendList{
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
UIView * rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(98), KScaleWidth(46))]; UIView * rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScaleWidth(98), KScaleWidth(46))];
self.addBtn = [[UIButton alloc] initWithFrame:rightView.bounds]; self.addBtn = [[UIButton alloc] initWithFrame:rightView.bounds];
self.addBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(16)]; self.addBtn.titleLabel.font = [UIFont systemFontOfSize:KFont(16)];
[self.addBtn setTitle:@"定位TA" forState:(UIControlStateNormal)]; [self.addBtn setTitle:kLocalizedString(@"location_friend") forState:(UIControlStateNormal)];
[self.addBtn setTitle:@"定位TA" forState:(UIControlStateSelected)]; [self.addBtn setTitle:kLocalizedString(@"location_friend") forState:(UIControlStateSelected)];
[self.addBtn setTitleColor:kColorWithRGB(82, 139, 255) forState:UIControlStateNormal]; [self.addBtn setTitleColor:kColorWithRGB(82, 139, 255) forState:UIControlStateNormal];
[self.addBtn setTitleColor:kColorWithRGB(153, 153, 153) forState:UIControlStateSelected]; [self.addBtn setTitleColor:kColorWithRGB(153, 153, 153) forState:UIControlStateSelected];
[self.addBtn addTarget:self action:@selector(tipsBtnClick:) forControlEvents:(UIControlEventTouchUpInside)]; [self.addBtn addTarget:self action:@selector(tipsBtnClick:) forControlEvents:(UIControlEventTouchUpInside)];
...@@ -114,14 +114,14 @@ ...@@ -114,14 +114,14 @@
self.addBtn.userInteractionEnabled = YES; self.addBtn.userInteractionEnabled = YES;
if (phone.length != 11) { if (phone.length != 11) {
[self.addBtn setTitle:@"定位TA" forState:0]; [self.addBtn setTitle:kLocalizedString(@"location_friend") forState:0];
[self.addBtn setTitle:@"定位TA" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"location_friend") forState:UIControlStateSelected];
return; return;
} }
if ([phone isEqualToString:[ZJUserInfoManager shared].userInfoModel.phoneNo]){ if ([phone isEqualToString:[ZJUserInfoManager shared].userInfoModel.phoneNo]){
[self.addBtn setTitle:@"自己" forState:0]; [self.addBtn setTitle:kLocalizedString(@"myself") forState:0];
[self.addBtn setTitle:@"自己" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"myself") forState:UIControlStateSelected];
self.addBtn.selected = YES; self.addBtn.selected = YES;
self.addBtn.userInteractionEnabled = NO; self.addBtn.userInteractionEnabled = NO;
return; return;
...@@ -143,22 +143,22 @@ ...@@ -143,22 +143,22 @@
switch (status) { switch (status) {
case 0: case 0:
[self.addBtn setTitle:@"微信邀请" forState:0]; [self.addBtn setTitle:kLocalizedString(@"care_invite_facebook") forState:0];
[self.addBtn setTitle:@"微信邀请" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"care_invite_facebook") forState:UIControlStateSelected];
self.addBtn.selected = NO; self.addBtn.selected = NO;
if(![ZJShareManager installed]){ if(![ZJShareManager installed]){
[self.addBtn setTitle:@"邀请好友" forState:0]; [self.addBtn setTitle:kLocalizedString(@"care_invite_friends") forState:0];
[self.addBtn setTitle:@"邀请好友" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"care_invite_friends") forState:UIControlStateSelected];
} }
break; break;
case 1: case 1:
[self.addBtn setTitle:@"定位TA" forState:0]; [self.addBtn setTitle:kLocalizedString(@"location_friend") forState:0];
[self.addBtn setTitle:@"定位TA" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"location_friend") forState:UIControlStateSelected];
self.addBtn.selected = NO; self.addBtn.selected = NO;
break; break;
case 2: case 2:
[self.addBtn setTitle:@"自己" forState:0]; [self.addBtn setTitle:kLocalizedString(@"myself") forState:0];
[self.addBtn setTitle:@"自己" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"myself") forState:UIControlStateSelected];
self.addBtn.selected = YES; self.addBtn.selected = YES;
break; break;
case 3: case 3:
...@@ -168,8 +168,8 @@ ...@@ -168,8 +168,8 @@
break; break;
default: default:
[self.addBtn setTitle:@"已发送" forState:0]; [self.addBtn setTitle:kLocalizedString(@"login_already_send_code") forState:0];
[self.addBtn setTitle:@"已发送" forState:UIControlStateSelected]; [self.addBtn setTitle:kLocalizedString(@"login_already_send_code") forState:UIControlStateSelected];
self.addBtn.selected = YES; self.addBtn.selected = YES;
break; break;
} }
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
[[TQNetworkTools shared] postWithAction:friendPhoneNoInvite parameters:@{@"phoneNo":phone} success:^(id _Nonnull response) { [[TQNetworkTools shared] postWithAction:friendPhoneNoInvite parameters:@{@"phoneNo":phone} success:^(id _Nonnull response) {
if([[response objectForKey:@"status"] integerValue] == 200){ if([[response objectForKey:@"status"] integerValue] == 200){
[MBProgressHUD showSuccess:@"已发送邀请" toView:self.view]; [MBProgressHUD showSuccess:kLocalizedString(@"location_send_invite") toView:self.view];
}else{ }else{
[MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view]; [MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view];
} }
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
make.height.mas_offset(StatusBarHeight+KScaleWidth(119)); make.height.mas_offset(StatusBarHeight+KScaleWidth(119));
}]; }];
} else if (style == 1) { } else if (style == 1) {
_hintPrefixLab.text = @"注:"; _hintPrefixLab.text = kLocalizedString(@"friend_note");
// _hintPrefixLab.textColor = kColorWithRGB(255, 255, 255); // _hintPrefixLab.textColor = kColorWithRGB(255, 255, 255);
_hintLab.textColor = _hintPrefixLab.textColor; _hintLab.textColor = _hintPrefixLab.textColor;
[self.style2BgImV mas_updateConstraints:^(MASConstraintMaker *make) { [self.style2BgImV mas_updateConstraints:^(MASConstraintMaker *make) {
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
- (void)confirmBtnClick{ - (void)confirmBtnClick{
if (phoneTextField.text.length == 11) { if (phoneTextField.text.length != 0) {
[phoneTextField resignFirstResponder]; [phoneTextField resignFirstResponder];
[self endAnimationWithDispose:YES]; [self endAnimationWithDispose:YES];
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
_phoneTFCallBack(phoneTextField.text); _phoneTFCallBack(phoneTextField.text);
} }
}else{ }else{
[MBProgressHUD showMessage:@"请正确输入手机号" toView:self]; [MBProgressHUD showMessage:kLocalizedString(@"emergency_enter_phone") toView:self];
} }
} }
......
...@@ -138,7 +138,8 @@ ...@@ -138,7 +138,8 @@
}]; }];
//gomngNengLabel //gomngNengLabel
self.gongNengLabel = [UILabel labelWithtext:@"功能未解锁" font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0xFFFFFF] alignment:NSTextAlignmentLeft]; self.gongNengLabel = [UILabel labelWithtext:kLocalizedString(@"mine_premium_services_locked") font:[UIFont systemFontOfSize:KFont(17)] textColor:[UIColor colorWithHex:0xFFFFFF] alignment:NSTextAlignmentLeft];
self.gongNengLabel.adjustsFontSizeToFitWidth = YES;
self.gongNengLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:KFont(17)]; self.gongNengLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:KFont(17)];
[functionImageView addSubview:self.gongNengLabel]; [functionImageView addSubview:self.gongNengLabel];
[self.gongNengLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.gongNengLabel mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -186,7 +187,7 @@ ...@@ -186,7 +187,7 @@
_timeLabel.text = @"终身免费使用"; _timeLabel.text = @"终身免费使用";
// _xuFeiButton.hidden = YES; // _xuFeiButton.hidden = YES;
}else{ }else{
_gongNengLabel.text = @"功能未解锁"; _gongNengLabel.text = kLocalizedString(@"mine_premium_services_locked");
_timeLabel.text = kLocalizedString(@"mine_unlock_more_services"); _timeLabel.text = kLocalizedString(@"mine_unlock_more_services");
[_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)]; [_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)];
} }
...@@ -197,7 +198,7 @@ ...@@ -197,7 +198,7 @@
} }
}else{ }else{
_nicknameLabel.text = kLocalizedString(@"mine_sign"); // [[data Read] objectForKey:@"NickName"]; _nicknameLabel.text = kLocalizedString(@"mine_sign"); // [[data Read] objectForKey:@"NickName"];
_gongNengLabel.text = @"功能未解锁"; _gongNengLabel.text = kLocalizedString(@"mine_premium_services_locked");
_timeLabel.text = kLocalizedString(@"mine_unlock_more_services"); _timeLabel.text = kLocalizedString(@"mine_unlock_more_services");
[_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)]; [_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)];
} }
...@@ -225,7 +226,7 @@ ...@@ -225,7 +226,7 @@
- (void)clean{ - (void)clean{
_touXiangImageView.image = [UIImage imageNamed:@"mine_user_header"]; _touXiangImageView.image = [UIImage imageNamed:@"mine_user_header"];
_nicknameLabel.text = kLocalizedString(@"mine_sign"); // [[data Read] objectForKey:@"NickName"]; _nicknameLabel.text = kLocalizedString(@"mine_sign"); // [[data Read] objectForKey:@"NickName"];
_gongNengLabel.text = @"功能未解锁"; _gongNengLabel.text = kLocalizedString(@"mine_premium_services_locked");
_timeLabel.text = kLocalizedString(@"mine_unlock_more_services"); _timeLabel.text = kLocalizedString(@"mine_unlock_more_services");
[_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)]; [_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)];
} }
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
}]; }];
UILabel * nickNameLab = [[UILabel alloc] init]; UILabel * nickNameLab = [[UILabel alloc] init];
nickNameLab.text = @"昵称"; nickNameLab.text = kLocalizedString(@"Nickname");
nickNameLab.textColor = kColorWithRGB(33, 33, 33); nickNameLab.textColor = kColorWithRGB(33, 33, 33);
nickNameLab.font = [UIFont systemFontOfSize:KFont(17)]; nickNameLab.font = [UIFont systemFontOfSize:KFont(17)];
nickNameLab.textAlignment = NSTextAlignmentCenter; nickNameLab.textAlignment = NSTextAlignmentCenter;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
[[ZJUserInfoManager shared] getUserInfo:nil failure:nil]; [[ZJUserInfoManager shared] getUserInfo:nil failure:nil];
[[ZJUserInfoManager shared] getServiceInfo:nil]; [[ZJUserInfoManager shared] getServiceInfo:nil];
[[ZJUserInfoManager shared] prepareCountryCode];
}); });
return config; return config;
} }
......
...@@ -44,8 +44,8 @@ typedef enum : NSUInteger { ...@@ -44,8 +44,8 @@ typedef enum : NSUInteger {
userLogout, //用户注销 userLogout, //用户注销
PaymentConfiguration,//支付配置 PaymentConfiguration,//支付配置
payPageData,//支付页面数据 payPageData,//支付页面数据
addFriendHintStyle //用户注销 addFriendHintStyle, //用户注销
countryCodeInfo, //国家区域码
} TQNetwortGetAction; } TQNetwortGetAction;
// POST请求动作枚举 // POST请求动作枚举
......
...@@ -213,8 +213,8 @@ static TQNetworkTools* _tools = nil; ...@@ -213,8 +213,8 @@ static TQNetworkTools* _tools = nil;
// [dict setValue: @"1" forKey: @"tgtk"]; // [dict setValue: @"1" forKey: @"tgtk"];
// 获取BundleID // 获取BundleID
// [dict setValue: [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] forKey: @"pkg"]; [dict setValue: [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] forKey: @"pkg"];
[dict setValue: @"com.app.zhiji" forKey: @"pkg"]; // [dict setValue: @"com.app.zhiji" forKey: @"pkg"];
NSString *identifierForVendor = [[data Read] objectForKey:@"Identifier"];; NSString *identifierForVendor = [[data Read] objectForKey:@"Identifier"];;
[dict setValue: identifierForVendor forKey: @"device"]; [dict setValue: identifierForVendor forKey: @"device"];
...@@ -230,8 +230,8 @@ static TQNetworkTools* _tools = nil; ...@@ -230,8 +230,8 @@ static TQNetworkTools* _tools = nil;
// } // }
//appLs //appLs
// [dict setValue: @"040087e60c36fd63" forKey: @"appLs"]; [dict setValue: @"040087e60c36fd63" forKey: @"appLs"];
[dict setValue: @"d904ceaa1b3f6444" forKey: @"appLs"]; // [dict setValue: @"d904ceaa1b3f6444" forKey: @"appLs"];
// 设置网络类型 // 设置网络类型
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
...@@ -325,6 +325,8 @@ static TQNetworkTools* _tools = nil; ...@@ -325,6 +325,8 @@ static TQNetworkTools* _tools = nil;
case payPageData: case payPageData:
case addFriendHintStyle: case addFriendHintStyle:
return @"/app/v1/location/reminder-copywriting"; return @"/app/v1/location/reminder-copywriting";
case countryCodeInfo:
return @"/app/v1/country-info";
default: default:
return @""; return @"";
} }
...@@ -413,7 +415,6 @@ static TQNetworkTools* _tools = nil; ...@@ -413,7 +415,6 @@ static TQNetworkTools* _tools = nil;
NSString *jsonString =[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSString *jsonString =[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"ZJAESCommonjsonString成功了 %@", jsonString); NSLog(@"ZJAESCommonjsonString成功了 %@", jsonString);
// NSString *cipherText = aesEncryptString(jsonString, aesKey); // NSString *cipherText = aesEncryptString(jsonString, aesKey);
NSString *encryptStr = aesEncryptString(jsonString, aesKey); NSString *encryptStr = aesEncryptString(jsonString, aesKey);
...@@ -555,8 +556,8 @@ static TQNetworkTools* _tools = nil; ...@@ -555,8 +556,8 @@ static TQNetworkTools* _tools = nil;
[dict setValue: identifierForVendor forKey: @"device"]; [dict setValue: identifierForVendor forKey: @"device"];
NSLog(@"identifierForVendor info == %@", identifierForVendor); NSLog(@"identifierForVendor info == %@", identifierForVendor);
// 获取BundleID // 获取BundleID
// [dict setValue: [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] forKey: @"pkg"]; [dict setValue: [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] forKey: @"pkg"];
[dict setValue: @"com.app.zhiji" forKey: @"pkg"]; // [dict setValue: @"com.app.zhiji" forKey: @"pkg"];
// 设置时间戳 // 设置时间戳
NSTimeInterval today = [[NSDate date] timeIntervalSince1970] * 1000; NSTimeInterval today = [[NSDate date] timeIntervalSince1970] * 1000;
...@@ -568,9 +569,9 @@ static TQNetworkTools* _tools = nil; ...@@ -568,9 +569,9 @@ static TQNetworkTools* _tools = nil;
// } // }
//appLs //appLs
// [dict setValue: @"040087e60c36fd63" forKey: @"appLs"]; [dict setValue: @"040087e60c36fd63" forKey: @"appLs"];
[dict setValue: @"d904ceaa1b3f6444" forKey: @"appLs"]; // [dict setValue: @"d904ceaa1b3f6444" forKey: @"appLs"];
[dict addEntriesFromDictionary:[self signParams:dict]]; [dict addEntriesFromDictionary:[self signParams:dict]];
......
...@@ -19,12 +19,16 @@ typedef void(^successBlock)(id); ...@@ -19,12 +19,16 @@ typedef void(^successBlock)(id);
+ (instancetype)shared; + (instancetype)shared;
+ (BOOL)CNLanguage;
- (NSString *)token; - (NSString *)token;
- (NSString *)uid; - (NSString *)uid;
- (NSDictionary *)h5_url; - (NSDictionary *)h5_url;
- (NSArray *)countryCodes;
- (ZJMineUserInfoModel *)userInfoModel; - (ZJMineUserInfoModel *)userInfoModel;
- (BOOL)isLogin; - (BOOL)isLogin;
...@@ -45,6 +49,8 @@ typedef void(^successBlock)(id); ...@@ -45,6 +49,8 @@ typedef void(^successBlock)(id);
- (void)inviteFriendWithCode; - (void)inviteFriendWithCode;
- (void)prepareCountryCode;
//- (void)touristLogin:(infoCallBack)info failure:(failureBlock)failure; //- (void)touristLogin:(infoCallBack)info failure:(failureBlock)failure;
@property(nonatomic, strong) NSString *network; @property(nonatomic, strong) NSString *network;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#import "Data.h" #import "Data.h"
#import <CoreLocation/CoreLocation.h> #import <CoreLocation/CoreLocation.h>
#import "AlertControllerTool.h" #import "AlertControllerTool.h"
#import "ZJAreaCodeModel.h"
@interface ZJUserInfoManager()<CLLocationManagerDelegate>{ @interface ZJUserInfoManager()<CLLocationManagerDelegate>{
NSCache * inviteCodeCache; NSCache * inviteCodeCache;
...@@ -21,6 +22,8 @@ ...@@ -21,6 +22,8 @@
@property (nonatomic, strong) ZJMineUserInfoModel * userInfoModel; @property (nonatomic, strong) ZJMineUserInfoModel * userInfoModel;
@property (nonatomic, strong) NSMutableArray<ZJAreaCodeModel *> * countryCodeArr;
@end @end
static ZJUserInfoManager * manager; static ZJUserInfoManager * manager;
...@@ -81,6 +84,19 @@ static ZJUserInfoManager * manager; ...@@ -81,6 +84,19 @@ static ZJUserInfoManager * manager;
return _userInfoModel; return _userInfoModel;
} }
- (NSArray *)countryCodes{
return _countryCodeArr.copy;
}
+ (BOOL)CNLanguage{
NSArray *languages = [NSLocale preferredLanguages];
NSString *currentLanguage = [languages objectAtIndex:0];
if ([currentLanguage isEqualToString:@"zh"]){
return YES;
}
return NO;
}
- (BOOL)isLogin{ - (BOOL)isLogin{
NSString * userInfoStr = [[self.data Read] objectForKey:@"userInfoDic"]; NSString * userInfoStr = [[self.data Read] objectForKey:@"userInfoDic"];
NSDictionary * userInfo = [self convertJsonStringToNSDictionary:userInfoStr]; NSDictionary * userInfo = [self convertJsonStringToNSDictionary:userInfoStr];
...@@ -216,6 +232,28 @@ static ZJUserInfoManager * manager; ...@@ -216,6 +232,28 @@ static ZJUserInfoManager * manager;
}]; }];
} }
- (void)prepareCountryCode{
_countryCodeArr = [[NSMutableArray alloc] init];
[[TQNetworkTools shared] getWithAction:countryCodeInfo parameters:@{} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200){
NSArray * country = [[response objectForKey:@"result"] objectForKey:@"data"];
for (NSDictionary * dic in country) {
ZJAreaCodeModel * model = [ZJAreaCodeModel new];
[model setValuesForKeysWithDictionary:dic];
[self.countryCodeArr addObject:model];
}
[self.data WirteDic:[[response objectForKey:@"result"] objectForKey:@"data"] Key:@"countryCodes"];
}
} failure:^(NSError * _Nonnull error) {
}];
}
- (void)inviteFriendWithCode{ - (void)inviteFriendWithCode{
if(!_userInfoModel){ if(!_userInfoModel){
......
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
<string>$(PRODUCT_NAME)</string> <string>$(PRODUCT_NAME)</string>
<key>LSApplicationQueriesSchemes</key> <key>LSApplicationQueriesSchemes</key>
<array> <array>
<string>comgooglemaps</string>
<string>googlechromes</string>
<string>fbauth2</string> <string>fbauth2</string>
<string>fbshareextension</string> <string>fbshareextension</string>
<string>fbapi</string> <string>fbapi</string>
...@@ -70,19 +72,19 @@ ...@@ -70,19 +72,19 @@
<true/> <true/>
</dict> </dict>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>知迹修改您的头像需要您的相机权限</string> <string>Family Mapp Modify your avatar requires your camera permission</string>
<key>NSContactsUsageDescription</key> <key>NSContactsUsageDescription</key>
<string>知迹获取您的好友需要您的通讯录权限</string> <string>Family Mapp to get your friends needs your address book permission</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>知迹绘制您的轨迹需要您的定位权限</string> <string>Family Mapp needs your location permission to draw your track</string>
<key>NSLocationAlwaysUsageDescription</key> <key>NSLocationAlwaysUsageDescription</key>
<string>知迹绘制您的轨迹需要您的定位权限</string> <string>Family Mapp needs your location permission to draw your track</string>
<key>NSLocationUsageDescription</key> <key>NSLocationUsageDescription</key>
<string>知迹绘制您的轨迹需要您的定位权限</string> <string>Family Mapp needs your location permission to draw your track</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string>知迹绘制您的轨迹需要您的定位权限</string> <string>Family Mapp needs your location permission to draw your track</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>知迹修改您的头像需要您的相册权限</string> <string>Family Mapp Modify your avatar requires your album permission</string>
<key>UIApplicationSceneManifest</key> <key>UIApplicationSceneManifest</key>
<dict> <dict>
<key>UIApplicationSupportsMultipleScenes</key> <key>UIApplicationSupportsMultipleScenes</key>
......
...@@ -53,6 +53,7 @@ appName = "Family Mapp"; ...@@ -53,6 +53,7 @@ appName = "Family Mapp";
"login"="Login"; "login"="Login";
"login_title"="Sign in"; "login_title"="Sign in";
"login_send_code"="Send confirmation code"; "login_send_code"="Send confirmation code";
"login_send_code_again"="Resend";
"login_already_send_code"="Send confirmation code"; "login_already_send_code"="Send confirmation code";
"login_read"="I accept"; "login_read"="I accept";
...@@ -61,44 +62,28 @@ appName = "Family Mapp"; ...@@ -61,44 +62,28 @@ appName = "Family Mapp";
"login_sms_code"="Please enter the SMS verification code"; "login_sms_code"="Please enter the SMS verification code";
"知道了"="";
"知道了"="";
"知道了"="";
"知道了"="";
"手机号快捷登录"="";
"请输入手机号码"="";
"请输入验证码"="";
"发送验证码"="";
"已阅读并同意"="";
"重新发送"="";
"已发送"="";
//care //care
"care_find_now"="Find now"; "care_find_now"="Find now";
"care_find_others"="View others"; "care_find_others"="View others";
"添加位置关心"=""; "care_add_location_cincerns"="Add location concerns";
"care_add"="Add"; "care_add"="Add";
"立即查看"="";
"我自己"=""; "care_invite_friends"="Invite friends";
"添加关心的人"=""; "care_invite_facebook"="Facebook invitation";
"银行级数据加密防护"="";
//add friends //add friends
"手机号查看"=""; "friend_note"="Note:";
"注:"=""; "friend_setting"="Friend Settings";
"邀请好友"=""; "friend_phone"="Mobile Number";
"已添加"=""; "friend_nickname"="Nickname";
"已发送"=""; "friend_click_name"="Click to enter your name for him";
"好友设置"=""; "friend_reminder"="Arrival/Departure Location Reminder";
"手机号"=""; "friend_Friendship"="Friendship";
"昵称"=""; "friend_lock_hint"="This feature is locked! Immediately unlock and open friends\nreal-time location and history records and other functions!";
"点击输入你对他的称呼"=""; "friend_remove"="Are you sure you want to remove this friend?";
"到达/离开地点提醒"=""; "friend_emergency_alert"="Emergency Alert";
"好友关系"=""; "friend_add_contact"="Add Contact";
"未解锁该功能!马上解锁开启好友\n实时位置和历史记录等功能吧~"="";
"确定要移除该好友?"="";
"紧急警报"="";
"添加联系人"="";
"已发送邀请"="";
"暂未注册"="";
//message //message
"message"="Messages"; "message"="Messages";
"message_confirm"="Confirm"; "message_confirm"="Confirm";
...@@ -125,12 +110,16 @@ appName = "Family Mapp"; ...@@ -125,12 +110,16 @@ appName = "Family Mapp";
"location_check_tutorial"="View the tutorial"; "location_check_tutorial"="View the tutorial";
"location_check_tutorial_cancel"="Cancel"; "location_check_tutorial_cancel"="Cancel";
"location_alert_details_0"="为了您能更好地体验Family Mapp,请进行以下设置:"; "location_alert_details_0"="For you to better experience Family Mapp, please set the following: ";
"location_alert_details_1"="确认对方没有删除Family Mapp"; "location_alert_details_1"="Confirm that the other party did not delete Family Mapp";
"location_alert_details_2"="如果删除了请分享应用给Ta重新下载并安装、登录"; "location_alert_details_2"="If the other party deletes, please share the application to him/her to re-download and install, log in";
"location_alert_details_3"="位置权限设置"; "location_alert_details_3"="Location Permission Setting";
"location_alert_details_4"="如果Ta关闭了位置权限,请让Ta前往设置>权限管理>Family Mapp里开启位置权限。"; "location_alert_details_4"="If the other party has turned off location permission, please let him/her go to Settings> Permission Management> Family Mapp to enable location permission.";
"location_alert_share"="分享应用"; "location_alert_share"="Share app";
"location_tutorial_location"="Tutorial for Locating Friends";
"location_friend"="Locating Friends";
"location_send_invite"="Invitation sent";
//mine //mine
"mine_sign"="Sign in"; "mine_sign"="Sign in";
...@@ -151,6 +140,10 @@ appName = "Family Mapp"; ...@@ -151,6 +140,10 @@ appName = "Family Mapp";
"mine_enter_nickname"="Enter a new username"; "mine_enter_nickname"="Enter a new username";
"mine_edit_nickname"="Change username"; "mine_edit_nickname"="Change username";
"mine_premium_services_locked"="Premium services locked";
"myself"="Myself";
"myself_style2"="Myself";
//setting //setting
"setting"="Settings"; "setting"="Settings";
"setting_version"="Version checking"; "setting_version"="Version checking";
...@@ -184,12 +177,5 @@ appName = "Family Mapp"; ...@@ -184,12 +177,5 @@ appName = "Family Mapp";
"share_friend"="Let’s be friend in %@"; "share_friend"="Let’s be friend in %@";
"定位Ta教程"=""; //imageView.image
"为了您能更好地体验Family Mapp,请进行以下设置:"=""; "showLocationInfo"="showLocationInfo";
"确认对方没有删除Family Mapp"="";
"如果删除了请分享应用给Ta重新下载并安装、登录"="";
"位置权限设置"="";
"如果Ta关闭了位置权限,请让Ta前往设置>权限管理>Family Mapp里开启位置权限。"="";
"功能未解锁"="";
"添加位置关心"="";
...@@ -53,6 +53,7 @@ appName = "Family Mapp"; ...@@ -53,6 +53,7 @@ appName = "Family Mapp";
"login_title"="登录"; "login_title"="登录";
"login_send_code"="发送验证码"; "login_send_code"="发送验证码";
"login_already_send_code"="已发送"; "login_already_send_code"="已发送";
"login_send_code_again"="重新发送";
"login_read"="已阅读并同意"; "login_read"="已阅读并同意";
"login_sms_code"="请输入短信验证码"; "login_sms_code"="请输入短信验证码";
...@@ -63,7 +64,23 @@ appName = "Family Mapp"; ...@@ -63,7 +64,23 @@ appName = "Family Mapp";
//care //care
"care_find_now"="立即查看"; "care_find_now"="立即查看";
"care_find_others"="查看其他好友"; "care_find_others"="查看其他好友";
"care_add_location_cincerns"="添加位置关心";
"care_add"="添加"; "care_add"="添加";
"care_invite_friends"="邀请好友";
"care_invite_facebook"="facebook邀请";
//add friends
"friend_note"="注:";
"friend_setting"="好友设置";
"friend_phone"="手机号";
"friend_nickname"="昵称";
"friend_click_name"="点击输入你对他的称呼";
"friend_reminder"="到达/离开地点提醒";
"friend_Friendship"="好友关系";
"friend_lock_hint"="未解锁该功能!马上解锁开启好友\n实时位置和历史记录等功能吧~";
"friend_remove"="确定要移除该好友?";
"friend_emergency_alert"="紧急警报";
"friend_add_contact"="添加联系人";
//message //message
"message"="消息"; "message"="消息";
...@@ -98,6 +115,9 @@ appName = "Family Mapp"; ...@@ -98,6 +115,9 @@ appName = "Family Mapp";
"location_alert_details_3"="位置权限设置"; "location_alert_details_3"="位置权限设置";
"location_alert_details_4"="如果Ta关闭了位置权限,请让Ta前往设置>权限管理>Family Mapp里开启位置权限。"; "location_alert_details_4"="如果Ta关闭了位置权限,请让Ta前往设置>权限管理>Family Mapp里开启位置权限。";
"location_alert_share"="分享应用"; "location_alert_share"="分享应用";
"location_tutorial_location"="定位Ta教程";
"location_friend"="定位Ta";
"location_send_invite"="已发送邀请";
//mine //mine
"mine_sign"="点击登录"; "mine_sign"="点击登录";
...@@ -117,6 +137,10 @@ appName = "Family Mapp"; ...@@ -117,6 +137,10 @@ appName = "Family Mapp";
"mine_renewal"="续费"; "mine_renewal"="续费";
"mine_enter_nickname"="请输入新昵称"; "mine_enter_nickname"="请输入新昵称";
"mine_edit_nickname"="修改昵称"; "mine_edit_nickname"="修改昵称";
"mine_premium_services_locked"="功能未解锁";
"myself"="自己";
"myself_style2"="我自己";
//setting //setting
"setting"="设置"; "setting"="设置";
...@@ -150,3 +174,6 @@ appName = "Family Mapp"; ...@@ -150,3 +174,6 @@ appName = "Family Mapp";
"share_invite"="邀请您成为好友"; "share_invite"="邀请您成为好友";
"share_upload"="下载%@APP,实时查看我的位置,守护彼此安全。"; "share_upload"="下载%@APP,实时查看我的位置,守护彼此安全。";
"share_friend"="快来%@看一看吧"; "share_friend"="快来%@看一看吧";
//imageView.image
"showLocationInfo"="showLocationInfo_zh";
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