bmfe / eros-plugin-ios-baseLibrary

eros ios sdk.
https://bmfe.github.io/eros-docs
MIT License
35 stars 50 forks source link

方法名字 bm_loadURL 误写成了 bm_lodaURL #13

Closed wilson-0422 closed 6 years ago

wilson-0422 commented 6 years ago
/**
 这里主要判断是否是本地html,如果是本地html,则加载本地html
 */
-(void)bm_loadURL:(NSString *)url
{
    UIWebView * webview = (UIWebView *)self.view;

    if(webview){
        NSURL *urlPath = [NSURL URLWithString:url];
        if([urlPath.scheme isEqualToString:BM_LOCAL]){
            if (BM_InterceptorOn()) {
                NSString *webPath = [NSString stringWithFormat:@"%@/%@%@",K_JS_PAGES_PATH,urlPath.host,urlPath.path];
                NSURLRequest *request = [NSURLRequest requestWithURL:[[NSURL alloc]initFileURLWithPath:webPath]];
                [webview loadRequest:request];
            }else {
                NSString *debugUrl = [NSString stringWithFormat:@"%@/dist/%@%@",TK_PlatformInfo().url.jsServer,urlPath.host,urlPath.path];
                [self bm_loadURL:debugUrl];
            }
        }else {
            [self bm_loadURL:url];
        }
    }
}
@end
xiaohuapunk commented 6 years ago

新版本 已修复