Commit 980b4dbe authored by Mazy's avatar Mazy

fix alert bugs

parent 3d72b7c7
......@@ -1192,7 +1192,7 @@
CODE_SIGN_ENTITLEMENTS = GYDemo/GYDemo.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 137;
CURRENT_PROJECT_VERSION = 140;
DEVELOPMENT_TEAM = XWMRLLSSFL;
ENABLE_BITCODE = NO;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
......@@ -1225,7 +1225,7 @@
CODE_SIGN_ENTITLEMENTS = GYDemo/GYDemo.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 137;
CURRENT_PROJECT_VERSION = 140;
DEVELOPMENT_TEAM = XWMRLLSSFL;
ENABLE_BITCODE = NO;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
......
......@@ -69,6 +69,7 @@
[UIView animateWithDuration:0.15 animations:^{
self.mainContentView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self removeFromSuperview];
// if (self.dismissedClosure) {
// self.dismissedClosure(false);
......@@ -76,204 +77,21 @@
}];
}
//- (void)configWithWdResultModel:(DGWdResultModel *)resultModel {
// self.contentStackView.hidden = true;
//
// self.contentLabel.hidden = false;
// self.contentLabel.text = resultModel.reason;
//
// if (resultModel.buttonStatus == 1) {
// self.topTitleButton.image = [UIImage imageNamed:@"title_withdraw_success"];
// } else {
// self.topTitleButton.image = [UIImage imageNamed:@"title_base_alert"];
// }
//
// [self.bottomStatusButton setImage:[UIImage imageNamed:@"convert_continue_get_bg"] forState:UIControlStateNormal];
//
//}
//
////DGWheelSurfModel
//// NSInteger awardType;//奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包 7钻石
//- (void)configWithSurfModel:(DGWheelSurfModel *)surfModel {
// //奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包 7钻石
// // _wheelSurfModel = wheelSurfModel;
// // self.topTypeImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_header_%ld", (long)surfModel.awardType]];
// self.dataSource = [NSMutableArray new];
// switch (surfModel.awardType) {
// case 3:
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_seed"];
// self.dataSource = surfModel.extModels;
// break;
// case 4:
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_coin"];
// [self.dataSource addObject:[DGExtModel new]];
// break;
// case 5:
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_accelerator"];
// [self.dataSource addObject:[DGExtModel new]];
// break;
// case 7:
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_diamond"];
// [self.dataSource addObject:[DGExtModel new]];
// break;
// default:
// break;
// }
//
// if (self.dataSource.count == 1) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = true;
// self.thirdStackView.hidden = true;
// self.lightImageView.hidden = false;
// } else if (self.dataSource.count == 2) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = false;
// self.thirdStackView.hidden = true;
// self.lightImageView.hidden = true;
// } else if (self.dataSource.count == 3) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = false;
// self.thirdStackView.hidden = false;
// self.lightImageView.hidden = true;
// }
//
// // NSInteger awardType;//奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包 7钻石
// for (DGExtModel *model in self.dataSource) {
// if (surfModel.awardType == 4) {
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_coin"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// imageV.image = [UIImage imageNamed:@"gift_gold"];
// }
//
// for (UILabel *label in self.gainCountLabels) {
// label.text = [NSString stringWithFormat:@"+%@", surfModel.awardNum];
// }
//
// } else if (surfModel.awardType == 3) {
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_seed"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// if (imageV.tag - 1000 == model.id) {
// imageV.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_seed_%ld", model.id]];
// }
// }
//
// for (UILabel *label in self.gainCountLabels) {
// if (label.tag - 2000 == model.id) {
// label.text = [NSString stringWithFormat:@"+%ld", model.num];
// }
// }
//
// } else { // awardType = 5 加速剂
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_accelerator"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// imageV.image = [UIImage imageNamed:@"gift_accelerator"];
// }
//
// for (UILabel *label in self.gainCountLabels) {
// label.text = [NSString stringWithFormat:@"+%@", surfModel.awardNum];
// }
// }
// }
//}
//
//- (void)configWithBoxModel:(DGOpenBoxModel *)boxModel {
// self.boxModel = boxModel;
//
// self.dataSource = [NSMutableArray new];
// switch (_boxModel.type) {
// case 1:
// self.dataSource = _boxModel.seeds;
// break;
// case 2:
// [self.dataSource addObject:[DGExtModel new]];
// break;
// case 3:
// [self.dataSource addObject:[DGExtModel new]];
// break;
// default:
// break;
// }
//
// if (self.dataSource.count == 1) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = true;
// self.thirdStackView.hidden = true;
// self.lightImageView.hidden = false;
// } else if (self.dataSource.count == 2) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = false;
// self.thirdStackView.hidden = true;
// self.lightImageView.hidden = true;
// } else if (self.dataSource.count == 3) {
// self.firstStackView.hidden = false;
// self.secondStackView.hidden = false;
// self.thirdStackView.hidden = false;
// self.lightImageView.hidden = true;
// }
//
// for (DGExtModel *model in self.dataSource) {
// if (self.boxModel.type == 2) {
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_coin"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// // if (imageV.tag - 1000 == model.id) {
// imageV.image = [UIImage imageNamed:@"gift_gold"];
// // }
// }
//
// for (UILabel *label in self.gainCountLabels) {
// // if (label.tag - 2000 == model.id) {
// label.text = [NSString stringWithFormat:@"+%ld", (long)_boxModel.awardNum];
// // }
// }
//
// }else if (_boxModel.type == 1){
// // title_gain_box/
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_seed"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// if (imageV.tag - 1000 == model.id) {
// imageV.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_seed_%ld", model.id]];
// }
// }
//
// for (UILabel *label in self.gainCountLabels) {
// if (label.tag - 2000 == model.id) {
// label.text = [NSString stringWithFormat:@"+%ld", model.num];
// }
// }
//
// }else{ // type = 3 加速剂
// self.topTypeImageView.image = [UIImage imageNamed:@"title_gain_accelerator"];
// for (UIImageView *imageV in self.centerGainImageViews) {
// // if (imageV.tag - 1000 == model.id) {
// imageV.image = [UIImage imageNamed:@"gift_accelerator"];
// // }
// }
//
// for (UILabel *label in self.gainCountLabels) {
// // if (label.tag - 2000 == model.id) {
// label.text = [NSString stringWithFormat:@"+%ld", (long)_boxModel.awardNum];
// // }
// }
// }
// }
//
//}
//显示每日福利宝箱奖励
- (void)configWithWelfareBoxModel:(NSArray *)boxModels;{
// self.lightImageView.hidden = false;
self.firstStackView.hidden = true;
self.secondStackView.hidden = true;
self.thirdStackView.hidden = true;
if (self.dataSource.count == 1) {
if (boxModels.count == 1) {
self.firstStackView.hidden = false;
} else if (self.dataSource.count == 2) {
} else if (boxModels.count == 2) {
self.firstStackView.hidden = false;
self.secondStackView.hidden = false;
} else if (self.dataSource.count == 3) {
} else if (boxModels.count == 3) {
self.firstStackView.hidden = false;
self.secondStackView.hidden = false;
self.thirdStackView.hidden = false;
......@@ -282,7 +100,7 @@
self.topTypeImageView.hidden = NO;
NSInteger index = 0;
for (WelfareBoxData * data in boxModels) {
for (WelfareBoxData * data in boxModels) {
//value = "奖励类型", notes = "1 种子 2 金币 3 加速剂"
UIImageView *imageV = self.centerGainImageViews[index];
......
......@@ -21,6 +21,7 @@
- (void)initUnity;
- (void)ShowMainView;
- (void)ios_getOrderData;
- (void)ios_getHomeInfo;
- (void)unityVideo:(BOOL)video;
- (void)ios_luckyTurntable;
......
......@@ -749,6 +749,11 @@ NSDictionary* appLaunchOpts;
NSString *status = [[CGUserManager shared].appSwitch[@"isopenH5"] stringValue];
if (![status isEqualToString:@"1"]) { return; }
Data * data = [[Data alloc] init];
if([[data Read] objectForKey:@"refresh_token"] == nil) {
return;
}
WEAKSELF
[[CGNetworkTools shared] postWithAction: DrawTopNAward parameters:@{} success:^(id _Nonnull response) {
......@@ -757,7 +762,7 @@ NSDictionary* appLaunchOpts;
NSInteger awardCents = [[[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"awardCents"] integerValue];
if (awardCents >= 0) {
if (awardCents > 0) {
GYRedPacketView *alertVC = [GYRedPacketView loadFromNib];
alertVC.awardNum = [NSString stringWithFormat:@"%ld", (long)awardCents];
alertVC.frame = UIScreen.mainScreen.bounds;
......@@ -825,7 +830,6 @@ NSDictionary* appLaunchOpts;
[data WirteDic: @"1" Key:@"isFirstLaunch"];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self launchAdSuccesShow];
[self drawTopNAward];
});
}
......@@ -861,6 +865,8 @@ NSDictionary* appLaunchOpts;
[[[self ufw] appController].window.rootViewController.view addSubview:naviVC.view];
[[[self ufw] appController].window.rootViewController addChildViewController:naviVC];
} else {
[self drawTopNAward];
}
}
} failure:^{
......@@ -879,7 +885,9 @@ NSDictionary* appLaunchOpts;
naviVC.view.frame = UIScreen.mainScreen.bounds;
[[[self ufw] appController].window.rootViewController.view addSubview:naviVC.view];
[[[self ufw] appController].window.rootViewController addChildViewController:naviVC];
} else {
[self drawTopNAward];
}
}
}
......
......@@ -349,6 +349,7 @@
}
WEAKSELF;
[[CGNetworkTools shared] postWithAction:welfare_task_box parameters:@{} success:^(id _Nonnull response) {
NSLog(@"%@", response);
if (response) {
if(weakSelf.coinsProcess >= 6){
weakSelf.coinsProcess -= 6;
......@@ -358,6 +359,10 @@
DGUniversalAlertView * alertView = [DGUniversalAlertView loadFromNib];
[alertView configWithWelfareBoxModel:dataArray];
[alertView setCloseCallBack:^{
[(AppDelegate *)[UIApplication sharedApplication].delegate ios_getHomeInfo];
[(AppDelegate *)[UIApplication sharedApplication].delegate ios_getOrderData];
}];
[alertView showAlertToView: [(AppDelegate *)[UIApplication sharedApplication].delegate getMainWindow]];
}
[weakSelf updateUI];
......
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