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
c83445df
Commit
c83445df
authored
Nov 18, 2020
by
Mazy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/master'
parents
cc6bddec
323e32c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
AppDelegate.mm
GYDemo/GYDemo/AppDelegate.mm
+13
-2
GYWebViewController.m
GYDemo/GYDemo/ViewController/GYWebViewController.m
+15
-1
No files found.
GYDemo/GYDemo/AppDelegate.mm
View file @
c83445df
...
@@ -84,6 +84,9 @@ NSDictionary* appLaunchOpts;
...
@@ -84,6 +84,9 @@ NSDictionary* appLaunchOpts;
[[CGUserManager shared] addLocCollection:@"show_withdraw_page" value:@""];
[[CGUserManager shared] addLocCollection:@"show_withdraw_page" value:@""];
GYWebViewController * web = [[GYWebViewController alloc] init];
GYWebViewController * web = [[GYWebViewController alloc] init];
NSString *withdrawUrl = [[CGUserManager shared].h5_url objectForKey:@"withdrawurl"];
NSString *withdrawUrl = [[CGUserManager shared].h5_url objectForKey:@"withdrawurl"];
if (web.url == nil || web.url.length == 0) {
web.url = @"http://h5v2.zhangxinzhixun.com/farm/Withdraw";
}
//显示操作引导
//显示操作引导
Data * data = [[Data alloc] init];
Data * data = [[Data alloc] init];
if(![[data Read] objectForKey:@"firstShowNovice"]){
if(![[data Read] objectForKey:@"firstShowNovice"]){
...
@@ -112,12 +115,15 @@ NSDictionary* appLaunchOpts;
...
@@ -112,12 +115,15 @@ NSDictionary* appLaunchOpts;
}
}
}
}
// 跳转上榜
赚钱
// 跳转上榜
- (void)ios_ranklistClick {
- (void)ios_ranklistClick {
[[CGUserManager shared] addLocCollection:@"show_Leaderboard" value:@""];
[[CGUserManager shared] addLocCollection:@"show_Leaderboard" value:@""];
[self unityVideo:false];
[self unityVideo:false];
GYWebViewController * web = [[GYWebViewController alloc] init];
GYWebViewController * web = [[GYWebViewController alloc] init];
web.url = [[CGUserManager shared].h5_url objectForKey:@"rankingurl"];
web.url = [[CGUserManager shared].h5_url objectForKey:@"rankingurl"];
if (web.url == nil || web.url.length == 0) {
web.url = @"http://h5v3.zhangxinzhixun.com/huayuan/Ranking";
}
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:web];
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:web];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[[[self ufw] appController].window.rootViewController presentViewController:nav animated:YES completion:nil];
[[[self ufw] appController].window.rootViewController presentViewController:nav animated:YES completion:nil];
...
@@ -133,7 +139,9 @@ NSDictionary* appLaunchOpts;
...
@@ -133,7 +139,9 @@ NSDictionary* appLaunchOpts;
GYWebViewController * web = [[GYWebViewController alloc] init];
GYWebViewController * web = [[GYWebViewController alloc] init];
web.url = [[CGUserManager shared].h5_url objectForKey:@"welfareurl"];
web.url = [[CGUserManager shared].h5_url objectForKey:@"welfareurl"];
if (web.url == nil || web.url.length == 0) {
web.url = @"http://h5v3.zhangxinzhixun.com/huayuan/Welfare";
}
// WelfareCenterVC * vc = [[WelfareCenterVC alloc]init];
// WelfareCenterVC * vc = [[WelfareCenterVC alloc]init];
...
@@ -158,6 +166,9 @@ NSDictionary* appLaunchOpts;
...
@@ -158,6 +166,9 @@ NSDictionary* appLaunchOpts;
[[CGUserManager shared] addLocCollection:@"show_clock_in_page" value:@""];
[[CGUserManager shared] addLocCollection:@"show_clock_in_page" value:@""];
GYWebViewController * web = [[GYWebViewController alloc] init];
GYWebViewController * web = [[GYWebViewController alloc] init];
web.url = [[CGUserManager shared].h5_url objectForKey:@"clockInzurl"];
web.url = [[CGUserManager shared].h5_url objectForKey:@"clockInzurl"];
if (web.url == nil || web.url.length == 0) {
web.url = @"http://h5v3.zhangxinzhixun.com/huayuan/ClockIn";
}
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:web];
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:web];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[[[self ufw] appController].window.rootViewController presentViewController:nav animated:YES completion:nil];
[[[self ufw] appController].window.rootViewController presentViewController:nav animated:YES completion:nil];
...
...
GYDemo/GYDemo/ViewController/GYWebViewController.m
View file @
c83445df
...
@@ -133,10 +133,21 @@
...
@@ -133,10 +133,21 @@
self
.
navigationItem
.
leftBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"返回"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
goBackController
)];
self
.
navigationItem
.
leftBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"返回"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
goBackController
)];
}
}
//侧滑返回
UIPanGestureRecognizer
*
panGesture
=
[[
UIPanGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
handleNavigationTransition
:
)];
// panGesture.delegate = self; // 设置手势代理,拦截手势触发
[
self
.
view
addGestureRecognizer
:
panGesture
];
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
YES
;
}
}
-
(
void
)
handleNavigationTransition
:
(
UIPanGestureRecognizer
*
)
gap
{
// NSLog(@"用户左滑了手势啊");
[
self
goBackController
];
}
-
(
void
)
storeCoin
{
-
(
void
)
storeCoin
{
//http://feedapitest.zhangxinhulian.com/app/v2/novel/storeCoin?type=201&sid=2375&uid=112381&slot_id=1011
//http://feedapitest.zhangxinhulian.com/app/v2/novel/storeCoin?type=201&sid=2375&uid=112381&slot_id=1011
[[
CGNetworkTools
shared
]
postWithAction
:
StoreCoin
parameters
:@{
@"type"
:
@"201"
,
@"sid"
:
_adsDict
[
@"sid"
],
@"slot_id"
:
_adsDict
[
@"slot_id"
]}
success
:^
(
id
_Nonnull
response
)
{
[[
CGNetworkTools
shared
]
postWithAction
:
StoreCoin
parameters
:@{
@"type"
:
@"201"
,
@"sid"
:
_adsDict
[
@"sid"
],
@"slot_id"
:
_adsDict
[
@"slot_id"
]}
success
:^
(
id
_Nonnull
response
)
{
...
@@ -388,8 +399,11 @@
...
@@ -388,8 +399,11 @@
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didFailProvisionalNavigation
:
(
WKNavigation
*
)
navigation
withError
:
(
NSError
*
)
error
{
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didFailProvisionalNavigation
:
(
WKNavigation
*
)
navigation
withError
:
(
NSError
*
)
error
{
[
MBProgressHUD
hideHUDForView
:
self
.
view
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
];
[
MBProgressHUD
showError
:
@"未知错误"
toView
:
self
.
view
];
[
MBProgressHUD
showError
:
@"未知错误"
toView
:
self
.
view
];
[
self
goBackController
];
}
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didFailNavigation
:
(
null_unspecified
WKNavigation
*
)
navigation
withError
:
(
NSError
*
)
error
;{
}
}
// 当web content处理完成时,会回调
// 当web content处理完成时,会回调
-
(
void
)
webViewWebContentProcessDidTerminate
:
(
WKWebView
*
)
webView
{
-
(
void
)
webViewWebContentProcessDidTerminate
:
(
WKWebView
*
)
webView
{
...
...
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