From 3f1a3a0d5cdf00436fe7ded361ec54138dba9def Mon Sep 17 00:00:00 2001
From: dap1 <15891557205@163.com>
Date: Thu, 18 May 2023 16:13:10 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E9=82=AE=E4=BB=B6?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/mail/template.ts | 25 +++++-
.../system/mail/template/SendMailModal.vue | 90 +++++++++++++++++++
.../system/mail/template/TemplateModal.vue | 2 +-
src/views/system/mail/template/index.vue | 12 +--
.../system/mail/template/template.data.ts | 31 ++++++-
5 files changed, 152 insertions(+), 8 deletions(-)
create mode 100644 src/views/system/mail/template/SendMailModal.vue
diff --git a/src/api/system/mail/template.ts b/src/api/system/mail/template.ts
index e66a8d4c..c571a916 100644
--- a/src/api/system/mail/template.ts
+++ b/src/api/system/mail/template.ts
@@ -25,7 +25,30 @@ export function getMailTemplatePage(params) {
return defHttp.get({ url: '/system/mail-template/page', params })
}
+// 邮件模板
+export type MailTemplate = {
+ name: string // 标题
+ code: string // 编码
+ accountId: number
+ nickname: string // 发送人
+ title: string // 标题
+ content: string // 内容
+ status: number //
+ remark?: any // 备注
+ id: number
+ params: string[] // 模板里的参数
+ createTime: number
+}
+
+export type SendMailParams = {
+ mail: string
+ templateCode: string
+ templateParams: {
+ [key: string]: any
+ }
+}
+
// 发送测试邮件
-export function sendMail(data) {
+export function sendMail(data: SendMailParams) {
return defHttp.post({ url: '/system/mail-template/send-mail', data })
}
diff --git a/src/views/system/mail/template/SendMailModal.vue b/src/views/system/mail/template/SendMailModal.vue
new file mode 100644
index 00000000..84d9a174
--- /dev/null
+++ b/src/views/system/mail/template/SendMailModal.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/mail/template/TemplateModal.vue b/src/views/system/mail/template/TemplateModal.vue
index 19cb2d26..7f0a5f6e 100644
--- a/src/views/system/mail/template/TemplateModal.vue
+++ b/src/views/system/mail/template/TemplateModal.vue
@@ -20,7 +20,7 @@ const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
- labelWidth: 120,
+ labelWidth: 100,
baseColProps: { span: 24 },
schemas: formSchema,
showActionButtonGroup: false,
diff --git a/src/views/system/mail/template/index.vue b/src/views/system/mail/template/index.vue
index cb95d762..07f8524c 100644
--- a/src/views/system/mail/template/index.vue
+++ b/src/views/system/mail/template/index.vue
@@ -38,7 +38,8 @@
-
+
+