gratitude.js
1.79 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
/*
* @Date: 2025-06-06 09:26:16
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-12-16 13:59:55
* @FilePath: /mlaj/src/api/gratitude.js
* @Description: 计数模块相关接口
*/
import { fn, fetch } from './fn'
const Api = {
GET_GRATITUDE_LIST: '/srv/?a=gratitude_people&t=list',
POST_GRATITUDE_ADD: '/srv/?a=gratitude_people&t=add',
POST_GRATITUDE_EDIT: '/srv/?a=gratitude_people&t=edit',
POST_GRATITUDE_DEL: '/srv/?a=gratitude_people&t=del',
}
/**
* @description: 计数对象列表
* @param: person_type 计数对象类型 teacher=老师, doctor=医生, parent=父母, sage=圣贤
* @return: data.gratitude_people [{ id 计数对象ID, name 计数对象名称, city 地址, unit 单位 }]
*/
export const getGratitudeListAPI = (params) => fn(fetch.get(Api.GET_GRATITUDE_LIST, params))
/**
* @description: 添加感恩对象
* @param person_type 计数对象类型 teacher=老师, doctor=医生, parent=父母, sage=圣贤
* 下面的值应该是动态字段绑定的值, 通过field_list获取里面的field_name, 再根据field_name绑定值
* @param name 感恩对象名称
* @param city 地址
* @param unit 单位
* @returns
*/
export const gratitudeAddAPI = (params) => fn(fetch.post(Api.POST_GRATITUDE_ADD, params))
/**
* @description: 编辑感恩对象
* @param id 感恩对象ID
* 下面的值应该是动态字段绑定的值, 通过field_list获取里面的field_name, 再根据field_name绑定值
* @param name 感恩对象名称
* @param city 地址
* @param unit 单位
* @returns
*/
export const gratitudeEditAPI = (params) => fn(fetch.post(Api.POST_GRATITUDE_EDIT, params))
/**
* @description: 删除感恩对象
* @param id 感恩对象ID
* @returns
*/
export const gratitudeDelAPI = (params) => fn(fetch.post(Api.POST_GRATITUDE_DEL, params))