import { request } from '@/service/request';
/**
 * 分页获取会员列表
 * @param params
 * @returns
 */
export function fetchMemberList(data: any) {
  return request({
    url: '/smqjh-system/api/v1/member/account/page',
    method: 'get',
    params: data
  });
}
/**
 * 开通记录
 * @param params
 * @returns
 */
export function fetchOpenRecord(data: any) {
  return request({
    url: '/smqjh-system/api/v1/member/open-record/page',
    method: 'get',
    params: data
  });
}

/**
 * 导出
 * @returns
 */
export function fetchExport(data: any) {
  return request({
    url: `/smqjh-system/api/v1/member/export/task/start`,
    method: 'post',
    data
  });
}

/**
 * 导出记录
 * @returns
 */
export function fetchExportRecord(data: any) {
  return request({
    url: `/smqjh-system/api/v1/member/export/task/page`,
    method: 'get',
    params: data
  });
}

/**
 * 下载
 * @returns
 */
export function fetchDownload(taskId: any) {
  return request({
    url: `/smqjh-system/api/v1/member/export/task/download/${taskId}`,
    method: 'get'
  });
}
