Skip to content

Commit a979f3c

Browse files
tonychanchenoldcodefarmer
authored andcommitted
App数据隐私合规整改--年龄限制
tapd: http://tapd.oa.com/NEW_IOT/prong/stories/view/1020393192868776255 Change-Id: If028a326e66821a11c67196a25d1103534fb3728
1 parent d593615 commit a979f3c

File tree

4 files changed

+50
-13
lines changed

4 files changed

+50
-13
lines changed

Source/LinkApp/Classes/Module/Login/Controller/TIoTRegionViewController.m

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,25 @@ - (void)registStyleChange:(UIButton *)sender
232232
[self refreshUserActionItems];
233233
}
234234

235-
- (void)sendCode:(id)sender{
235+
- (void)sendCode:(id)sender{
236+
NSString *errorCode = [TIoTCoreUserManage shared].isShowBirthDayView;
237+
238+
//-1表示年龄错误
239+
if ([[TIoTCoreUserManage shared].userRegionId isEqualToString:@"22"]) {
240+
//美东
241+
if ([errorCode containsString:@"-1"]) {
242+
[MBProgressHUD showError:NSLocalizedString(@"sorry_we_cannot_support_service", @"很遗憾,我们目前无法向您提供腾通讯连连")];
243+
return;
244+
}
245+
246+
}else {
247+
//国内
248+
if ([errorCode containsString:@"-2"]) {
249+
[MBProgressHUD showError:NSLocalizedString(@"sorry_we_cannot_support_service_CN", @"很遗憾,我们目前无法向您提供腾通讯连连")];
250+
return;
251+
}
252+
}
253+
236254
TIoTRegisterViewController *registerVC = [[TIoTRegisterViewController alloc]init];
237255
[self.navigationController pushViewController:registerVC animated:YES];
238256
}

Source/LinkApp/Classes/Module/Login/Controller/TIoTRegisterViewController.m

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,12 @@ - (void)firstShowBirthdayView {
245245
}else if ([text isEqualToString:@"Privacy6"]) {
246246
if (LanguageIsEnglish) {
247247
TIoTOpensourceLicenseViewController *vc = [TIoTOpensourceLicenseViewController new];
248-
vc.title = NSLocalizedString(@"register_agree_2", @"用户协议");
248+
vc.title = NSLocalizedString(@"authentation_thirdsdk_title", @"第三方信息");
249249
vc.urlPath = TIoTAPPConfig.userThridSDKChEnglishString;
250250
[self.navigationController pushViewController:vc animated:YES];
251251
}else {
252252
TIoTOpensourceLicenseViewController *vc = [TIoTOpensourceLicenseViewController new];
253-
vc.title = NSLocalizedString(@"register_agree_2", @"用户协议");
253+
vc.title = NSLocalizedString(@"authentation_thirdsdk_title", @"第三方信息");
254254
vc.urlPath = TIoTAPPConfig.userThridSDKChChineseString;
255255
[self.navigationController pushViewController:vc animated:YES];
256256
}
@@ -271,7 +271,8 @@ - (void)firstShowBirthdayView {
271271
}
272272

273273
- (void)showEN_age_view {
274-
if ([NSString isNullOrNilWithObject:[TIoTCoreUserManage shared].isShowBirthDayView] && [[TIoTCoreUserManage shared].userRegionId isEqualToString:@"22"]) {
274+
NSString *errorCode = [TIoTCoreUserManage shared].isShowBirthDayView;
275+
if ([NSString isNullOrNilWithObject:errorCode] || [errorCode containsString:@"-1"] || [errorCode containsString:@"-2"]) {
275276
TIoTAlertCustomView *customView = [[TIoTAlertCustomView alloc]init];
276277
[customView alertContentType:TIoTAlertViewContentTypeDatePick isAddHideGesture:NO];
277278
[customView alertCustomViewTitleMessage:NSLocalizedString(@"please_setting_birthday", @"为了给您提供更好的体验,请设备您的出生日期") cancelBtnTitle:NSLocalizedString(@"cancel", @"取消") confirmBtnTitle:NSLocalizedString(@"confirm", @"确定")];
@@ -286,14 +287,30 @@ - (void)showEN_age_view {
286287
NSString *selectedTime = [NSString getTimeStampWithString:timeString withFormatter:@"yyyy-MM-dd" withTimezone:@""];
287288

288289
NSInteger age = [NSString timeDifferenceInfoWitFormTimeStamp:[[NSDate date] timeIntervalSince1970] toTimeStamp:selectedTime.longLongValue dateFormatter:@"yyyy-MM-dd" timeType:TIoTTimeTypeYear];
289-
if (age < 13) {
290-
[MBProgressHUD showError:NSLocalizedString(@"sorry_we_cannot_support_service", @"很遗憾,我们目前无法向您提供腾通讯连连")];
291-
[self.navigationController popViewControllerAnimated:YES];
290+
291+
NSString *tempErrorCode = errorCode?:@"";
292+
if ([[TIoTCoreUserManage shared].userRegionId isEqualToString:@"22"]) {
293+
//美东
294+
if (age < 13) {
295+
[MBProgressHUD showError:NSLocalizedString(@"sorry_we_cannot_support_service", @"很遗憾,我们目前无法向您提供腾通讯连连")];
296+
[self.navigationController popViewControllerAnimated:YES];
297+
298+
[TIoTCoreUserManage shared].isShowBirthDayView = [tempErrorCode stringByAppendingString:@"-1"];
299+
return;
300+
}
301+
}else {
302+
//国内
303+
if (age < 18) {
304+
[MBProgressHUD showError:NSLocalizedString(@"sorry_we_cannot_support_service_CN", @"很遗憾,我们目前无法向您提供腾通讯连连")];
305+
[self.navigationController popViewControllerAnimated:YES];
306+
307+
[TIoTCoreUserManage shared].isShowBirthDayView = [tempErrorCode stringByAppendingString:@"-2"];
308+
return;
309+
}
292310
}
311+
312+
[TIoTCoreUserManage shared].isShowBirthDayView = @"1";
293313
};
294-
295-
[TIoTCoreUserManage shared].isShowBirthDayView = @"1";
296-
297314
}
298315
}
299316
#pragma mark - 显示用户之前操作项

Source/LinkApp/Supporting Files/Resource/en.lproj/Localizable.strings

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,8 @@ If the problem still persists, we recommend you remove the device and add it aga
864864
"video_call" = "Making video call";
865865
"call" = "Call";
866866
"please_setting_birthday" = "To have better experience, please set your date of birth";
867-
"sorry_we_cannot_support_service" = "Sorry. Tencent LLink is not available";
867+
"sorry_we_cannot_support_service" = "Because you are under 13 years old, you cannot use our products and services temporarily.";
868+
"sorry_we_cannot_support_service_CN" = "Because you are under 18 years old, you cannot use our products and services temporarily.";
868869
"device_share" = "Share Devices";
869870
"privacy_policy_lower_case" = "privacy policy";
870871
"device_shared_agree_1" = "By connecting the device with Tencent LLink, you agree to share information about your device and device logs, and the third party can use the device in accordance with its terms and policies.\nFor more information, please read our ";

Source/LinkApp/Supporting Files/Resource/zh-Hans.lproj/Localizable.strings

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,8 @@
858858
"video_call" = "视频呼叫中...";
859859
"call" = "呼叫";
860860
"please_setting_birthday" = "为了给您提供更好的体验,请设备您的出生日期";
861-
"sorry_we_cannot_support_service" = "很遗憾,我们目前无法向您提供腾通讯连连";
861+
"sorry_we_cannot_support_service" = "由于您未满十三周岁,暂无法使用我们的产品服务。";
862+
"sorry_we_cannot_support_service_CN" = "由于您未满十八周岁,暂无法使用我们的产品服务。";
862863
"device_share" = "设备共享";
863864
"privacy_policy_lower_case" = "隐私政策";
864865
"device_shared_agree_1" = "通过将设备与腾讯连连连接,即表示您同意共享有关您设备和设备日志的信息,第三方可以根据其条款和政策使用该设备。\n有关更多信息,请阅读我们的";
@@ -946,7 +947,7 @@
946947
"authentation_alert_wechat_detai" = "· 昵称、头像、地区、性别\n· 设备信息";
947948
"authentation_resister_title" = "国家/地区";
948949
"authentation_resister_privacy" = "为了向您提供对应国家/地区的用户协议和隐私政策,请您选择所在的国家及地区";
949-
"authentation_thirdsdk_title" = "第三方SDK目录";
950+
"authentation_thirdsdk_title" = "第三方信息共享清单";
950951
"unknow_device" = "未知设备";
951952
"bind_LLSync_device_success" = "绑定纯蓝牙设备成功";
952953
"bind_LLSync_device_failure" = "绑定纯蓝牙设备失败";

0 commit comments

Comments
 (0)