From 430e1a3a2caad460ac05818ca74551b5defd68a1 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 24 Jul 2020 17:57:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=AE=80=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/system/LdapSetting.vue | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/frontend/src/business/components/settings/system/LdapSetting.vue b/frontend/src/business/components/settings/system/LdapSetting.vue index 785101f267..b2eb58ddba 100644 --- a/frontend/src/business/components/settings/system/LdapSetting.vue +++ b/frontend/src/business/components/settings/system/LdapSetting.vue @@ -3,33 +3,34 @@ - + - + + auto-complete="new-password"/> - + - + - + - +
{{$t('ldap.test_connect')}} - {{$t('ldap.test_login')}} + + {{$t('ldap.test_login')}} {{$t('ldap.edit')}} {{$t('commons.save')}} @@ -98,7 +99,7 @@ init() { this.result = this.$get("/system/ldap/info", response => { this.form = response.data; - this.form.open = this.form.open === 'true' ? true : false; + this.form.open = this.form.open === 'true'; this.$nextTick(() => { this.$refs.form.clearValidate(); }) @@ -121,7 +122,7 @@ if (!this.checkParam()) { return false; } - this.result = this.$post("/ldap/test/connect", this.form, response => { + this.result = this.$post("/ldap/test/connect", this.form, () => { this.$success(this.$t('commons.connection_successful')); this.showLogin = true; }, () => { @@ -179,11 +180,11 @@ {paramKey: "ldap.filter", paramValue: this.form.filter, type: "text", sort: 5}, {paramKey: "ldap.mapping", paramValue: this.form.mapping, type: "text", sort: 6}, {paramKey: "ldap.open", paramValue: this.form.open, type: "text", sort: 7} - ] + ]; this.$refs[form].validate(valid => { if (valid) { - this.result = this.$post("/system/save/ldap", param, response => { + this.result = this.$post("/system/save/ldap", param, () => { this.show = true; this.showEdit = true; this.showSave = false; @@ -200,7 +201,7 @@ login(form) { this.$refs[form].validate(valid => { if (valid) { - this.result = this.$post("/ldap/test/login", this.loginForm, response => { + this.result = this.$post("/ldap/test/login", this.loginForm, () => { this.$success(this.$t('ldap.login_success')); }); } else {