lilishop-uniapp/api/article.js

44 lines
742 B
JavaScript
Raw Normal View History

2021-05-13 11:03:32 +08:00
/**
* 文章相关API
*/
import {http,Method} from '@/utils/request.js';
import api from '@/config/api.js';
/**
* 获取某个分类的文章列表
* @param category_type
*/
export function getArticleCategory(category_type) {
return http.request({
url: `${api.base}/pages/article-categories`,
method: Method.GET,
params: {category_type},
});
}
/**
* 获取文章详情
* @param type
*/
export function getArticleDetail(type) {
return http.request({
2022-02-10 18:57:17 +08:00
url: `/other/article/get/${type}`,
2021-05-13 11:03:32 +08:00
method: Method.GET,
});
}
2022-10-28 10:46:51 +08:00
/**
* 获取文章详情
* @param type
*/
export function getArticleDetailByType(type) {
return http.request({
url: `/other/article/type/${type}`,
method: Method.GET,
});
}