初始代码
This commit is contained in:
34
src/api/msgCenter/accountConfig.ts
Normal file
34
src/api/msgCenter/accountConfig.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { defHttp } from '@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
Prefix = '/api/message/AccountConfig',
|
||||
}
|
||||
|
||||
// 获取配置列表
|
||||
export function getConfigList(data) {
|
||||
return defHttp.get({ url: Api.Prefix, data });
|
||||
}
|
||||
// 新建配置
|
||||
export function create(data) {
|
||||
return defHttp.post({ url: Api.Prefix, data });
|
||||
}
|
||||
// 修改配置
|
||||
export function update(data) {
|
||||
return defHttp.put({ url: Api.Prefix + '/' + data.id, data });
|
||||
}
|
||||
// 获取配置
|
||||
export function getInfo(id) {
|
||||
return defHttp.get({ url: Api.Prefix + '/' + id });
|
||||
}
|
||||
// 删除配置
|
||||
export function delConfig(id) {
|
||||
return defHttp.delete({ url: Api.Prefix + '/' + id });
|
||||
}
|
||||
// 复制配置
|
||||
export function copy(id) {
|
||||
return defHttp.post({ url: Api.Prefix + `/${id}/Actions/Copy` });
|
||||
}
|
||||
// 测试配置
|
||||
export function testConfig(data) {
|
||||
return defHttp.post({ url: Api.Prefix + `/${data.testType}`, data });
|
||||
}
|
||||
22
src/api/msgCenter/msgMonitor.ts
Normal file
22
src/api/msgCenter/msgMonitor.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { defHttp } from '@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
Prefix = '/api/message/MessageMonitor',
|
||||
}
|
||||
|
||||
// 获取消息监控列表
|
||||
export function getMsgMonitorList(data) {
|
||||
return defHttp.get({ url: Api.Prefix, data });
|
||||
}
|
||||
// 获取详情
|
||||
export function getInfo(id) {
|
||||
return defHttp.get({ url: Api.Prefix + '/detail/' + id });
|
||||
}
|
||||
// 批量删除
|
||||
export function delMsgMonitor(data) {
|
||||
return defHttp.delete({ url: Api.Prefix + '/batchRemove', data });
|
||||
}
|
||||
// 一键清空
|
||||
export function emptyMsgMonitor() {
|
||||
return defHttp.delete({ url: Api.Prefix + '/empty' });
|
||||
}
|
||||
34
src/api/msgCenter/msgTemplate.ts
Normal file
34
src/api/msgCenter/msgTemplate.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { defHttp } from '@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
Prefix = '/api/message/MessageTemplateConfig',
|
||||
}
|
||||
|
||||
// 获取消息模板列表
|
||||
export function getMsgTemplateList(data) {
|
||||
return defHttp.get({ url: Api.Prefix, data });
|
||||
}
|
||||
// 新建消息模板
|
||||
export function create(data) {
|
||||
return defHttp.post({ url: Api.Prefix, data });
|
||||
}
|
||||
// 修改消息模板
|
||||
export function update(data) {
|
||||
return defHttp.put({ url: Api.Prefix + '/' + data.id, data });
|
||||
}
|
||||
// 获取消息模板
|
||||
export function getInfo(id) {
|
||||
return defHttp.get({ url: Api.Prefix + '/' + id });
|
||||
}
|
||||
// 删除消息模板
|
||||
export function delMsgTemplate(id) {
|
||||
return defHttp.delete({ url: Api.Prefix + '/' + id });
|
||||
}
|
||||
// 复制消息模板
|
||||
export function copy(id) {
|
||||
return defHttp.post({ url: Api.Prefix + `/${id}/Actions/Copy` });
|
||||
}
|
||||
// 测试发送配置
|
||||
export function testMsgTemplate(data) {
|
||||
return defHttp.post({ url: Api.Prefix + `/testSendMail`, data });
|
||||
}
|
||||
42
src/api/msgCenter/sendConfig.ts
Normal file
42
src/api/msgCenter/sendConfig.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { defHttp } from '@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
Prefix = '/api/message/SendMessageConfig',
|
||||
}
|
||||
|
||||
// 获取发送配置列表(分页)
|
||||
export function getSendConfigList(data) {
|
||||
return defHttp.get({ url: Api.Prefix, data });
|
||||
}
|
||||
// 新建发送配置
|
||||
export function create(data) {
|
||||
return defHttp.post({ url: Api.Prefix, data });
|
||||
}
|
||||
// 修改发送配置
|
||||
export function update(data) {
|
||||
return defHttp.put({ url: Api.Prefix + '/' + data.id, data });
|
||||
}
|
||||
// 获取发送配置
|
||||
export function getInfo(id) {
|
||||
return defHttp.get({ url: Api.Prefix + '/' + id });
|
||||
}
|
||||
// 删除发送配置
|
||||
export function delSendConfig(id) {
|
||||
return defHttp.delete({ url: Api.Prefix + '/' + id });
|
||||
}
|
||||
// 复制发送配置
|
||||
export function copy(id) {
|
||||
return defHttp.post({ url: Api.Prefix + `/${id}/Actions/Copy` });
|
||||
}
|
||||
// 测试发送配置获取配置信息
|
||||
export function getTestSendConfig(id) {
|
||||
return defHttp.post({ url: Api.Prefix + `/getTestConfig/${id}` });
|
||||
}
|
||||
// 测试发送配置
|
||||
export function testSendConfig(data) {
|
||||
return defHttp.post({ url: Api.Prefix + `/testSendConfig`, data });
|
||||
}
|
||||
// 发送配置下拉列表
|
||||
export function getSendConfigSelect(data) {
|
||||
return defHttp.get({ url: Api.Prefix + `/getSendConfigList`, data });
|
||||
}
|
||||
Reference in New Issue
Block a user