mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2025-05-20 02:20:15 +09:00
25 lines
545 B
JavaScript
25 lines
545 B
JavaScript
/**
|
|
* 标签接口
|
|
* @see https://api.halo.run/content-api.html#tag/tag-controller
|
|
*/
|
|
|
|
import HttpHandler from '@/common/http/request.js'
|
|
export default {
|
|
/**
|
|
* 查询标签列表
|
|
* @param {Object} params 查询参数
|
|
*/
|
|
getTagList: (params) => {
|
|
return HttpHandler.Get('/api/content/tags', params)
|
|
},
|
|
|
|
/**
|
|
* 查询标签下的文章
|
|
* @param {String} slug 别名
|
|
* @param {Object} params 查询参数
|
|
*/
|
|
getTagPostsList: (slug, params) => {
|
|
return HttpHandler.Get(`/api/content/tags/${slug}/posts`, params)
|
|
},
|
|
}
|