绿满眶商城微信小程序-uniapp
peng
8 小时以前 a6c950ba797dffec842cf7e923fc439868645766
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
 * 文章相关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: `/other/article/get/${type}`,
    method: Method.GET,
  });
}
 
/**
 * 获取文章详情
 * @param type
 */
 export function getArticleDetailByType(type) {
  return http.request({
    url: `/other/article/type/${type}`,
    method: Method.GET,
  });
}