import { defHttp } from '/@/utils/http/axios';
import { PageParams, MemberListGetResultModel } from './model';
import { Result } from '/#/axios';

enum Api {
  pageList = '/zfb-api/zfb/user/list',
  unbindWechat = '/zfb-api/zfb/user/unbindWechat',
}

/**
 * @description: Get sample list value
 */

export const ListApi = (params: PageParams) =>
  defHttp.post<MemberListGetResultModel>({
    url: Api.pageList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const unbindWechatApi = (id: number | string) =>
  defHttp.post<Result>({
    url: Api.unbindWechat,
    params: { id },
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
