import request from '@/config/axios'

// 生成邀请码标识
export const enterpriseInviteGenerateCode = async (data) => {
  return await request.post({
    url: '/app-admin-api/menduner/system/enterprise-invite/generate/code',
    data
  })
}

// 获取邀请码
export const enterpriseInviteGetCode = async (params) => {
  return await request.get({
    url: '/app-admin-api/menduner/system/enterprise-invite/get/code',
    params
  })
}

// 刷新邀请码
export const enterpriseInviteRefresh = async (code) => {
  return await request.post({
    url: '/app-admin-api/menduner/system/enterprise-invite/refresh?code=' + code
  })
}

// 同意加入
export const enterpriseInviteRecordConsent = async (code) => {
  return await request.post({
    url: `/app-admin-api/menduner/system/enterprise-invite-record/consent?code=${code}`
  })
}

// 获得企业邀请记录分页
export const enterpriseInviteRecordPage = async (params) => {
  return await request.get({
    url: '/app-admin-api/menduner/system/enterprise-invite-record/page',
    params
  })
}

// 获得企业邀请记录分页
export const getEnterpriseInfoByCode = async (params) => {
  return await request.get({
    url: '/app-admin-api/menduner/system/enterprise-invite/get/info/by/code',
    params
  })
}
