Explorar el Código

后端脚本print方法增加时间等信息

huqi hace 5 años
padre
commit
8d92f34bc4

+ 2 - 0
o2web/source/x_desktop/js/initalScriptSubstitute.js

@@ -824,6 +824,8 @@ var _Actions = {
 };
 bind.Actions = _Actions;
 
+print = function(str, type){}
+bind.print = print;
 
 bind.library = library;
 bind.data = this.data;

+ 3 - 0
o2web/source/x_desktop/js/initalServiceScriptSubstitute.js

@@ -900,6 +900,9 @@ var _org = {
         }
 };
 
+print = function(str, type){}
+bind.print = print;
+
 bind.org = _org;
 bind.library = library;
 bind.define = _define;

+ 10 - 1
o2web/source/x_desktop/js/initialScriptText.js

@@ -815,6 +815,15 @@ var _Actions = {
 bind.Actions = _Actions;
 
 
+var oPrint = print;
+print = function(str, type){
+    var d = new Date();
+    var t = (type || "PRINT").toUpperCase();
+    var l = "[Script]";
+    oPrint(d.format("db")+"."+d.getMilliseconds()+" "+t+" "+l+" "+str);
+}
+bind.print = print;
+
 bind.library = library;
 bind.data = this.data;
 bind.workContext = wrapWorkContext;
@@ -911,4 +920,4 @@ bind.request = {
             return null
         }
     }
-}
+}

+ 8 - 0
o2web/source/x_desktop/js/initialServiceScriptText.js

@@ -3259,6 +3259,14 @@ var _org = {
     }
 };
 
+var oPrint = print;
+print = function(str, type){
+    var d = new Date();
+    var t = (type || "PRINT").toUpperCase();
+    var l = "[ServiceScript]";
+    oPrint(d.format("db")+"."+d.getMilliseconds()+" "+t+" "+l+" "+str);
+}
+bind.print = print;
 bind.org = _org;
 bind.library = library;
 bind.define = _define;