25 lines
764 B
TypeScript
25 lines
764 B
TypeScript
import type { PageResult } from '@/model/base'
|
|
import type { Article, ArticleParams, Category, CreateCarousalsRequest } from '@/model/pet-manual'
|
|
import httpClient from '@/api/httpClient'
|
|
|
|
function getCarousalList() {
|
|
return httpClient.get<CreateCarousalsRequest[]>('/carousals/active-list')
|
|
}
|
|
function getTypeList() {
|
|
return httpClient.get<Category[]>('/categories/list')
|
|
}
|
|
function getArticleList(data: ArticleParams) {
|
|
return httpClient.get<PageResult<Article>>('/articles', data)
|
|
}
|
|
function getSearchRecords() {
|
|
return httpClient.get<string[]>('/articles/search-records')
|
|
}
|
|
function getSearchRecommends() {
|
|
return httpClient.get<string[]>('/articles/active-search-recommends')
|
|
}
|
|
export default {
|
|
getCarousalList,
|
|
getTypeList,
|
|
getArticleList,
|
|
}
|