添加部分埋点

This commit is contained in:
2025-12-25 17:20:24 +08:00
parent 5b6e0a8fbf
commit 1af5a0e849
8 changed files with 201 additions and 1 deletions

View File

@@ -228,9 +228,10 @@
self.passwordTextField.text.length);
NSString *email = self.emailTextField.text ? self.emailTextField.text : @"";
NSString *password = self.passwordTextField.text ? self.passwordTextField.text : @"";
KBWeakSelf;
[self.loginVM emailLoginEmail:email password:password WithCompletion:^(BOOL success, NSError * _Nullable error) {
if (success) {
[weakSelf report:email];
[[NSUserDefaults standardUserDefaults] setValue:email forKey:KBUserEmailKey];
[[NSUserDefaults standardUserDefaults] synchronize];
id<UIApplicationDelegate> appDelegate = UIApplication.sharedApplication.delegate;
@@ -248,6 +249,11 @@
}];
}
- (void)report:(NSString *)account{
[[KBMaiPointReporter sharedReporter] reportNewAccountWithType:@"登录用户" account:account completion:^(BOOL success, NSError * _Nullable error) {
}];
}
- (void)onTapForgotPassword {
KBLOG(@"KBEmailLoginVC onTapForgotPassword");

View File

@@ -100,6 +100,7 @@
self.params[@"gender"] = genderNumber;
}
NSString *email = self.params[@"mailAddress"] ? self.params[@"mailAddress"] : @"";
KBWeakSelf
[self.loginVM emailRegisterParams:self.params withCompletion:^(BOOL success, NSError * _Nullable error) {
if (success) {
[KBHUD showInfo:KBLocalized(@"Signed in successfully")];
@@ -107,6 +108,7 @@
dispatch_async(dispatch_get_main_queue(), ^{
[[NSUserDefaults standardUserDefaults] setValue:email forKey:KBUserEmailKey];
[[NSUserDefaults standardUserDefaults] synchronize];
[weakSelf report:email];
KBEmailLoginVC *vc = [[KBEmailLoginVC alloc] init];
[KB_CURRENT_NAV pushViewController:vc animated:true];
// id<UIApplicationDelegate> appDelegate = UIApplication.sharedApplication.delegate;
@@ -129,6 +131,12 @@
}];
}
- (void)report:(NSString *)account{
[[KBMaiPointReporter sharedReporter] reportNewAccountWithType:@"注册账号" account:account completion:^(BOOL success, NSError * _Nullable error) {
}];
}
- (nullable NSNumber *)kb_localGenderParamIfAvailable {
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
//

View File

@@ -47,6 +47,8 @@
#import "BaseViewController.h"
#import "KBLocalizationManager.h" // 全局多语言封装
#import "KBMaiPointReporter.h"
//-----------------------------------------------宏定义全局----------------------------------------------------------/

View File

@@ -193,6 +193,7 @@ static void *KBPermPlayerPresentationSizeContext = &KBPermPlayerPresentationSize
}
- (void)openSettings {
[self report];
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
UIApplication *app = [UIApplication sharedApplication];
if ([app canOpenURL:url]) {
@@ -285,6 +286,13 @@ static void *KBPermPlayerPresentationSizeContext = &KBPermPlayerPresentationSize
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
}
#pragma mark - network
- (void)report{
[[KBMaiPointReporter sharedReporter] reportNewAccountWithType:@"键盘申请授权" account:nil completion:^(BOOL success, NSError * _Nullable error) {
}];
}
#pragma mark - Lazy Subviews
- (UIButton *)backButton {