import request from '@/utils/request'

// 查询用户列表
export function listUser(query) {
  return request({
    url: '/user/integral/list',
    method: 'get',
    params: query
  })
}

// 查询用户积分明细
export function getIntegralLogs(userId, params = {}) {
  return request({
    url: '/user/integral/logs/' + userId,
    method: 'get',
    params: params
  })
}

// 添加积分
export function addIntegral(data) {
  return request({
    url: '/user/integral/add',
    method: 'post',
    data: data
  })
}

