ShiShiYiBan/yudao-ui-admin-vue3/src/api/system/sensitiveWord/index.ts

43 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-11-03 16:55:01 +08:00
import request from '@/config/axios'
2022-07-18 19:06:37 +08:00
import type { SensitiveWordVO } from './types'
// 查询敏感词列表
2022-07-19 22:33:54 +08:00
export const getSensitiveWordPageApi = (params) => {
return request.get({ url: '/system/sensitive-word/page', params })
2022-07-18 19:06:37 +08:00
}
// 查询敏感词详情
export const getSensitiveWordApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.get({ url: '/system/sensitive-word/get?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 新增敏感词
2022-07-19 22:33:54 +08:00
export const createSensitiveWordApi = (data: SensitiveWordVO) => {
return request.post({ url: '/system/sensitive-word/create', data })
2022-07-18 19:06:37 +08:00
}
// 修改敏感词
2022-07-19 22:33:54 +08:00
export const updateSensitiveWordApi = (data: SensitiveWordVO) => {
return request.put({ url: '/system/sensitive-word/update', data })
2022-07-18 19:06:37 +08:00
}
// 删除敏感词
export const deleteSensitiveWordApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.delete({ url: '/system/sensitive-word/delete?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 导出敏感词
export const exportSensitiveWordApi = (params) => {
2022-07-25 21:03:14 +08:00
return request.download({ url: '/system/sensitive-word/export-excel', params })
2022-07-18 19:06:37 +08:00
}
// 获取所有敏感词的标签数组
export const getSensitiveWordTagsApi = () => {
2022-07-19 22:33:54 +08:00
return request.get({ url: '/system/sensitive-word/get-tags' })
2022-07-18 19:06:37 +08:00
}
// 获得文本所包含的不合法的敏感词数组
export const validateTextApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.get({ url: '/system/sensitive-word/validate-text?' + id })
2022-07-18 19:06:37 +08:00
}