points.js 809 Bytes
/*
 * @Date: 2025-12-24 12:26:27
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2025-12-24 12:37:23
 * @FilePath: /mlaj/src/api/points.js
 * @Description: 积分相关接口
 */
import { fn, fetch } from './fn';

const Api = {
  POINTS_LIST: '/srv/?a=points&t=list',
}

/**
 * @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));