1
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#import "KBLoginVM.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "BaseTabBarController.h"
|
||||
#import "KBWebViewViewController.h"
|
||||
@interface KBEmailLoginVC () <UITextViewDelegate, UITextFieldDelegate>
|
||||
|
||||
// 背景与顶部装饰
|
||||
@@ -311,8 +312,10 @@
|
||||
|
||||
BOOL hitTerms = (termsRange.location != NSNotFound && NSLocationInRange(charIndex, termsRange));
|
||||
BOOL hitPrivacy = (privacyRange.location != NSNotFound && NSLocationInRange(charIndex, privacyRange));
|
||||
if (hitTerms || hitPrivacy) {
|
||||
KBLOG(@"KBEmailLoginVC tap policy");
|
||||
if (hitTerms) {
|
||||
[KBWebViewViewController presentLegalDocumentType:KBLegalDocumentTypeTermsOfService fromViewController:self];
|
||||
} else if (hitPrivacy) {
|
||||
[KBWebViewViewController presentLegalDocumentType:KBLegalDocumentTypePrivacyPolicy fromViewController:self];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#import "KBLoginVM.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "KBRegistVerEmailVC.h"
|
||||
#import "KBWebViewViewController.h"
|
||||
|
||||
@interface KBEmailRegistVC () <UITextViewDelegate, UITextFieldDelegate>
|
||||
|
||||
@@ -393,10 +394,10 @@
|
||||
|
||||
BOOL hitTerms = (termsRange.location != NSNotFound && NSLocationInRange(charIndex, termsRange));
|
||||
BOOL hitPrivacy = (privacyRange.location != NSNotFound && NSLocationInRange(charIndex, privacyRange));
|
||||
if (hitTerms || hitPrivacy) {
|
||||
KBLOG(@"tap policy in KBEmailRegistVC");
|
||||
// 后续可统一跳转到协议页
|
||||
[KBHUD showInfo:KBLocalized(@"Open agreement")];
|
||||
if (hitTerms) {
|
||||
[KBWebViewViewController presentLegalDocumentType:KBLegalDocumentTypeTermsOfService fromViewController:self];
|
||||
} else if (hitPrivacy) {
|
||||
[KBWebViewViewController presentLegalDocumentType:KBLegalDocumentTypePrivacyPolicy fromViewController:self];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#import "KBEmailRegistVC.h"
|
||||
#import "KBEmailLoginVC.h"
|
||||
#import "KBForgetPwdVC.h"
|
||||
#import "KBWebViewViewController.h"
|
||||
|
||||
@interface KBLoginVC () <UITextViewDelegate>
|
||||
|
||||
@@ -210,8 +211,11 @@
|
||||
}
|
||||
|
||||
- (void)onTapPolicy {
|
||||
// 打开服务条款/隐私政策
|
||||
KBLOG(@"onTapPolicy");
|
||||
[self kb_openLegalDocumentType:KBLegalDocumentTypeTermsOfService];
|
||||
}
|
||||
|
||||
- (void)kb_openLegalDocumentType:(KBLegalDocumentType)type {
|
||||
[KBWebViewViewController presentLegalDocumentType:type fromViewController:self];
|
||||
}
|
||||
|
||||
- (void)onTapSignUp {
|
||||
@@ -495,8 +499,10 @@
|
||||
|
||||
BOOL hitTerms = (termsRange.location != NSNotFound && NSLocationInRange(charIndex, termsRange));
|
||||
BOOL hitPrivacy = (privacyRange.location != NSNotFound && NSLocationInRange(charIndex, privacyRange));
|
||||
if (hitTerms || hitPrivacy) {
|
||||
[self onTapPolicy];
|
||||
if (hitTerms) {
|
||||
[self kb_openLegalDocumentType:KBLegalDocumentTypeTermsOfService];
|
||||
} else if (hitPrivacy) {
|
||||
[self kb_openLegalDocumentType:KBLegalDocumentTypePrivacyPolicy];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user