 
 
     // MAKR: - init
-    public init?(workFolderFileURL: NSURL, indexRelativePath: String) {
+    public init?(baseURL: NSURL, indexPath: String) {
         super.init(nibName: nil, bundle: nil)
 
-        var isDirectory: ObjCBool = ObjCBool(false)
-        let isExist = NSFileManager.defaultManager().fileExistsAtPath(workFolderFileURL.path ?? "", isDirectory: &isDirectory)
-
-        if !isExist || !isDirectory.boolValue {
-            print("\(workFolderFileURL.path) does not exist" )
-            return nil
+        if baseURL.fileURL {
+            // 如果是本地文件，则判断对应文件夹是否存在
+            var isDirectory: ObjCBool = ObjCBool(false)
+            let fileFolderPath = baseURL.path ?? ""
+            let isExist = NSFileManager.defaultManager().fileExistsAtPath(fileFolderPath, isDirectory: &isDirectory)
+            if !isExist || !isDirectory.boolValue {
+                print("\(fileFolderPath) does not exist" )
+                return nil
+            }
         }
 
-        _workFolderURL = workFolderFileURL
-        _indexPath = indexRelativePath
+        _baseURL = baseURL
+        _indexPath = indexPath
 
     }
 



    // MARK: - Private properties
    private var _loadFileURL: NSURL?

    private var _workFolderURL: NSURL?
    private var _indexPath: String = "index.html"

}

        let resultJS = result.constructResultJSWithCallbackID(callbackID)
        webView.evaluateJavaScript(resultJS) { (obj, error) -> Void in
            if error == nil {
//                print("Callback JS run successfully. Result : \(obj)")
            } else {
                print("Callback JS run error. \(error)")
            }
