Commit 955ffbfe by 蒋勇

context inject

parent 2b0c39ba
...@@ -179,7 +179,7 @@ class System { ...@@ -179,7 +179,7 @@ class System {
data: data, data: data,
}; };
} }
static register (key, ClassObj, groupName, filename) { static register(key, ClassObj, groupName, filename) {
if (System.objTable[key] != null) { if (System.objTable[key] != null) {
throw new Error("相同key的对象已经存在"); throw new Error("相同key的对象已经存在");
} else { } else {
...@@ -194,7 +194,7 @@ class System { ...@@ -194,7 +194,7 @@ class System {
return System.objTable[key]; return System.objTable[key];
} }
static getObject (objpath) { static getObject(objpath) {
var pathArray = objpath.split("."); var pathArray = objpath.split(".");
var packageName = pathArray[0]; var packageName = pathArray[0];
var groupName = pathArray[1]; var groupName = pathArray[1];
...@@ -221,6 +221,7 @@ class System { ...@@ -221,6 +221,7 @@ class System {
ClassObj = require(objabspath); ClassObj = require(objabspath);
} catch (e) { } catch (e) {
// console.log(e) // console.log(e)
let fname = objsettings[packageName + "base"]; let fname = objsettings[packageName + "base"];
ClassObj = require(fname); ClassObj = require(fname);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment