feat: http节点

This commit is contained in:
zhanghao 2026-02-03 15:31:34 +08:00
parent e438d41afe
commit 39460cb74c
3 changed files with 35 additions and 1 deletions

View File

@ -102,6 +102,22 @@ const audioOptions = () => {
}]
}
const httpMethodOptions = () => {
return [{
value: 'POST',
label: 'POST'
}, {
value: 'GET',
label: 'GET'
}, {
value: 'PUT',
label: 'PUT'
}, {
value: 'DELETE',
label: 'DELETE'
}]
}
const expressOptions = () => {
return [{
value: 1,
@ -256,6 +272,23 @@ export const collapseList = [
],
outputType: 'json'
},
{
icon: expressionSvg,
name: "HTTP请求",
type: "serviceNode",
desc: "HTTP请求",
action: 'HTTP',
nodeType: "HTTP",
nodeParams: [
{ name: "url", type: "input", input: "", disabled: true, required: true },
{ name: "method", type: "input", input: "POST", componentType: 'select', selectOptions: httpMethodOptions(), disabled: true },
{ name: "timeout", type: "input", input: "10000", componentType: 'number', required: false },
{ name: "headers", type: "input", input: "", disabled: true, required: false },
{ name: "body", type: "input", input: "", disabled: true, required: true },
],
outputType: 'json',
outputParams: [{ name: 'result', type: 'Object', children: [], desc: 'HTTP请求结果'}]
}
],
},
{

View File

@ -114,6 +114,7 @@
:step-strictly="true"
placeholder="请输入"
clearable
@keydown="handleInputKeydown"
/>
<el-select
v-model="property.input"

View File

@ -36,7 +36,7 @@ export default defineConfig(({mode, command}) => {
//赵 http://10.148.108.58:13080
// dev http://10.148.20.34:13080
// target: VITE_API_URL,
target: command === 'build' ? VITE_API_URL : 'http://192.168.0.21:13081',
target: command === 'build' ? VITE_API_URL : 'http://192.168.0.10:13080',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}