diff --git a/src/views/flow/config.js b/src/views/flow/config.js index 0dcf376..cf2e441 100644 --- a/src/views/flow/config.js +++ b/src/views/flow/config.js @@ -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请求结果'}] + } ], }, { diff --git a/src/views/flow/nodes/common/serviceNode.vue b/src/views/flow/nodes/common/serviceNode.vue index 01b0244..3843162 100644 --- a/src/views/flow/nodes/common/serviceNode.vue +++ b/src/views/flow/nodes/common/serviceNode.vue @@ -114,6 +114,7 @@ :step-strictly="true" placeholder="请输入" clearable + @keydown="handleInputKeydown" /> { //赵 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/, '') }