提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface MailTemplateVO { |
|
4 |
id: number |
|
5 |
name: string |
|
6 |
code: string |
|
7 |
accountId: number |
|
8 |
nickname: string |
|
9 |
title: string |
|
10 |
content: string |
|
11 |
params: string |
|
12 |
status: number |
|
13 |
remark: string |
|
14 |
} |
|
15 |
|
|
16 |
export interface MailSendReqVO { |
|
17 |
mail: string |
|
18 |
templateCode: string |
|
19 |
templateParams: Map<String, Object> |
|
20 |
} |
|
21 |
|
|
22 |
// 查询邮件模版列表 |
|
23 |
export const getMailTemplatePage = async (params: PageParam) => { |
|
24 |
return await request.get({ url: '/system/mail-template/page', params }) |
|
25 |
} |
|
26 |
|
|
27 |
// 查询邮件模版详情 |
|
28 |
export const getMailTemplate = async (id: number) => { |
|
29 |
return await request.get({ url: '/system/mail-template/get?id=' + id }) |
|
30 |
} |
|
31 |
|
|
32 |
// 新增邮件模版 |
|
33 |
export const createMailTemplate = async (data: MailTemplateVO) => { |
|
34 |
return await request.post({ url: '/system/mail-template/create', data }) |
|
35 |
} |
|
36 |
|
|
37 |
// 修改邮件模版 |
|
38 |
export const updateMailTemplate = async (data: MailTemplateVO) => { |
|
39 |
return await request.put({ url: '/system/mail-template/update', data }) |
|
40 |
} |
|
41 |
|
|
42 |
// 删除邮件模版 |
|
43 |
export const deleteMailTemplate = async (id: number) => { |
|
44 |
return await request.delete({ url: '/system/mail-template/delete?id=' + id }) |
|
45 |
} |
|
46 |
|
|
47 |
// 发送邮件 |
|
48 |
export const sendMail = (data: MailSendReqVO) => { |
|
49 |
return request.post({ url: '/system/mail-template/send-mail', data }) |
|
50 |
} |