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
f94730fe
Commit
f94730fe
authored
Oct 23, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
box webVC
parent
aaad9fcf
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
38 deletions
+81
-38
xcschememanagement.plist
.../mingjinli.xcuserdatad/xcschemes/xcschememanagement.plist
+1
-1
GYGiftAlertView.m
GYDemo/GYDemo/Alert/GYGiftAlertView.m
+46
-13
AppDelegate.mm
GYDemo/GYDemo/AppDelegate.mm
+30
-4
GYOpenBoxModel.h
GYDemo/GYDemo/Model/GYOpenBoxModel.h
+2
-0
GYWebViewController.m
GYDemo/GYDemo/ViewController/GYWebViewController.m
+1
-1
UserInterfaceState.xcuserstate
...cuserdata/mazy.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ingjinli.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+0
-18
xcschememanagement.plist
.../mingjinli.xcuserdatad/xcschemes/xcschememanagement.plist
+1
-1
No files found.
GYDemo/GYDemo.xcodeproj/xcuserdata/mingjinli.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
f94730fe
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<
k
e
y
>
GYDemo.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
k
e
y
>
GYDemo.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
7
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
6
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
GYDemo/GYDemo/Alert/GYGiftAlertView.m
View file @
f94730fe
...
@@ -69,8 +69,26 @@
...
@@ -69,8 +69,26 @@
}
}
-
(
void
)
setBoxModel
:
(
GYOpenBoxModel
*
)
boxModel
{
-
(
void
)
setBoxModel
:
(
GYOpenBoxModel
*
)
boxModel
{
//
奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包
//
boxModel 1 种子 2 金币 3 加速剂
_boxModel
=
boxModel
;
_boxModel
=
boxModel
;
self
.
dataSource
=
[
NSMutableArray
new
];
switch
(
_boxModel
.
type
)
{
case
1
:
self
.
dataSource
=
_boxModel
.
seeds
;
break
;
case
2
:
[
self
.
dataSource
addObject
:[
GYExtModel
new
]];
break
;
case
3
:
[
self
.
dataSource
addObject
:[
GYExtModel
new
]];
break
;
default
:
break
;
}
_giftHeaderImv
.
image
=
[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"gift_header_%ld"
,
(
long
)(
_boxModel
.
type
+
2
)]];
[
self
.
giftBgView
bringSubviewToFront
:
self
.
collectionView
];
[
self
.
collectionView
reloadData
];
}
}
-
(
void
)
setWheelSurfModel
:
(
GYWheelSurfModel
*
)
wheelSurfModel
{
-
(
void
)
setWheelSurfModel
:
(
GYWheelSurfModel
*
)
wheelSurfModel
{
...
@@ -85,10 +103,7 @@
...
@@ -85,10 +103,7 @@
[
self
.
dataSource
addObject
:[
GYExtModel
new
]];
[
self
.
dataSource
addObject
:[
GYExtModel
new
]];
break
;
break
;
case
5
:
case
5
:
[
self
.
dataSource
addObject
:[
GYExtModel
new
]];
break
;
case
6
:
break
;
break
;
default
:
default
:
break
;
break
;
...
@@ -150,7 +165,7 @@
...
@@ -150,7 +165,7 @@
//item的大小
//item的大小
-
(
CGSize
)
collectionView
:
(
UICollectionView
*
)
collectionView
layout
:
(
UICollectionViewLayout
*
)
collectionViewLayout
sizeForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
CGSize
)
collectionView
:
(
UICollectionView
*
)
collectionView
layout
:
(
UICollectionViewLayout
*
)
collectionViewLayout
sizeForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
return
CGSizeMake
(
collectionView
.
frame
.
size
.
width
/
self
.
dataSource
.
count
,
1
08
);
return
CGSizeMake
(
collectionView
.
frame
.
size
.
width
/
self
.
dataSource
.
count
,
1
20
);
}
}
//区头的大小
//区头的大小
...
@@ -186,13 +201,31 @@
...
@@ -186,13 +201,31 @@
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
GYGiftCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"GYGiftCell"
forIndexPath
:
indexPath
];
GYGiftCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"GYGiftCell"
forIndexPath
:
indexPath
];
GYExtModel
*
model
=
self
.
dataSource
[
indexPath
.
row
];
if
(
_boxModel
)
{
if
(
_wheelSurfModel
.
awardType
==
4
)
{
GYExtModel
*
model
=
self
.
dataSource
[
indexPath
.
row
];
cell
.
giftImv
.
image
=
[
UIImage
imageNamed
:
@"gift_gold"
];
if
(
_boxModel
.
type
==
2
)
{
cell
.
numLab
.
text
=
[
NSString
stringWithFormat
:
@"+%@"
,
_wheelSurfModel
.
awardNum
];
cell
.
giftImv
.
image
=
[
UIImage
imageNamed
:
@"gift_gold"
];
}
else
if
(
_wheelSurfModel
.
awardType
==
4
){
cell
.
numLab
.
text
=
[
NSString
stringWithFormat
:
@"+%ld"
,
(
long
)
_boxModel
.
awardNum
];
cell
.
giftImv
.
image
=
[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"gift_seed_%ld"
,
model
.
id
]];
}
else
if
(
_boxModel
.
type
==
1
){
cell
.
numLab
.
text
=
[
NSString
stringWithFormat
:
@"+%ld"
,
model
.
num
];
cell
.
giftImv
.
image
=
[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"gift_seed_%ld"
,
model
.
id
]];
cell
.
numLab
.
text
=
[
NSString
stringWithFormat
:
@"+%ld"
,
model
.
num
];
}
else
{
cell
.
giftImv
.
image
=
[
UIImage
imageNamed
:
@"gift_accelerator"
];
cell
.
numLab
.
text
=
[
NSString
stringWithFormat
:
@"+%ld"
,
(
long
)
_boxModel
.
awardNum
];
}
}
else
{
GYExtModel
*
model
=
self
.
dataSource
[
indexPath
.
row
];
if
(
_wheelSurfModel
.
awardType
==
4
)
{
cell
.
giftImv
.
image
=
[
UIImage
imageNamed
:
@"gift_gold"
];
cell
.
numLab
.
text
=
[
NSString
stringWithFormat
:
@"+%@"
,
_wheelSurfModel
.
awardNum
];
}
else
if
(
_wheelSurfModel
.
awardType
==
3
){
cell
.
giftImv
.
image
=
[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"gift_seed_%ld"
,
model
.
id
]];
cell
.
numLab
.
text
=
[
NSString
stringWithFormat
:
@"+%ld"
,
model
.
num
];
}
else
if
(
_wheelSurfModel
.
awardType
==
5
){
cell
.
giftImv
.
image
=
[
UIImage
imageNamed
:
@"gift_accelerator"
];
cell
.
numLab
.
text
=
[
NSString
stringWithFormat
:
@"+%@"
,
_wheelSurfModel
.
awardNum
];
}
}
}
return
cell
;
return
cell
;
}
}
...
...
GYDemo/GYDemo/AppDelegate.mm
View file @
f94730fe
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
#import "GYTaskAlertView.h"
#import "GYTaskAlertView.h"
#import "GYOrderInfoModel.h"
#import "GYOrderInfoModel.h"
#import "GYOrderAlertView.h"
#import "GYOrderAlertView.h"
#import "GYOpenBoxModel.h"
#import "GYGiftAlertView.h"
UnityFramework* UnityFrameworkLoad()
UnityFramework* UnityFrameworkLoad()
...
@@ -192,6 +193,31 @@ NSDictionary* appLaunchOpts;
...
@@ -192,6 +193,31 @@ NSDictionary* appLaunchOpts;
// 获得宝箱点击观看视频
// 获得宝箱点击观看视频
- (void)ios_adFlyBox {
- (void)ios_adFlyBox {
[[CGNetworkTools shared] postWithAction:OpenBox parameters:@{} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200) {
NSDictionary *dic = [[response objectForKey:@"result"] objectForKey:@"data"];
GYOpenBoxModel * model = [GYOpenBoxModel new];
[model setValuesForKeysWithDictionary:dic];
model.seeds = [[NSMutableArray alloc] init];
for (NSDictionary * seed in model.seedList) {
GYExtModel * seedModel = [[GYExtModel alloc] init];
[seedModel setValuesForKeysWithDictionary:seed];
[model.seeds addObject:seedModel];
}
GYGiftAlertView * gift = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([GYGiftAlertView class]) owner:self options:nil].firstObject;
gift.boxModel = model;
gift.frame = [[self ufw] appController].window.bounds;
[[[self ufw] appController].window addSubview:gift];
[gift show:nil];
}
} failure:^(NSError * _Nonnull error) {
}];
}
}
// ====================== 获取收据 接口回调 ======================
// ====================== 获取收据 接口回调 ======================
...
@@ -384,14 +410,14 @@ NSDictionary* appLaunchOpts;
...
@@ -384,14 +410,14 @@ NSDictionary* appLaunchOpts;
[self.window makeKeyAndVisible];
[self.window makeKeyAndVisible];
// [self initUnity];
[ZJGuideConfig configWithWindow:self.window finishMainVC: nil showGuide:^(BOOL result) {
[ZJGuideConfig configWithWindow:self.window finishMainVC: tempVC showGuide:^(BOOL result) {
// dispatch_async(dispatch_get_global_queue(0, 0), ^{
// dispatch_async(dispatch_get_global_queue(0, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
dispatch_async(dispatch_get_main_queue(), ^{
[self initUnity];
[[[self ufw] appController].window makeKeyAndVisible];
});
});
// });
// });
}];
}];
[self initUnity];
return YES;
return YES;
}
}
...
...
GYDemo/GYDemo/Model/GYOpenBoxModel.h
View file @
f94730fe
...
@@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
@property
(
nonatomic
,
assign
)
NSInteger
awardNum
;
@property
(
nonatomic
,
assign
)
NSInteger
awardNum
;
@property
(
nonatomic
,
assign
)
NSInteger
boxSumNum
;
@property
(
nonatomic
,
assign
)
NSInteger
boxSumNum
;
@property
(
nonatomic
,
assign
)
NSInteger
type
;
@property
(
nonatomic
,
assign
)
NSInteger
type
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
seedList
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
seeds
;
@end
@end
...
...
GYDemo/GYDemo/ViewController/GYWebViewController.m
View file @
f94730fe
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
-
(
void
)
dealloc
{
-
(
void
)
dealloc
{
[
_webView
removeObserver
:
self
forKeyPath
:
@"estimatedProgress"
];
[
_webView
removeObserver
:
self
forKeyPath
:
@"estimatedProgress"
];
[
_webView
.
configuration
.
userContentController
removeScriptMessageHandlerForName
:
@"
CommitFinished
"
];
[
_webView
.
configuration
.
userContentController
removeScriptMessageHandlerForName
:
@"
backTrack
"
];
}
}
...
...
farm.xcworkspace/xcuserdata/mazy.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f94730fe
No preview for this file type
farm.xcworkspace/xcuserdata/mingjinli.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
f94730fe
...
@@ -3,22 +3,4 @@
...
@@ -3,22 +3,4 @@
uuid =
"28FAD1AB-5A9D-4768-93A5-B3F5FCE13BA3"
uuid =
"28FAD1AB-5A9D-4768-93A5-B3F5FCE13BA3"
type =
"0"
type =
"0"
version =
"2.0"
>
version =
"2.0"
>
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"71AC211B-8804-438F-8F24-6708336CDA23"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"GYDemo/GYDemo/ViewController/GYWebViewController.m"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"187"
endingLineNumber =
"187"
landmarkName =
"-userContentController:didReceiveScriptMessage:"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
</Bucket>
iOSFarm202008/Unity-iPhone.xcodeproj/xcuserdata/mingjinli.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
f94730fe
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<
k
e
y
>
UnityFramework.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
k
e
y
>
UnityFramework.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
6
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
7
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
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