ソースを参照

bug修复请求不通

hl 1 年間 前
コミット
b62488bf10
1 ファイル変更3 行追加3 行削除
  1. 3 3
      src/web.js

+ 3 - 3
src/web.js

@@ -18,7 +18,7 @@ function init() {
     const app = express();
     const port = 3000;
     // 中间件示例,用于处理JSON请求体
-    app.use(express.json());
+    // app.use(express.json());
     app.use((req, res, next) => {
         var k = "$8gBV!f&L@E"
         if ("timestamp" in req.headers) {
@@ -87,9 +87,9 @@ function init() {
     app.post('/execute', (req, res) => {
         // 获取发送过来的信息(请求体的数据)
         const param = req.body;
-        logger.info(`body:`,JSON.stringify(param))
+        logger.info('--web 启动',param);
         (async (param) => {
-            console.log('请求体:', param);
+            // console.log('请求体:', param);
             var executeType = param.executeType
             if (executeType === "RUN") {
                 await robot.run(param)