mm_os 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +11 -11
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -93,18 +93,18 @@ Soa.prototype.initData = function(config) {
|
|
|
93
93
|
$.runPath = config.runPath;
|
|
94
94
|
|
|
95
95
|
// 修改默认模板路径,改为static下,方便读取css和js
|
|
96
|
-
$.Tpl.prototype.
|
|
97
|
-
if (
|
|
98
|
-
if (!
|
|
99
|
-
|
|
96
|
+
$.Tpl.prototype.init_main = function(cg) {
|
|
97
|
+
if (cg) {
|
|
98
|
+
if (!cg.default_dir) {
|
|
99
|
+
cg.default_dir = "./template/".fullname(config.web.static_path);
|
|
100
100
|
}
|
|
101
101
|
} else {
|
|
102
|
-
|
|
103
|
-
default_dir: "./
|
|
102
|
+
cg = {
|
|
103
|
+
default_dir: "./template/".fullname(config.web.static_path);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
this.set_config(
|
|
107
|
-
this.dir =
|
|
106
|
+
this.set_config(cg);
|
|
107
|
+
this.dir = cg.default_dir;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// 初始化公共函数
|
|
@@ -125,7 +125,7 @@ Soa.prototype.loadModule = function(config) {
|
|
|
125
125
|
$.app = new App();
|
|
126
126
|
this.com = $.com;
|
|
127
127
|
this.app = $.app;
|
|
128
|
-
|
|
128
|
+
|
|
129
129
|
$.task = $.task_admin('sys');
|
|
130
130
|
if (config.sys) {
|
|
131
131
|
if (config.sys.game) {
|
|
@@ -203,7 +203,7 @@ Soa.prototype.initBase = function(cg) {
|
|
|
203
203
|
$.sql.open();
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
|
|
206
|
+
|
|
207
207
|
// 启动计时器
|
|
208
208
|
$.timer.run();
|
|
209
209
|
}
|
|
@@ -230,7 +230,7 @@ Soa.prototype.main = async function(state) {
|
|
|
230
230
|
this.mqtt.run();
|
|
231
231
|
tip += " mqtt";
|
|
232
232
|
}
|
|
233
|
-
|
|
233
|
+
|
|
234
234
|
if (cg.sys && cg.sys.task) {
|
|
235
235
|
console.log('【启动定时任务】');
|
|
236
236
|
$.task.update();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_os",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "这是超级美眉服务端框架,用于快速构建应用程序。",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"mm_ret": "^1.3.8",
|
|
50
50
|
"mm_session": "^1.4.5",
|
|
51
51
|
"mm_statics": "^1.4.1",
|
|
52
|
-
"mm_tpl": "^2.3.
|
|
52
|
+
"mm_tpl": "^2.3.5",
|
|
53
53
|
"mm_xml": "^1.1.4",
|
|
54
54
|
"mosca": "^2.8.3",
|
|
55
55
|
"mqtt": "^5.8.1"
|