shawenguan 1 rok pred
rodič
commit
b84c972005

+ 5 - 1
Scripts/hbcpre/hbcpreCompound.js

@@ -345,11 +345,15 @@ async function hbRequest(config, data) {
         magicJS.logger.error(msg);
         if(err.response && err.response.body){
             if (baseConfig.encrypt) {
-                if (typeof body === "string") {
+                if (typeof err.response.body === "string") {
                     let rspText = decryptAES(err.response.body.trim(), baseConfig.k, baseConfig.v);
                     err.message = `${err.message}\n${rspText}`;
                 }
             }
+            if (err.response.statusCode == 401) {
+                // token失效
+                return null;
+            }
         }
         return {
             code: 2000,

+ 6 - 1
Scripts/hbcpre/hbcpreDraw.js

@@ -297,11 +297,16 @@ async function hbRequest(config, data) {
         magicJS.logger.error(msg);
         if(err.response && err.response.body){
             if (baseConfig.encrypt) {
-                if (typeof body === "string") {
+                let rspData = null;
+                if (typeof err.response.body === "string") {
                     let rspText = decryptAES(err.response.body.trim(), baseConfig.k, baseConfig.v);
                     err.message = `${err.message}\n${rspText}`;
                 }
             }
+            if (err.response.statusCode == 401) {
+                // token失效
+                return null;
+            }
         }
         return {
             code: 2000,

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 378 - 0
Scripts/hbcpre/hbcpreExchange.js


+ 5 - 1
Scripts/hbcpre/hbcpreOrder.js

@@ -616,11 +616,15 @@ async function hbRequest(config, data) {
         magicJS.logger.error(msg);
         if(err.response && err.response.body){
             if (baseConfig.encrypt) {
-                if (typeof body === "string") {
+                if (typeof err.response.body === "string") {
                     let rspText = decryptAES(err.response.body.trim(), baseConfig.k, baseConfig.v);
                     err.message = `${err.message}\n${rspText}`;
                 }
             }
+            if (err.response.statusCode == 401) {
+                // token失效
+                return null;
+            }
         }
         return {
             code: 2000,

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov