From dcf51c4793312cf711119833f2da8bb0087de84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= Date: Fri, 13 Mar 2020 13:39:18 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=B8=85=E9=99=A4addendpoint=E6=97=B6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E7=9A=84=E6=97=A0=E7=94=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/rightBox/addEndpointBox.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index f8058bdb1..808b7a295 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -533,9 +533,15 @@ this.$refs.addEndpointForm.validate(); return false; } + //对endpointList进行处理,避免携带过多无用数据 + let endpointList = []; + this.endpointList.forEach((item, index) => { + let endpoint = {moduleId: item.moduleId, assetId: item.assetId, port: item.port, param: item.param, path: item.path, host: item.host}; + endpointList.push(endpoint); + }); this.$refs.addEndpointForm.validate((valid) => { if (valid) { - this.$post('endpoint', this.endpointList).then(response => { + this.$post('endpoint', endpointList).then(response => { if (response.code === 200) { this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")}); this.esc();