talk_appAmin/api/talk/post.js

45 lines
733 B
JavaScript

import request from '@/utils/request'
// 查询话题投稿列表
export function listPost(query) {
return request({
url: '/talk/post/list',
method: 'get',
params: query
})
}
// 查询话题投稿详细
export function getPost(id) {
return request({
url: '/talk/post/' + id,
method: 'get'
})
}
// 新增话题投稿
export function addPost(data) {
return request({
url: '/talk/post',
method: 'post',
data: data
})
}
// 修改话题投稿
export function updatePost(data) {
return request({
url: '/talk/post',
method: 'put',
data: data
})
}
// 删除话题投稿
export function delPost(id) {
return request({
url: '/talk/post/' + id,
method: 'delete'
})
}