From 7b30c5f333f9ea914503a5c135c80ebaa8649fc1 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Fri, 23 Dec 2022 10:01:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?(debug)=E4=B8=83=E7=89=9B=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 144 ++++++++++++++++++--------------- web/routes/attachment/index.js | 2 + 2 files changed, 81 insertions(+), 65 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 53726d2..5e8a655 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,68 +1,82 @@ { - // 使用 IntelliSense 了解相关属性。 - // 悬停以查看现有属性的描述。 - // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "启动 API", - "program": "${workspaceRoot}/api/server.js", - "env": { - "NODE_ENV": "development" - }, - "args": [ - "-p 4700", - "-f http://localhost:4700", - // 研发 - "-g postgres://postgres:123@10.8.30.166:5432/hr-dev", - "--redisHost localhost", - "--redisPort 6379", - "--apiEmisUrl http://localhost:14000", - // 测试 + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "启动 API", + "program": "${workspaceRoot}/api/server.js", + "env": { + "NODE_ENV": "development" + }, + "args": [ + "-p 4700", + "-f http://localhost:4700", + // 研发 + // "-g postgres://postgres:123@10.8.30.166:5432/hr-dev", + "--redisHost localhost", + "--redisPort 6379", + "--apiEmisUrl http://localhost:14000", + // 测试 // "--apiEmisUrl http://10.8.30.161:1111", // "--redisHost 10.8.30.112", - "--qnak 5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu", - "--qnsk w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5", - "--qnbkt pep-resource", - // "--qndmn http://resources.anxinyun.cn", - "--qndmn https://pepsource.anxinyun.cn", - - // 似乎不能传空 先注释 * 2 - // "--clickHouseUser ", - // "--clickHousePassword ", - - "--clickHousePort 30123", - - // 开发 - // "--clickHouseUrl http://10.8.30.71", - // "--clickHousePepEmis pepca_dev", - // "--clickHouseCamworkflow camworkflow", - // "--clickHouseHr hr_dev", - - // 测试 - "--clickHouseUrl http://10.8.30.161", - "--clickHousePepEmis pepca8", - "--clickHouseCamworkflow camworkflow", - "--clickHouseHr hrm", - ] - }, - { - "type": "node", - "request": "launch", - "name": "run mocha", - "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", - "stopOnEntry": false, - "args": [ - "app/test/*.test.js", - "--no-timeouts" - ], - "cwd": "${workspaceRoot}", - "runtimeExecutable": null, - "env": { - "NODE_ENV": "development" - } - } - ] - } \ No newline at end of file + "-g postgres://postgres:123@10.8.30.166:5432/HRM", + "--qnak 5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu", + "--qnsk w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5", + "--qnbkt pep-resource", + // "--qndmn http://resources.anxinyun.cn", + "--qndmn https://pepsource.anxinyun.cn", + // 似乎不能传空 先注释 * 2 + // "--clickHouseUser ", + // "--clickHousePassword ", + "--clickHousePort 30123", + // 开发 + // "--clickHouseUrl http://10.8.30.71", + // "--clickHousePepEmis pepca_dev", + // "--clickHouseCamworkflow camworkflow", + // "--clickHouseHr hr_dev", + // 测试 + "--clickHouseUrl http://10.8.30.161", + "--clickHousePepEmis pepca8", + "--clickHouseCamworkflow camworkflow", + "--clickHouseHr hrm", + ] + }, + { + "type": "node", + "request": "launch", + "name": "run hrm-web", + "program": "${workspaceRoot}/web/server.js", + "args": [ + "-p", + "5700", + "-u", + "http://localhost:4700", + "--apiHrUrl", + "http://localhost:4700", + "-d", + "localhost", + "--webPepUrl", + "http://localhost:5300", + "--apiEmisUrl", + "http://localhost:4000", + "--qnak", + "5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu", + "--qnsk", + "w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5", + "--qnbkt", + "pep-resource", + "--qndmn", + "https://pepsource.anxinyun.cn", + "--wkys", + "http://10.8.30.109:14000", + ], + "env": { + "NODE_ENV": "development" + } + } + ] +} \ No newline at end of file diff --git a/web/routes/attachment/index.js b/web/routes/attachment/index.js index efd79d0..9be76f3 100644 --- a/web/routes/attachment/index.js +++ b/web/routes/attachment/index.js @@ -35,7 +35,9 @@ module.exports = { try { const { filename } = ctx.request.query; const fkey = decodeURI(ctx.path.slice(fetchUrl.length + 1)).replace(/\.json$/, '.js'); + console.log(fkey); const publicDownloadUrl = await app.fs.attachment.download(fkey); + console.log("publicDownloadUrl:", publicDownloadUrl); ctx.status = 200; if (filename) ctx.attachment(filename); ctx.body = request.get(publicDownloadUrl); From c1cb6f459012e2252a68d89e4b5b0e3f6a5c41eb Mon Sep 17 00:00:00 2001 From: zhouxin Date: Fri, 23 Dec 2022 10:18:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?(*)=E5=8E=BB=E6=8E=89console.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/routes/attachment/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/routes/attachment/index.js b/web/routes/attachment/index.js index 9be76f3..efd79d0 100644 --- a/web/routes/attachment/index.js +++ b/web/routes/attachment/index.js @@ -35,9 +35,7 @@ module.exports = { try { const { filename } = ctx.request.query; const fkey = decodeURI(ctx.path.slice(fetchUrl.length + 1)).replace(/\.json$/, '.js'); - console.log(fkey); const publicDownloadUrl = await app.fs.attachment.download(fkey); - console.log("publicDownloadUrl:", publicDownloadUrl); ctx.status = 200; if (filename) ctx.attachment(filename); ctx.body = request.get(publicDownloadUrl);