2025-12-22 11:41:23 +08:00
|
|
|
import request from '@/utils/http'
|
|
|
|
|
|
|
|
|
|
export class classifyService {
|
|
|
|
|
//分类树列表 admin/nav/categories/tree
|
|
|
|
|
static getclassifytreeList(params: any) {
|
|
|
|
|
return request.get<any>({
|
|
|
|
|
url: '/admin/post/category/tree',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类列表
|
|
|
|
|
static getclassifyList(params: Api.Common.PaginatingParams) {
|
|
|
|
|
return request.get<Api.Common.CommonListData>({
|
|
|
|
|
url: '/admin/post/category/list',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类添加
|
|
|
|
|
static addclassify(params: any) {
|
|
|
|
|
return request.post<any>({
|
|
|
|
|
url: '/admin/post/category/store',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类编辑
|
|
|
|
|
static editclassify(params: any) {
|
|
|
|
|
return request.post<any>({
|
|
|
|
|
url: '/admin/post/category/update',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类删除
|
|
|
|
|
static deleteclassify(params: any) {
|
|
|
|
|
return request.post<any>({
|
|
|
|
|
url: '/admin/post/category/destroy',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类详情
|
|
|
|
|
static classifydetail(params: any) {
|
|
|
|
|
return request.get<any>({
|
|
|
|
|
url: '/admin/post/category/show',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类内容列表
|
|
|
|
|
static getclassifycontentList(params: Api.Common.PaginatingParams) {
|
|
|
|
|
return request.get<Api.Common.CommonListData>({
|
|
|
|
|
url: '/admin/post/list',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类内容添加
|
|
|
|
|
static addclassifycontent(params: any) {
|
|
|
|
|
return request.post<any>({
|
|
|
|
|
url: '/admin/post/store',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类内容编辑
|
|
|
|
|
static editclassifycontent(params: any) {
|
|
|
|
|
return request.post<any>({
|
|
|
|
|
url: '/admin/post/update',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类内容删除
|
|
|
|
|
static deleteclassifycontent(params: any) {
|
|
|
|
|
return request.post<any>({
|
|
|
|
|
url: '/admin/post/destroy',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//分类内容详情
|
|
|
|
|
static classifycontentdetail(params: any) {
|
|
|
|
|
return request.get<Api.Common.CommonListData>({
|
|
|
|
|
url: '/admin/post/show',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//评论 /admin/post/comment/list?post_id=&parent_id=
|
|
|
|
|
static classifycontentcommentdetail(params: any) {
|
|
|
|
|
return request.get<Api.Common.CommonListData>({
|
|
|
|
|
url: '/admin/post/comment/list',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-12-23 17:08:13 +08:00
|
|
|
//评论删除 /admin/post/comment/destroy
|
|
|
|
|
static deleteclassifycontentcomment(params: any) {
|
|
|
|
|
return request.post<any>({
|
|
|
|
|
url: '/admin/post/comment/destroy',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-12-22 11:41:23 +08:00
|
|
|
}
|