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
8fd4e598
Commit
8fd4e598
authored
Nov 18, 2020
by
zhangshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加策划返回修改 增加默认数据
parent
d8f64bb6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
AppDelegate.mm
GYDemo/GYDemo/AppDelegate.mm
+9
-1
GYWebViewController.m
GYDemo/GYDemo/ViewController/GYWebViewController.m
+15
-1
No files found.
GYDemo/GYDemo/AppDelegate.mm
View file @
8fd4e598
...
...
@@ -84,6 +84,9 @@ NSDictionary* appLaunchOpts;
[[CGUserManager shared] addLocCollection:@"show_withdraw_page" value:@""];
GYWebViewController * web = [[GYWebViewController alloc] init];
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];
if(![[data Read] objectForKey:@"firstShowNovice"]){
...
...
@@ -133,7 +136,9 @@ NSDictionary* appLaunchOpts;
GYWebViewController * web = [[GYWebViewController alloc] init];
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];
...
...
@@ -158,6 +163,9 @@ NSDictionary* appLaunchOpts;
[[CGUserManager shared] addLocCollection:@"show_clock_in_page" value:@""];
GYWebViewController * web = [[GYWebViewController alloc] init];
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];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[[[self ufw] appController].window.rootViewController presentViewController:nav animated:YES completion:nil];
...
...
GYDemo/GYDemo/ViewController/GYWebViewController.m
View file @
8fd4e598
...
...
@@ -133,10 +133,21 @@
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
{
//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
)
{
...
...
@@ -388,8 +399,11 @@
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didFailProvisionalNavigation
:
(
WKNavigation
*
)
navigation
withError
:
(
NSError
*
)
error
{
[
MBProgressHUD
hideHUDForView
:
self
.
view
];
[
MBProgressHUD
showError
:
@"未知错误"
toView
:
self
.
view
];
[
self
goBackController
];
}
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didFailNavigation
:
(
null_unspecified
WKNavigation
*
)
navigation
withError
:
(
NSError
*
)
error
;{
}
// 当web content处理完成时,会回调
-
(
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