case WebVcSourceTypeURL:
{
//设置缓存策略
NSURLRequest *req = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:self.webUrl] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0];
[_webView loadRequest:req];
WS(ws);
//设置缓存的大小
self.urlCache = [NSURLCache sharedURLCache];
[self.urlCache setMemoryCapacity:1*1024*1024];
NSCachedURLResponse *response =[self.urlCache cachedResponseForRequest:req];
//如果缓存为空
if (response == nil)
{
//跳到默认页
[self.defaultView setNetworkStatus:KHttpStatusNullHttp needBlock:^{
[ws loadWebView];
}];
}
else
{//否则就隐藏默认页
self.defaultView.hidden = YES;
}
}
break;