From 5ad9757dd55bebc78c1de1070ae9d0af87030b7c Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Wed, 26 Aug 2026 17:23:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/overseas.js | 4 ++++ src/pages/operation/operation.vue | 8 +++---- src/utils/scan-broadcast.js | 35 ++++++++++++++++++++++++------- tests/project-contract.test.mjs | 4 ++++ tests/scan-broadcast.test.mjs | 12 +++++++++++ 5 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/api/overseas.js b/src/api/overseas.js index 50c99e8..8a6eb31 100644 --- a/src/api/overseas.js +++ b/src/api/overseas.js @@ -54,6 +54,7 @@ function rawRequest(method, path, data, token) { } export async function overseasRequest(method, path, data, retry = true) { + console.info('[Overseas PDA API] request', { method, path }) const attemptedToken = session.token let response = await rawRequest(method, path, data, attemptedToken) if (retry && unauthorized(response)) { @@ -61,6 +62,9 @@ export async function overseasRequest(method, path, data, retry = true) { response = await rawRequest(method, path, data, replacementToken) } const body = response?.data || {} + console.info('[Overseas PDA API] response', { method, path, statusCode: response?.statusCode, code: body?.code, + message: body?.message, requestId: body?.requestId || response?.header?.['x-request-id'] || response?.header?.['X-Request-Id'], + traceId: body?.traceId || response?.header?.['x-trace-id'] || response?.header?.['X-Trace-Id'] }) if (!successful(response, body)) throw errorFrom(response, '海外作业请求失败') return body.data } diff --git a/src/pages/operation/operation.vue b/src/pages/operation/operation.vue index 665aa92..0bfc278 100644 --- a/src/pages/operation/operation.vue +++ b/src/pages/operation/operation.vue @@ -3,7 +3,7 @@