diff --git a/src/api/option.js b/src/api/option.js index 5c97dc556..6d985354d 100644 --- a/src/api/option.js +++ b/src/api/option.js @@ -29,4 +29,12 @@ optionApi.save = options => { }) } +optionApi.testMail = param => { + return service({ + url: `/api/admin/options/test_mail`, + method: 'post', + data: param + }) +} + export default optionApi diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 111a87c4f..01cc7bca2 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -437,7 +437,11 @@ label="发送协议:" :wrapper-col="wrapperCol" > - + + + + SSL + - + - + - 发送 + 发送 @@ -584,7 +589,8 @@ export default { aliyunFormHidden: false, logoDrawerVisible: false, faviconDrawerVisible: false, - options: [] + options: [], + mailParam: {} } }, mounted() { @@ -638,6 +644,11 @@ export default { handleShowFaviconAttachDrawer() { this.faviconDrawerVisible = true }, + handleTestMailClick() { + optionApi.testMail(this.mailParam).then(response => { + this.$message.info(response.data.message) + }) + }, handleSelectFavicon(data) { this.options.blog_favicon = data.path this.faviconDrawerVisible = false diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 7ab410970..ae156d4e9 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -87,13 +87,6 @@ export default { } else { this.$router.replace({ name: 'Dashboard' }) } - // 延迟 1 秒显示欢迎信息 - setTimeout(() => { - this.$notification.success({ - message: '欢迎', - description: `欢迎回来` - }) - }, 1000) } } } @@ -101,16 +94,17 @@ export default {