Commit 2f3847e6 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent b3b0f1e3
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "苹果6.7.8-引导页-3副本@2x.png", "filename" : "苹果6.7.8-引导页-3@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "苹果6.7.8-引导页-3副本@3x.png", "filename" : "苹果6.7.8-引导页-3@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "super苹果引导11-3副本@2x.png", "filename" : "super苹果引导11-3@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "super苹果引导11-3副本@3x.png", "filename" : "super苹果引导11-3@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
[collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row + 1 inSection:indexPath.section] atScrollPosition: UICollectionViewScrollPositionCenteredHorizontally animated:true]; [collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row + 1 inSection:indexPath.section] atScrollPosition: UICollectionViewScrollPositionCenteredHorizontally animated:true];
} else { } else {
[self dismissGuideView]; [self dismissGuideView];
[[NSNotificationCenter defaultCenter] postNotificationName:@"guideDismiss" object:nil];
} }
} }
......
...@@ -12,6 +12,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -12,6 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface ICIAPViewController : UIViewController @interface ICIAPViewController : UIViewController
@property (nonatomic, copy) NSString * value;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
#import "ICIPAProductModel.h" #import "ICIPAProductModel.h"
#import "Data.h" #import "Data.h"
@interface ICIAPViewController (){ @interface ICIAPViewController ()
NSTimer * timer;
int timerCount;
}
@property (weak, nonatomic) IBOutlet UIView *weakContentView; @property (weak, nonatomic) IBOutlet UIView *weakContentView;
@property (weak, nonatomic) IBOutlet UIView *yearContentView; @property (weak, nonatomic) IBOutlet UIView *yearContentView;
...@@ -36,6 +33,8 @@ ...@@ -36,6 +33,8 @@
@property (nonatomic, strong) NSMutableArray *products; @property (nonatomic, strong) NSMutableArray *products;
@property (nonatomic, strong) ICIPAProductModel *currentProduct; @property (nonatomic, strong) ICIPAProductModel *currentProduct;
@property (nonatomic, assign) CFTimeInterval startTime;
@end @end
@implementation ICIAPViewController @implementation ICIAPViewController
...@@ -43,8 +42,14 @@ ...@@ -43,8 +42,14 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
[MobClick event:@"pay_page_view"]; [MobClick event:@"pay_page_view" label:_value?:@""];
[MobClick beginEvent:@"pay_page_stay"]; [MobClick beginEvent:@"pay_page_stay" label:_value?:@""];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"pay_page_view", @"value": _value?:@""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
_startTime = CACurrentMediaTime();
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.weakContentView.layer.cornerRadius = KScaleWidth(8); self.weakContentView.layer.cornerRadius = KScaleWidth(8);
...@@ -98,15 +103,6 @@ ...@@ -98,15 +103,6 @@
[self.yearContentView.layer addAnimation:animation forKey: @"transform.scale"]; [self.yearContentView.layer addAnimation:animation forKey: @"transform.scale"];
} }
- (void)dealloc{
[MobClick endEvent:@"pay_page_stay"];
NSLog(@"ICIAPViewController dealloc");
}
- (void)timerStart {
timerCount++;
}
-(void)getIpaList { -(void)getIpaList {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[[ZTNetworkTools shared] getWithAction:getIPAPayConfig parameters:@{} success:^(id _Nonnull response) { [[ZTNetworkTools shared] getWithAction:getIPAPayConfig parameters:@{} success:^(id _Nonnull response) {
...@@ -129,8 +125,12 @@ ...@@ -129,8 +125,12 @@
NSDictionary * dic = [[data Read] objectForKey:@"config"]; NSDictionary * dic = [[data Read] objectForKey:@"config"];
if (dic) { if (dic) {
self.weakPriceLabel.text = [NSString stringWithFormat:@"%@ %@", [dic objectForKey:@"pay_3day_txt"], model.name]; if ([dic objectForKey:@"pay_3day_txt"]){
weakSelf.yearPeriodOfUseLabel.text = [dic objectForKey:@"478_button_text"]; self.weakPriceLabel.text = [NSString stringWithFormat:@"%@", [dic objectForKey:@"pay_3day_txt"]];
}
if ([dic objectForKey:@"478_button_text"]){
weakSelf.yearPeriodOfUseLabel.text = [dic objectForKey:@"478_button_text"];
}
} }
} }
} }
...@@ -142,7 +142,6 @@ ...@@ -142,7 +142,6 @@
} }
- (void)selectedWeakAction { - (void)selectedWeakAction {
[MobClick event:@"pay_week_vip_click"];
if (self.products.count == 0){ if (self.products.count == 0){
return; return;
} }
...@@ -153,10 +152,16 @@ ...@@ -153,10 +152,16 @@
} }
} }
[self startPlanAction:_currentProduct index:1]; [self startPlanAction:_currentProduct index:1];
[MobClick event:@"pay_week_vip_click" label:_value?:@""];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"pay_week_vip_click", @"value": _value?:@""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
} }
- (void)selectedYearAction { - (void)selectedYearAction {
[MobClick event:@"pay_year_vip_click"];
if (self.products.count == 0){ if (self.products.count == 0){
return; return;
} }
...@@ -167,6 +172,12 @@ ...@@ -167,6 +172,12 @@
} }
} }
[self startPlanAction:_currentProduct index:0]; [self startPlanAction:_currentProduct index:0];
[MobClick event:@"pay_year_vip_click" label:_value?:@""];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"pay_year_vip_click", @"value": _value?:@""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
} }
- (void)viewWillAppear:(BOOL)animated { - (void)viewWillAppear:(BOOL)animated {
...@@ -176,13 +187,32 @@ ...@@ -176,13 +187,32 @@
// dismiss // dismiss
- (IBAction)dismissAction { - (IBAction)dismissAction {
[MobClick event:@"pay_payment_close_click"]; [MobClick event:@"pay_payment_close_click" label:_value?:@""];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"pay_payment_close_click", @"value": _value?:@""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
CFTimeInterval endTime = CACurrentMediaTime();
[MobClick endEvent:@"pay_page_stay" label:[NSString stringWithFormat:@"%@, %gs", _value, endTime - self.startTime]];
dict = @{@"event": @"guazinovel", @"action": @"pay_page_stay", @"value":[NSString stringWithFormat:@"%@, %gs", _value, endTime - self.startTime]}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
[self dismissViewControllerAnimated:true completion:nil]; [self dismissViewControllerAnimated:true completion:nil];
} }
// 恢复购买 // 恢复购买
- (IBAction)restoreAction { - (IBAction)restoreAction {
[MobClick event:@"pay_restore_click"]; [MobClick event:@"pay_restore_click" label:_value?:@""];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"pay_restore_click", @"value": _value?:@""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
[ICPurchaseManager restorePurchasesWithSuccess:^{ [ICPurchaseManager restorePurchasesWithSuccess:^{
[[ICUserManager shared] getUserInfo:^(ZTUserInfoModel * _Nonnull model) { [[ICUserManager shared] getUserInfo:^(ZTUserInfoModel * _Nonnull model) {
[self dismissViewControllerAnimated:true completion:nil]; [self dismissViewControllerAnimated:true completion:nil];
...@@ -202,19 +232,36 @@ ...@@ -202,19 +232,36 @@
[ICPurchaseManager purchaseWithProductIdWithProductId:payTypeStr inView:self.view success:^{ [ICPurchaseManager purchaseWithProductIdWithProductId:payTypeStr inView:self.view success:^{
// [MobClick event:@"pay_suc"]; // [MobClick event:@"pay_suc"];
NSString * action = @"";
if (index == 0) { if (index == 0) {
[MobClick event:@"pay_year_success"]; action = @"pay_year_success";
}else if (index == 1){ }else if (index == 1){
[MobClick event:@"pay_week_success"]; action = @"pay_week_success";
} }
[MobClick event:action label:self.value?:@""];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": action, @"value": self.value?:@""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
[[ICUserManager shared] getUserInfo:^(ZTUserInfoModel * _Nonnull model) { [[ICUserManager shared] getUserInfo:^(ZTUserInfoModel * _Nonnull model) {
[weakSelf dismissViewControllerAnimated:true completion:nil]; [weakSelf dismissViewControllerAnimated:true completion:nil];
} failure:^{ } failure:^{
[weakSelf dismissViewControllerAnimated:true completion:nil]; [weakSelf dismissViewControllerAnimated:true completion:nil];
}]; }];
} faliure:^{ } faliure:^(NSString * failResult) {
NSString * action = @"";
if (index == 0) {
action = @"pay_year_fail";
}else if (index == 1){
action = @"pay_week_fail";
}
[MobClick event:action label:[NSString stringWithFormat:@"%@, %@", self.value, failResult]];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": action, @"value":[NSString stringWithFormat:@"%@, %@", self.value, failResult]}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
}]; }];
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#import "ICGuideViewController.h" #import "ICGuideViewController.h"
#import "ICUserManager.h" #import "ICUserManager.h"
#import "LaunchScreenPlaceHolderView.h" #import "LaunchScreenPlaceHolderView.h"
#import "Data.h"
@interface ZJGuideConfig () @interface ZJGuideConfig ()
...@@ -86,14 +87,21 @@ ...@@ -86,14 +87,21 @@
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults]; NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
NSString *localVersion = [userDefault objectForKey:kAPP_Version]; NSString *localVersion = [userDefault objectForKey:kAPP_Version];
if ([currentVersion isEqualToString:localVersion]) { BOOL open = false;
//已经运行过该版本 Data * data = [[Data alloc] init];
window.rootViewController = finishMainVC; NSDictionary * dic = [[data Read] objectForKey:@"open1close0"];
if (result) { if ([[dic objectForKey:@"first_open_navigate"] isEqual:@1]) {
result(NO); open = true;
} }
} else {
if (![currentVersion isEqualToString:localVersion] && open) {
[MobClick event:@"app_startup_show"]; [MobClick event:@"app_startup_show"];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"app_startup_show", @"value": @""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
config.vc.clickCallBack = ^(BOOL agree) { config.vc.clickCallBack = ^(BOOL agree) {
if (agree) { if (agree) {
//同意 更新储存版本 切换rootVC //同意 更新储存版本 切换rootVC
...@@ -108,6 +116,13 @@ ...@@ -108,6 +116,13 @@
result(YES); result(YES);
} }
window.rootViewController = config.vc; window.rootViewController = config.vc;
} else {
//已经运行过该版本
window.rootViewController = finishMainVC;
if (result) {
result(NO);
}
} }
} }
......
...@@ -41,7 +41,6 @@ IBInspectable ...@@ -41,7 +41,6 @@ IBInspectable
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
[MobClick event:@"home_pop"];
_dataSource = @[@{@"image":@"home_cell_0", @"title":@"照片和视频", @"details":@"清理重复照片和视频"}, _dataSource = @[@{@"image":@"home_cell_0", @"title":@"照片和视频", @"details":@"清理重复照片和视频"},
@{@"image":@"home_cell_2", @"title":@"日历和提醒事项", @"details":@"清理过期提醒事项"}, @{@"image":@"home_cell_2", @"title":@"日历和提醒事项", @"details":@"清理过期提醒事项"},
@{@"image":@"home_cell_3", @"title":@"赫兹声波", @"details":@""}, @{@"image":@"home_cell_3", @"title":@"赫兹声波", @"details":@""},
...@@ -52,15 +51,19 @@ IBInspectable ...@@ -52,15 +51,19 @@ IBInspectable
[self setupUI]; [self setupUI];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(guideDismiss) name:@"guideDismiss" object:nil];
[[ICUserManager shared] getServiceInfo:nil failure:nil];
[[ICUserManager shared] loginAndGetUserInfo:^(ZTUserInfoModel * _Nonnull model) { [[ICUserManager shared] loginAndGetUserInfo:^(ZTUserInfoModel * _Nonnull model) {
[[ICUserManager shared] getServiceInfo];
if (![ICUserManager shared].isMember) { if (![ICUserManager shared].isMember) {
Data * data = [[Data alloc] init]; Data * data = [[Data alloc] init];
NSDictionary * dic = [[data Read] objectForKey:@"open1close0"]; NSDictionary * dic = [[data Read] objectForKey:@"open1close0"];
if ([[dic objectForKey:@"isPayfront"] isEqual:@1]) { if ([[dic objectForKey:@"isPayfront"] isEqual:@1]) {
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"home_pop";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
...@@ -70,7 +73,7 @@ IBInspectable ...@@ -70,7 +73,7 @@ IBInspectable
}]; }];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"tab_imp", @"value": @""}.mutableCopy; NSDictionary * dict = @{@"event": @"guazinovel", @"action": @"tab_imp", @"value": @""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) { [[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
}]; }];
...@@ -91,6 +94,31 @@ IBInspectable ...@@ -91,6 +94,31 @@ IBInspectable
[self.headerView.smartClearButton removeRadarAnimation]; [self.headerView.smartClearButton removeRadarAnimation];
} }
- (void)dealloc{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)guideDismiss{
[[ICUserManager shared] loginAndGetUserInfo:^(ZTUserInfoModel * _Nonnull model) {
if (![ICUserManager shared].isMember) {
Data * data = [[Data alloc] init];
NSDictionary * dic = [[data Read] objectForKey:@"open1close0"];
if ([[dic objectForKey:@"isPayfront"] isEqual:@1]) {
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"home_pop";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil];
}
}
} failure:^{
}];
}
- (void)setupUI{ - (void)setupUI{
[super setupUI]; [super setupUI];
...@@ -341,8 +369,8 @@ IBInspectable ...@@ -341,8 +369,8 @@ IBInspectable
ICCleanDustViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICCleanDustViewController"]; ICCleanDustViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICCleanDustViewController"];
[self.navigationController pushViewController:vc animated:true]; [self.navigationController pushViewController:vc animated:true];
}else { }else {
[MobClick event:@"phone_deash_clean"];
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"phone_deash_clean";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
...@@ -354,8 +382,8 @@ IBInspectable ...@@ -354,8 +382,8 @@ IBInspectable
ICNetworkSpeedViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICNetworkSpeedViewController"]; ICNetworkSpeedViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICNetworkSpeedViewController"];
[self.navigationController pushViewController:vc animated:true]; [self.navigationController pushViewController:vc animated:true];
}else { }else {
[MobClick event:@"network_speed_detection"];
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"network_speed_detection";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
...@@ -367,8 +395,8 @@ IBInspectable ...@@ -367,8 +395,8 @@ IBInspectable
ICDbTestViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICDbTestViewController"]; ICDbTestViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICDbTestViewController"];
[self.navigationController pushViewController:vc animated:true]; [self.navigationController pushViewController:vc animated:true];
}else { }else {
[MobClick event:@"db_detection"];
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"db_detection";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
...@@ -380,8 +408,8 @@ IBInspectable ...@@ -380,8 +408,8 @@ IBInspectable
ICBatteryCareViewController *vc = [[ICBatteryCareViewController alloc] init]; ICBatteryCareViewController *vc = [[ICBatteryCareViewController alloc] init];
[self.navigationController pushViewController:vc animated:true]; [self.navigationController pushViewController:vc animated:true];
}else { }else {
[MobClick event:@"battery_life"];
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"battery_life";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
......
...@@ -267,36 +267,37 @@ ...@@ -267,36 +267,37 @@
} }
} else { } else {
NSString * value = @"";
switch (indexPath.row) { switch (indexPath.row) {
case 0: { case 0: {
[MobClick event:@"photo_and_video_screenshot"]; value = @"photo_and_video_screenshot";
} }
break; break;
case 1: { case 1: {
[MobClick event:@"photo_and_video_spot"]; value = @"photo_and_video_spot";
} }
break; break;
case 2: { case 2: {
[MobClick event:@"photo_and_video_similar_photo"]; value = @"photo_and_video_similar_photo";
} }
break; break;
case 3: { case 3: {
[MobClick event:@"photo_and_video_similar_video"]; value = @"photo_and_video_similar_video";
} }
break; break;
case 4: { case 4: {
[MobClick event:@"photo_and_video_similar_live_photo"]; value = @"photo_and_video_similar_live_photo";
} }
break; break;
case 5: { case 5: {
[MobClick event:@"photo_and_video_similar_burst_photo"]; value = @"photo_and_video_similar_burst_photo";
} }
break; break;
default: default:
break; break;
} }
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = value;
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
......
...@@ -126,8 +126,13 @@ ...@@ -126,8 +126,13 @@
case 1: case 1:
[self screenshotDetailAction]; [self screenshotDetailAction];
break; break;
case 2: case 2:{
[MobClick event:@"clean_now_similar_video"]; [MobClick event:@"clean_now_similar_video"];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"clean_now_similar_video", @"value": @""}.mutableCopy;
[[ZTNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
}
break; break;
case 3: case 3:
[self livePhotoDetailAction]; [self livePhotoDetailAction];
...@@ -260,12 +265,11 @@ ...@@ -260,12 +265,11 @@
[MBProgressHUD showError: ICLocalized(@"NoPhotosCleanup")];//@"无照片可清理"]; [MBProgressHUD showError: ICLocalized(@"NoPhotosCleanup")];//@"无照片可清理"];
} }
} else { } else {
[MobClick event:@"clean_now_delete_all"];
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"clean_now_delete_all";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
} }
- (void)deleteSuccessWithTemDataArr: (NSInteger)count freeSize: (CGFloat)size { - (void)deleteSuccessWithTemDataArr: (NSInteger)count freeSize: (CGFloat)size {
...@@ -298,8 +302,8 @@ ...@@ -298,8 +302,8 @@
vc.navigationItem.title = ICLocalized(@"ScreenCapture"); //@"屏幕截图"; vc.navigationItem.title = ICLocalized(@"ScreenCapture"); //@"屏幕截图";
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} else { } else {
[MobClick event:@"clean_now_screenshot"];
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"clean_now_screenshot";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
...@@ -314,8 +318,8 @@ ...@@ -314,8 +318,8 @@
vc.photoType = SimilayLivePhoto; vc.photoType = SimilayLivePhoto;
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} else { } else {
[MobClick event:@"clean_now_similar_live_photo"];
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"clean_now_similar_live_photo";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
...@@ -330,8 +334,8 @@ ...@@ -330,8 +334,8 @@
vc.photoType = SimilayNormalPhoto; vc.photoType = SimilayNormalPhoto;
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} else { } else {
[MobClick event:@"clean_now_similar_photo"];
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = @"clean_now_similar_photo";
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
......
...@@ -37,21 +37,43 @@ ...@@ -37,21 +37,43 @@
} }
- (void)prepare{ - (void)prepare{
[[ICUserManager shared] loginAndGetUserInfo:^(ZTUserInfoModel * _Nonnull model) { [[ICUserManager shared] getServiceInfo:^{
if (self.finishCallBack) { [[ICUserManager shared] loginAndGetUserInfo:^(ZTUserInfoModel * _Nonnull model) {
self.finishCallBack(); if (self.finishCallBack) {
} self.finishCallBack();
if(self->timer){ }
dispatch_source_cancel(self->timer); if(self->timer){
} dispatch_source_cancel(self->timer);
}
} failure:^{
if (self.finishCallBack) {
self.finishCallBack();
}
if(self->timer){
dispatch_source_cancel(self->timer);
}
}];
[self setTimer];
} failure:^{ } failure:^{
if (self.finishCallBack) { [[ICUserManager shared] loginAndGetUserInfo:^(ZTUserInfoModel * _Nonnull model) {
self.finishCallBack(); if (self.finishCallBack) {
} self.finishCallBack();
if(self->timer){ }
dispatch_source_cancel(self->timer); if(self->timer){
} dispatch_source_cancel(self->timer);
}
} failure:^{
if (self.finishCallBack) {
self.finishCallBack();
}
if(self->timer){
dispatch_source_cancel(self->timer);
}
}];
[self setTimer];
}]; }];
[self setTimer]; [self setTimer];
......
...@@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)getUserInfo: (void(^)(ZTUserInfoModel *model))success failure:(void(^)(void))failure; - (void)getUserInfo: (void(^)(ZTUserInfoModel *model))success failure:(void(^)(void))failure;
- (void)getServiceInfo; - (void)getServiceInfo:(void(^)(void))success failure:(void(^)(void))failure;
@property(nonatomic, strong) ZTUserInfoModel *model; @property(nonatomic, strong) ZTUserInfoModel *model;
@property(nonatomic, strong) NSString *network; @property(nonatomic, strong) NSString *network;
......
...@@ -58,7 +58,7 @@ static ICUserManager * manager; ...@@ -58,7 +58,7 @@ static ICUserManager * manager;
- (BOOL)isMember { - (BOOL)isMember {
return true; // return true;
NSString *dateString = [[NSUserDefaults standardUserDefaults] valueForKeyPath:@"expiryDate"]; NSString *dateString = [[NSUserDefaults standardUserDefaults] valueForKeyPath:@"expiryDate"];
...@@ -152,10 +152,7 @@ static ICUserManager * manager; ...@@ -152,10 +152,7 @@ static ICUserManager * manager;
}]; }];
} }
//-(void)getSystemConfigInfo: (void(^)(ZTNovelInfoModel *model))success failure:(void(^)(void))failure { - (void)getServiceInfo:(void(^)(void))success failure:(void(^)(void))failure{
//}
- (void)getServiceInfo{
Data * data = [[Data alloc] init]; Data * data = [[Data alloc] init];
[[ZTNetworkTools shared] getWithAction:appServiceInfo parameters:@{} success:^(id _Nonnull response) { [[ZTNetworkTools shared] getWithAction:appServiceInfo parameters:@{} success:^(id _Nonnull response) {
...@@ -174,13 +171,25 @@ static ICUserManager * manager; ...@@ -174,13 +171,25 @@ static ICUserManager * manager;
if ([[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"open1close0"]) { if ([[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"open1close0"]) {
[data WirteDic:[[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"open1close0"] Key:@"open1close0"]; [data WirteDic:[[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"open1close0"] Key:@"open1close0"];
} else { } else {
[data removeDicForKey:@"open1close0"]; // [data removeDicForKey:@"open1close0"];
}
if (success) {
success();
}
}else{
if (failure) {
failure();
} }
} }
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
[data removeDicForKey:@"urlInfo"]; [data removeDicForKey:@"urlInfo"];
NSLog(@"失败"); NSLog(@"失败");
if (failure) {
failure();
}
}]; }];
} }
......
...@@ -11,7 +11,7 @@ import SwiftyStoreKit ...@@ -11,7 +11,7 @@ import SwiftyStoreKit
class ICPurchaseManager: NSObject { class ICPurchaseManager: NSObject {
@objc class func purchaseWithProductId(productId: String, inView: UIView, success: @escaping(()->Void) ,faliure: @escaping(()->Void)) { @objc class func purchaseWithProductId(productId: String, inView: UIView, success: @escaping(()->Void) ,faliure: @escaping((String)->Void)) {
let productIdentifier = productId let productIdentifier = productId
...@@ -112,11 +112,11 @@ class ICPurchaseManager: NSObject { ...@@ -112,11 +112,11 @@ class ICPurchaseManager: NSObject {
} }
}) { (error) in }) { (error) in
innerHud.hide(animated: true) innerHud.hide(animated: true)
faliure(); faliure(error.localizedDescription);
} }
case .error(let error): case .error(let error):
faliure(); faliure(error.localizedDescription);
hud.hide(animated: true); hud.hide(animated: true);
switch error.code { switch error.code {
case .unknown: case .unknown:
......
...@@ -275,6 +275,8 @@ ...@@ -275,6 +275,8 @@
model.imageSize = imageData.length; model.imageSize = imageData.length;
self.snapshotSize += imageData.length; self.snapshotSize += imageData.length;
[weakSelf.snapshotArray addObject: model]; [weakSelf.snapshotArray addObject: model];
self.completionHandler(YES, nil);
}]; }];
}]; }];
[self requestImageWithIndex:index+1]; [self requestImageWithIndex:index+1];
......
...@@ -143,16 +143,18 @@ ...@@ -143,16 +143,18 @@
[self.navigationController pushViewController:calendarVC animated:true]; [self.navigationController pushViewController:calendarVC animated:true];
} }
} else { } else {
NSString * value = @"";
if (indexPath.row == 0) { if (indexPath.row == 0) {
[MobClick event:@"calendar_and_reminder_overdue_calender"]; value = @"calendar_and_reminder_overdue_calender";
} else { } else {
[MobClick event:@"calendar_and_reminder_overdue_reminder"]; value = @"calendar_and_reminder_overdue_reminder";
} }
ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"]; ICIAPViewController *iapVC = [[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"ICIAPViewController"];
iapVC.value = value;
ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC]; ICNavigationController *navc = [[ICNavigationController alloc] initWithRootViewController:iapVC];
[self presentViewController:navc animated:true completion:nil]; [self presentViewController:navc animated:true completion:nil];
} }
} }
@end @end
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
"Start" = "开始"; "Start" = "开始";
"Pause" = "暂停"; "Pause" = "暂停";
"PhoneCleaning" = "手机清灰"; "PhoneCleaning" = "赫兹声波";
"DecibelDetection" = "声波助手"; "DecibelDetection" = "声波助手";
"InternetSpeedTest" = "网络测速"; "InternetSpeedTest" = "网络测速";
"PowerSavingTips" = "来自 Super Cleaner 9个省电小妙招"; "PowerSavingTips" = "来自 Super Cleaner 9个省电小妙招";
......
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