From 63fc4c0f1eebb6671097030d2f12758affb1f8a9 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 31 Aug 2020 15:15:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=9D=E5=AD=98jira=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E4=BF=A1=E6=81=AF=E6=97=B6=E8=A1=A5=E5=85=A8=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/IssuesManagement.vue | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/frontend/src/business/components/settings/organization/IssuesManagement.vue b/frontend/src/business/components/settings/organization/IssuesManagement.vue index b92784626b..86b10cf319 100644 --- a/frontend/src/business/components/settings/organization/IssuesManagement.vue +++ b/frontend/src/business/components/settings/organization/IssuesManagement.vue @@ -161,18 +161,26 @@ this.$warning(this.$t('organization.integration.choose_platform')); return; } - let param = {}; - let auth = { - account: this.form.account, - password: this.form.password, - url: this.form.url, - issuetype: this.form.issuetype - }; - param.organizationId = getCurrentUser().lastOrganizationId; - param.platform = this.platform; - param.configuration = JSON.stringify(auth); + this.$refs[form].validate(valid => { if (valid) { + + let formatUrl = this.form.url; + if (!formatUrl.endsWith('/')) { + formatUrl = formatUrl + '/'; + } + + let param = {}; + let auth = { + account: this.form.account, + password: this.form.password, + url: formatUrl, + issuetype: this.form.issuetype + }; + param.organizationId = getCurrentUser().lastOrganizationId; + param.platform = this.platform; + param.configuration = JSON.stringify(auth); + this.result = this.$post("service/integration/save", param, () => { this.show = true; this.showEdit = true;