提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface SmsTemplateVO { |
|
4 |
id?: number |
|
5 |
type?: number |
|
6 |
status: number |
|
7 |
code: string |
|
8 |
name: string |
|
9 |
content: string |
|
10 |
remark: string |
|
11 |
apiTemplateId: string |
|
12 |
channelId?: number |
|
13 |
channelCode?: string |
|
14 |
params?: string[] |
|
15 |
createTime?: Date |
|
16 |
} |
|
17 |
|
|
18 |
export interface SendSmsReqVO { |
|
19 |
mobile: string |
|
20 |
templateCode: string |
|
21 |
templateParams: Map<String, Object> |
|
22 |
} |
|
23 |
|
|
24 |
// 查询短信模板列表 |
|
25 |
export const getSmsTemplatePage = (params: PageParam) => { |
|
26 |
return request.get({ url: '/system/sms-template/page', params }) |
|
27 |
} |
|
28 |
|
|
29 |
// 查询短信模板详情 |
|
30 |
export const getSmsTemplate = (id: number) => { |
|
31 |
return request.get({ url: '/system/sms-template/get?id=' + id }) |
|
32 |
} |
|
33 |
|
|
34 |
// 新增短信模板 |
|
35 |
export const createSmsTemplate = (data: SmsTemplateVO) => { |
|
36 |
return request.post({ url: '/system/sms-template/create', data }) |
|
37 |
} |
|
38 |
|
|
39 |
// 修改短信模板 |
|
40 |
export const updateSmsTemplate = (data: SmsTemplateVO) => { |
|
41 |
return request.put({ url: '/system/sms-template/update', data }) |
|
42 |
} |
|
43 |
|
|
44 |
// 删除短信模板 |
|
45 |
export const deleteSmsTemplate = (id: number) => { |
|
46 |
return request.delete({ url: '/system/sms-template/delete?id=' + id }) |
|
47 |
} |
|
48 |
|
|
49 |
// 导出短信模板 |
|
50 |
export const exportSmsTemplate = (params) => { |
|
51 |
return request.download({ |
|
52 |
url: '/system/sms-template/export-excel', |
|
53 |
params |
|
54 |
}) |
|
55 |
} |
|
56 |
|
|
57 |
// 发送短信 |
|
58 |
export const sendSms = (data: SendSmsReqVO) => { |
|
59 |
return request.post({ url: '/system/sms-template/send-sms', data }) |
|
60 |
} |