From e4b7f3a688e9cb74f875e41f0362aa60e2299422 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 20 Mar 2024 15:01:42 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E9=82=AE=E7=AE=B1=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/api/email-setting.ts | 38 ++++++++++ ui/src/router/modules/setting.ts | 17 ++++- ui/src/views/email/index.vue | 121 +++++++++++++++++++++++++++++++ ui/src/views/team/index.vue | 2 +- ui/src/views/template/index.vue | 2 +- 5 files changed, 176 insertions(+), 4 deletions(-) create mode 100644 ui/src/api/email-setting.ts create mode 100644 ui/src/views/email/index.vue diff --git a/ui/src/api/email-setting.ts b/ui/src/api/email-setting.ts new file mode 100644 index 000000000..9fc8bf508 --- /dev/null +++ b/ui/src/api/email-setting.ts @@ -0,0 +1,38 @@ +import { Result } from '@/request/Result' +import { get, post, del, put } from '@/request/index' +import type { pageRequest } from '@/api/type/common' +import { type Ref } from 'vue' + +const prefix = '/email_setting' +/** + * 获取邮箱设置 + */ +const getEmailSetting: (loading?: Ref) => Promise> = (loading) => { + return get(`${prefix}`, undefined, loading) +} + +/** + * 邮箱测试 + */ +const postTestEmail: (data: any, loading?: Ref) => Promise> = ( + data, + loading +) => { + return post(`${prefix}`, data, undefined, loading) +} + +/** + * 修改邮箱设置 + */ +const putEmailSetting: (data: any, loading?: Ref) => Promise> = ( + data, + loading +) => { + return put(`${prefix}`, data, undefined, loading) +} + +export default { + getEmailSetting, + postTestEmail, + putEmailSetting +} diff --git a/ui/src/router/modules/setting.ts b/ui/src/router/modules/setting.ts index f8bcc4c4b..48404a017 100644 --- a/ui/src/router/modules/setting.ts +++ b/ui/src/router/modules/setting.ts @@ -33,7 +33,7 @@ const settingRouter = { meta: { icon: 'app-team', iconActive: 'app-team-active', - title: '团队管理', + title: '团队成员', activeMenu: '/setting', parentPath: '/setting', parentName: 'setting' @@ -46,12 +46,25 @@ const settingRouter = { meta: { icon: 'app-template', iconActive: 'app-template-active', - title: '模型管理', + title: '模型设置', activeMenu: '/setting', parentPath: '/setting', parentName: 'setting' }, component: () => import('@/views/template/index.vue') + }, + { + path: '/email', + name: 'email', + meta: { + icon: 'Message', + title: '邮箱设置', + activeMenu: '/setting', + parentPath: '/setting', + parentName: 'setting', + permission: new Role('ADMIN') + }, + component: () => import('@/views/email/index.vue') } ] } diff --git a/ui/src/views/email/index.vue b/ui/src/views/email/index.vue new file mode 100644 index 000000000..ce5ac9d90 --- /dev/null +++ b/ui/src/views/email/index.vue @@ -0,0 +1,121 @@ + + + diff --git a/ui/src/views/team/index.vue b/ui/src/views/team/index.vue index fd5529b9c..daa9c509e 100644 --- a/ui/src/views/team/index.vue +++ b/ui/src/views/team/index.vue @@ -1,5 +1,5 @@