From 553805e03d771cde3e3003fc7040226a1d4af63b Mon Sep 17 00:00:00 2001 From: OrangeM21 Date: Fri, 19 Jun 2020 16:03:12 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=B2=A1=E6=9C=89=E5=88=9D=E5=A7=8B=E5=80=BC?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/settings/index.vue | 51 +++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/src/views/settings/index.vue b/src/views/settings/index.vue index fbc1124f5..a27a9a341 100644 --- a/src/views/settings/index.vue +++ b/src/views/settings/index.vue @@ -130,13 +130,58 @@ export default { } }, basicData(data) { - return data.basic + const basic = data.basic + if (basic.SITE_URL === null) { + basic.SITE_URL = '' + } + if (basic.EMAIL_SUBJECT_PREFIX === null) { + basic.EMAIL_SUBJECT_PREFIX = '' + } + if (basic.USER_GUIDE_URL === null) { + basic.USER_GUIDE_URL = '' + } + return basic }, emailData(data) { - return data.email + const email = data.email + if (email.EMAIL_FROM === null) { + email.EMAIL_FROM = '' + } + if (email.EMAIL_RECIPIENT === null) { + email.EMAIL_RECIPIENT = '' + } + if (email.EMAIL_USE_TLS === null) { + email.EMAIL_USE_TLS = false + } + if (email.EMAIL_HOST === null) { + email.EMAIL_HOST = '' + } + if (email.EMAIL_HOST_USER === null) { + email.EMAIL_HOST_USER = '' + } + if (email.EMAIL_PORT === null) { + email.EMAIL_PORT = '' + } + if (email.EMAIL_USE_SSL === null) { + email.EMAIL_USE_SSL = false + } + return email }, emailContentData(data) { - return data.email_content + const email_content = data.email_content + if (email_content.EMAIL_CUSTOM_USER_CREATED_BODY === null) { + email_content.EMAIL_CUSTOM_USER_CREATED_BODY = '' + } + if (email_content.EMAIL_CUSTOM_USER_CREATED_HONORIFIC === null) { + email_content.EMAIL_CUSTOM_USER_CREATED_HONORIFIC = '' + } + if (email_content.EMAIL_CUSTOM_USER_CREATED_SIGNATURE === null) { + email_content.EMAIL_CUSTOM_USER_CREATED_SIGNATURE = '' + } + if (email_content.EMAIL_CUSTOM_USER_CREATED_SUBJECT === null) { + email_content.EMAIL_CUSTOM_USER_CREATED_SUBJECT = '' + } + return email_content }, ldapData(data) { return data.ldap