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 @@
@@ -210,7 +216,7 @@