mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 16:05:53 +08:00
commit message
This commit is contained in:
30
api/article.js
Normal file
30
api/article.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* 文章相关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({
|
||||
url: `/article/type/${type}`,
|
||||
method: Method.GET,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user