index.js
3.11 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* @Date: 2023-08-24 09:42:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-10-31 11:04:23
* @FilePath: /stdj_h5/src/api/index.js
* @Description: 文件描述
*/
import { fn, fetch } from '@/api/fn';
const Api = {
GET_HOME: '/srv/?a=home',
GET_ARTICLE: '/srv/?a=get_article',
};
/**
* @description: 首页数据
* @returns {Object} list
* @property [Object] list.STDJSSQZ 三师七证
* @property integer list.STDJSSQZ.id 分类id
* @property string list.STDJSSQZ.category_name 分类名称
* @property string list.STDJSSQZ.cover 封面图
* @property string list.STDJSSQZ.parent_sn 父分类id
* @property [Object] list.STDJFHLC 法会流程
* @property integer list.STDJFHLC.id 分类id
* @property string list.STDJFHLC.category_name 分类名称
* @property string list.STDJFHLC.cover 封面图
* @property string list.STDJFHLC.parent_sn 父分类id
* @property [Object] list.STDJXGXW 新闻
* @property integer list.STDJXGXW.id 分类id
* @property string list.STDJXGXW.post_title 新闻标题
* @property string list.STDJXGXW.post_date 发布日期
* @property string list.STDJXGXW.photo 封面图
*/
export const homePageAPI = (params) => fn(fetch.get(Api.GET_HOME, params));
/**
* @description: 三師七證数据
* @param {String} pid 分类id
* @returns {Object} list
* @property integer list.id 分类id
* @property string list.category_name 分类名称
* @property string list.category_seq 分类顺序
* @property [Object] list.list 子分类列表
* @property integer list.list.id 子分类id
* @property string list.list.post_title 标题/名称
* @property string list.list.post_date 发布日期
* @property string list.list.post_excerpt 简介
* @property string list.list.post_content 内容/描述
* @property string list.list.photo 封面图
* @property string list.list.category_id 分类id
*/
export const getSSQZAPI = (params) => fn(fetch.get(Api.GET_ARTICLE, params));
/**
* @description: 图片流媒体数据
* @param {String} cid 分类id
* @param {String} page 页码,默认0
* @param {String} limit 每页数量,默认10
* @returns {Object} list
* @property integer list.id 分类id
* @property string list.post_title 标题/名称
* @property string list.post_date 发布日期
* @property string list.post_excerpt 简介
* @property string list.photo 封面图
*/
export const getImgStreamAPI = (params) => fn(fetch.get(Api.GET_ARTICLE, params));
/**
* @description: 文章详情数据
* @param {String} i 文章id
* @returns {Object} data
* @property integer data.post_author 作者
* @property string data.post_title 标题/名称
* @property string data.post_date 发布日期
* @property string data.post_excerpt 简介
* @property string data.post_content 内容/描述
* @property string data.post_modified 修改日期
* @property string data.post_status 状态
* @property string data.post_type 类型
* @property object data.file_list 文件列表
* @property object data.file_list.photo 照片
* @property string data.file_list.photo.value 照片地址
*/
export const getArticleDetailAPI = (params) => fn(fetch.get(Api.GET_ARTICLE, params));