隐私政策和用户协议点击

This commit is contained in:
fengshuo
2022-01-17 23:01:26 +08:00
parent 062448c772
commit 9154bb74b5

View File

@@ -21,12 +21,14 @@
#import "XPConstant.h"
#import "StatisticsServiceHelper.h"
#import "TTPopup.h"
#import "XPHtmlUrl.h"
///Present
#import "LoginPresenter.h"
#import "LoginProtocol.h"
///VC
#import "LoginPhoneViewController.h"
#import "UserPrivacyView.h"
#import "XPWebViewController.h"
UIKIT_EXTERN NSString * const kYinyouPrivateKey;
@@ -478,11 +480,13 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
attString.yy_color = [ThemeColor mainTextColor];
NSString *userString = @"《用户服务协议》";
NSMutableAttributedString *userAttString = [[NSMutableAttributedString alloc] initWithString:userString attributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]}];
// @weakify(self)
@weakify(self)
[userAttString yy_setTextHighlightRange:NSMakeRange(0, userAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
// @strongify(self);
@strongify(self);
//
// [self goToWebview:HtmlUrlKey(kUserProtocalURL)];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = URLWithType(kUserProtocalURL);
[self.navigationController pushViewController:webVC animated:YES];
} longPressAction:nil];
NSMutableAttributedString *andString = [[NSMutableAttributedString alloc] initWithString:@"和"];
@@ -490,9 +494,11 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
NSString *protocolString = @"《隐私政策》";
NSMutableAttributedString *privateString = [[NSMutableAttributedString alloc] initWithString:protocolString attributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]}];
[privateString yy_setTextHighlightRange:NSMakeRange(0, privateString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
// @strongify(self);
@strongify(self);
//
// [self goToWebview:HtmlUrlKey(kPrivacyURL)];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = URLWithType(kPrivacyURL);
[self.navigationController pushViewController:webVC animated:YES];
} longPressAction:nil];
[attString appendAttributedString:userAttString];
[attString appendAttributedString:andString];