Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckFarm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
LuckFarm
Commits
980b4dbe
Commit
980b4dbe
authored
Nov 21, 2020
by
Mazy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix alert bugs
parent
3d72b7c7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
192 deletions
+24
-192
project.pbxproj
GYDemo/GYDemo.xcodeproj/project.pbxproj
+2
-2
DGUniversalAlertView.m
GYDemo/GYDemo/Alert/DGUniversalAlertView.m
+5
-187
AppDelegate.h
GYDemo/GYDemo/AppDelegate.h
+1
-0
AppDelegate.mm
GYDemo/GYDemo/AppDelegate.mm
+11
-3
WelfareCenterVC.m
GYDemo/GYDemo/ViewController/Welfare/WelfareCenterVC.m
+5
-0
UserInterfaceState.xcuserstate
...cuserdata/mazy.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
No files found.
GYDemo/GYDemo.xcodeproj/project.pbxproj
View file @
980b4dbe
...
...
@@ -1192,7 +1192,7 @@
CODE_SIGN_ENTITLEMENTS
=
GYDemo/GYDemo.entitlements
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
1
37
;
CURRENT_PROJECT_VERSION
=
1
40
;
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
=
1
37
;
CURRENT_PROJECT_VERSION
=
1
40
;
DEVELOPMENT_TEAM
=
XWMRLLSSFL
;
ENABLE_BITCODE
=
NO
;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING
=
NO
;
...
...
GYDemo/GYDemo/Alert/DGUniversalAlertView.m
View file @
980b4dbe
...
...
@@ -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
;
...
...
GYDemo/GYDemo/AppDelegate.h
View file @
980b4dbe
...
...
@@ -21,6 +21,7 @@
-
(
void
)
initUnity
;
-
(
void
)
ShowMainView
;
-
(
void
)
ios_getOrderData
;
-
(
void
)
ios_getHomeInfo
;
-
(
void
)
unityVideo
:(
BOOL
)
video
;
-
(
void
)
ios_luckyTurntable
;
...
...
GYDemo/GYDemo/AppDelegate.mm
View file @
980b4dbe
...
...
@@ -750,6 +750,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) {
NSLog(@"DrawTopNAward = %@", 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:^{
...
...
@@ -880,6 +886,8 @@ NSDictionary* appLaunchOpts;
[[[self ufw] appController].window.rootViewController.view addSubview:naviVC.view];
[[[self ufw] appController].window.rootViewController addChildViewController:naviVC];
} else {
[self drawTopNAward];
}
}
}
...
...
GYDemo/GYDemo/ViewController/Welfare/WelfareCenterVC.m
View file @
980b4dbe
...
...
@@ -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
];
...
...
farm.xcworkspace/xcuserdata/mazy.xcuserdatad/UserInterfaceState.xcuserstate
View file @
980b4dbe
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment