From 5d30b3b22eaf752eda884e1db24b36ccff096488 Mon Sep 17 00:00:00 2001 From: WeiRan <2392355487@qq.com> Date: Thu, 5 Sep 2024 10:40:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/apitest/apitest.js | 15 +++ src/views/market/apitest/index.vue | 54 ++++++++++- src/views/market/workbench/index.vue | 133 ++++++++++++++------------- 3 files changed, 135 insertions(+), 67 deletions(-) diff --git a/src/api/apitest/apitest.js b/src/api/apitest/apitest.js index 016c551..dec3297 100644 --- a/src/api/apitest/apitest.js +++ b/src/api/apitest/apitest.js @@ -65,6 +65,21 @@ export function sendrequest1(options){ }) } +export function sendrequest2(options){ + // 确保options是一个对象,并且包含必要的属性 + if (!options || typeof options !== 'object' || !options.apiRouter ) { + throw new Error('Invalid options: must be an object with apiRouter '); + } +// 构建完整的URL + const fullUrl = `/background/api/${options.apiRouter}`; + return request({ + url:fullUrl, + method: "post" + }) +} + + + diff --git a/src/views/market/apitest/index.vue b/src/views/market/apitest/index.vue index 66c3c60..c4c9531 100644 --- a/src/views/market/apitest/index.vue +++ b/src/views/market/apitest/index.vue @@ -86,7 +86,7 @@ - +
@@ -119,12 +119,18 @@ 传1时返回单号,默认不返回单号(建议传入)
- + + 发送请求 + 发送请求 + + + 发送请求 +
 
@@ -210,7 +216,7 @@