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

#import "AgreementViewController.h"

@interface AgreementViewController ()

@end

@implementation AgreementViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"经营者入驻协议";
    
    
    WS(weakSelf)
    [[HTTPCilent shareCilent] GET:[NSString stringWithFormat:@"app/getAppConfig/%@", kDomain] parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
        
        [weakSelf setUpWebView:responseObject[@"webShopBaseUrl"]];
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        
    }];
    
    
    // Do any additional setup after loading the view from its nib.
}

- (void)setUpWebView:(NSString *)url {
    
    NSString *inviteWebUrl = [NSString stringWithFormat:@"%@Wap/visitorXy.html", url];
    
    NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:inviteWebUrl]];
    UIWebView *webView = [UIWebView new];
    [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);
}


- (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
