import { request } from '@/service/request';
/**
 * 分页获取券列表
 * @param params
 * @returns
 */
export function fetchList(data: any) {
  return request({
    url: '/smqjh-system/api/v1/recharge-level/page',
    method: 'get',
    params: data
  });
}

/**
 * 获取详情
 * @param params
 * @returns
 */
export function fetchDetail(id: any) {
  return request({
    url: `/smqjh-system/api/v1/recharge-level/${id}/form`,
    method: 'get'
  });
}

/**
 *
    新增
 * @param data
 * @returns
 */

export function fetchAdd(data: any) {
  return request({
    url: `/smqjh-system/api/v1/recharge-level/add`,
    method: 'post',
    data
  });
}

/**
 *
    编辑
 * @param data
 * @returns
 */

export function fetchEdit(data: any) {
  return request({
    url: `/smqjh-system/api/v1/recharge-level/edit/${data.id}`,
    method: 'put',
    data
  });
}

/**
 *
    编辑
 * @param data
 * @returns
 */

export function fetchDelete(ids: any) {
  return request({
    url: `/smqjh-system/api/v1/recharge-level/delete/${ids}`,
    method: 'delete'
  });
}
