mirror of
https://github.com/veops/cmdb.git
synced 2025-08-09 05:40:23 +08:00
前后端全面升级
This commit is contained in:
55
cmdb-ui/src/api/message.js
Normal file
55
cmdb-ui/src/api/message.js
Normal file
@@ -0,0 +1,55 @@
|
||||
import { axios } from '@/utils/request'
|
||||
|
||||
export const getNoticeApps = () => {
|
||||
return axios({
|
||||
url: `/common-setting/v1/message/apps`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export const getNoticeCategoriesByApp = (app_name) => {
|
||||
return axios({
|
||||
url: `/common-setting/v1/message/${app_name}/categories`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export const getMessage = (params) => {
|
||||
return axios({
|
||||
url: `/common-setting/v1/message`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export const postMessage = (data) => {
|
||||
return axios({
|
||||
url: `/common-setting/v1/message`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const updateMessage = (id, data) => {
|
||||
return axios({
|
||||
url: `/common-setting/v1/message/${id}`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const getUnreadMessageCount = (params) => {
|
||||
return axios({
|
||||
url: `/common-setting/v1/message/unread`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export const batchUpdateMessage = (data) => {
|
||||
return axios({
|
||||
url: `/common-setting/v1/message/batch`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user