//
//  SeeMoreViewController.m
//  ALand
//
//  Created by Z on 16/5/11.
//  Copyright © 2016年 Z. All rights reserved.
//

#import "SeeMoreViewController.h"
#import <WebKit/WebKit.h>
@interface SeeMoreViewController ()<WKNavigationDelegate>

@end

@implementation SeeMoreViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"新营养部落分销政策概述";
    
    NSString *inviteWebUrl = [NSString stringWithFormat:@"%@Wap/abcShare.html", [UserInfo shareInstance].appConfig.webShopBaseUrl];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:inviteWebUrl] cachePolicy:NSURLRequestReloadRevalidatingCacheData timeoutInterval:10];
    WKWebView *webView = [WKWebView new];
    webView.navigationDelegate = self;
    [webView loadRequest:request];
    [self.view addSubview:webView];
    webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
    webView.sd_layout.topSpaceToView(self.view, 0).leftSpaceToView(self.view, 0).rightSpaceToView(self.view, 0).bottomSpaceToView(self.view, 0);
    // Do any additional setup after loading the view.
}


#pragma mark - wkwebview delegate

// 页面开始加载时调用
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation
{
    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
}

// 页面加载完成之后调用
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
{
    [MBProgressHUD hideHUDForView:self.view];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
