2024-04-17 11:15:49 +08:00
|
|
|
|
2024-03-22 15:48:25 +08:00
|
|
|
import request from './request'
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @description 社区分类 -- 列表
|
|
|
|
*/
|
|
|
|
export function communityCategoryListApi(data) {
|
|
|
|
return request.get('community/category/lst', data)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区分类 -- 新增表单
|
|
|
|
*/
|
|
|
|
export function communityCategoryCreateApi() {
|
|
|
|
return request.get('community/category/create/form')
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区分类 -- 编辑表单
|
|
|
|
*/
|
|
|
|
export function communityCategoryUpdateApi(id) {
|
|
|
|
return request.get(`community/category/update/${id}/form`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区分类 -- 删除
|
|
|
|
*/
|
|
|
|
export function communityCategoryDeleteApi(id) {
|
|
|
|
return request.delete(`community/category/delete/${id}`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区分类 -- 修改状态
|
|
|
|
*/
|
|
|
|
export function communityCategoryStatusApi(id, status) {
|
|
|
|
return request.post(`community/category/status/${id}`, { status })
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区话题 -- 列表
|
|
|
|
*/
|
|
|
|
export function communityTopicListApi(data) {
|
|
|
|
return request.get('community/topic/lst', data)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区话题 -- 新增表单
|
|
|
|
*/
|
|
|
|
export function communityTopicCreateApi() {
|
|
|
|
return request.get('community/topic/create/form')
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区话题 -- 编辑表单
|
|
|
|
*/
|
|
|
|
export function communityTopicUpdateApi(id) {
|
|
|
|
return request.get(`community/topic/update/${id}/form`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区话题 -- 删除
|
|
|
|
*/
|
|
|
|
export function communityTopicDeleteApi(id) {
|
|
|
|
return request.delete(`community/topic/delete/${id}`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区话题 -- 修改状态
|
|
|
|
*/
|
|
|
|
export function communityTopicStatusApi(id, status) {
|
|
|
|
return request.post(`community/topic/status/${id}`, { status })
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区话题 -- 修改状态
|
|
|
|
*/
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityTopicHotApi(id, status) {
|
2024-03-22 15:48:25 +08:00
|
|
|
return request.post(`community/topic/hot/${id}`, { status })
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 列表
|
|
|
|
*/
|
|
|
|
export function communityListApi(data) {
|
|
|
|
return request.get('community/lst', data)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 详情
|
|
|
|
*/
|
|
|
|
export function communityDetailApi(id) {
|
|
|
|
return request.get(`community/detail/${id}`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 审核/下架
|
|
|
|
*/
|
|
|
|
export function communityAuditApi(id, data) {
|
|
|
|
return request.post(`community/status/${id}`, data)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 编辑星级
|
|
|
|
*/
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityUpdateApi(id) {
|
2024-03-22 15:48:25 +08:00
|
|
|
return request.get(`community/update/${id}/form`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 编辑状态
|
|
|
|
*/
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityStatusApi(id, status) {
|
|
|
|
return request.post(`community/show/${id}`, { status })
|
2024-03-22 15:48:25 +08:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 是否推荐
|
|
|
|
*/
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityHotApi(id) {
|
2024-03-22 15:48:25 +08:00
|
|
|
return request.post(`community/hot/${id}`)
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 删除
|
|
|
|
*/
|
|
|
|
export function communityDeleteApi(id) {
|
|
|
|
return request.delete(`community/delete/${id}`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 强制下架
|
|
|
|
*/
|
|
|
|
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityOffApi(id) {
|
2024-03-22 15:48:25 +08:00
|
|
|
return request.get(`community/status/${id}/form`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 分类筛选
|
|
|
|
*/
|
|
|
|
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityCateOptionApi() {
|
2024-03-22 15:48:25 +08:00
|
|
|
return request.get(`community/category/option`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区文章 -- 话题筛选
|
|
|
|
*/
|
|
|
|
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityTopicOptionApi() {
|
2024-03-22 15:48:25 +08:00
|
|
|
return request.get(`community/topic/option`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区评论 -- 列表
|
|
|
|
*/
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityReplyListApi(data) {
|
|
|
|
return request.get('community/reply/lst', data)
|
2024-03-22 15:48:25 +08:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区评论 -- 删除
|
|
|
|
*/
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityReplyDeleteApi(id) {
|
|
|
|
return request.delete(`community/reply/delete/${id}`)
|
2024-03-22 15:48:25 +08:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区评论 -- 审核
|
|
|
|
*/
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityReviewApi(id) {
|
2024-03-22 15:48:25 +08:00
|
|
|
return request.get(`community/reply/status/${id}/form`)
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @description 社区内容 -- 标题切换
|
|
|
|
*/
|
2024-04-17 11:15:49 +08:00
|
|
|
export function communityTitleApi() {
|
2024-03-22 15:48:25 +08:00
|
|
|
return request.get(`community/title`)
|
|
|
|
}
|