points.js
1.4 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
/*
* @Date: 2025-12-24 12:26:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-12-24 18:36:29
* @FilePath: /mlaj/src/api/points.js
* @Description: 积分相关接口
*/
import { fn, fetch } from './fn';
const Api = {
POINTS_LIST: '/srv/?a=points&t=list',
OLD_ACTIVITY_BATCH_ACTIVITY_REGISTRATION: '/srv/?a=points&t=old_activity_batch_activity_registration',
}
/**
* @description 获取积分列表
* @param {*} direction add=已获得,subtract=已消耗
* @param {*} begin_date 开始日期
* @param {*} end_date 结束日期
* @param {*} keyword 搜索关键词
* @param {*} page 页码
* @param {*} limit 每页数量
* @returns data: {
* balance: 积分余额
* point_list: [{ id, event_title 标题, event_time 时间, change 积分变化, event_type_desc 事件类型 }]
* }
*/
export const getPointsListAPI = (params) => fn(fetch.get(Api.POINTS_LIST, params));
/**
* @description 召回老客户-批量活动报名
* @param {*} params {
* name: 姓名
* mobile: 手机号
* idcard: 身份证号
* activity_ids: 活动id列表, 逗号分隔
* }
* @returns data: {
* payment_qty: 已报名活动数量
* volunteer_qty: 已报名志愿者数量
* record_date: 报名记录日期
* last_activity_date: 最后活动日期
* }
*/
export const oldActivityBatchActivityRegistrationAPI = (params) => fn(fetch.post(Api.OLD_ACTIVITY_BATCH_ACTIVITY_REGISTRATION, params));