shawenguan 1 년 전
부모
커밋
c785529f9c
3개의 변경된 파일15개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 0
      Scripts/manmanbuy/manmanbuyHelper.js
  2. 15 4
      Scripts/util/MagicJS.js
  3. 0 0
      Scripts/util/MagicJS.min.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
Scripts/manmanbuy/manmanbuyHelper.js


+ 15 - 4
Scripts/util/MagicJS.js

@@ -414,7 +414,7 @@ function MagicJS(scriptName = "MagicJS", logLevel = "INFO") {
             this.post(options, err => {});
         }
         log(msg, level = "INFO") {
-            if (!(this.logLevels[this._logLevel] < this.logLevels[level.toUpperCase()])) console.log(`██[${level}] [${this.scriptName}]`+'\n'+`${msg}`+'\n');
+            if (!(this.logLevels[this._logLevel] < this.logLevels[level.toUpperCase()])) console.log(`██[${level}]`+'-'+`${msg}`+'\n');
         }
         logDebug(msg) {
             this.log(msg, "DEBUG");
@@ -603,10 +603,21 @@ function MagicJS(scriptName = "MagicJS", logLevel = "INFO") {
                 $http.post(_options, {});
             }
         }
+        costTime() {
+            let info = `${this.scriptName}执行完毕!`
+            // if (this.isNode && this.isExecComm) {
+            //     info = `指令【${this.comm[1]}】执行完毕!`
+            // }
+            this._endTime = new Date().getTime();
+            const ms = this._endTime - this._startTime;
+            const costTime = ms / 1000;
+            this.log(`${info}耗时【${costTime}】秒`);
+        }
         done(value = {}) {
-            this._endTime = Date.now();
-            let span = (this._endTime - this._startTime) / 1e3;
-            magicJS.logDebug(`SCRIPT COMPLETED: ${span}S.`);
+            // this._endTime = Date.now();
+            // let span = (this._endTime - this._startTime) / 1e3;
+            // this.log(`SCRIPT COMPLETED: ${span}S.`);
+            this.costTime();
             if (typeof $done !== "undefined") {
                 $done(value);
             }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
Scripts/util/MagicJS.min.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.