Commit 8fd4e598 authored by zhangshuai's avatar zhangshuai

增加策划返回修改 增加默认数据

parent d8f64bb6
...@@ -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"]){
...@@ -133,7 +136,9 @@ NSDictionary* appLaunchOpts; ...@@ -133,7 +136,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 +163,9 @@ NSDictionary* appLaunchOpts; ...@@ -158,6 +163,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];
......
...@@ -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 {
......
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