import request from '@/config/axios'

// 发送验证码
export const sendSmsCode = async (data) => {
  return await request.post({
    url: '/app-api/menduner/system/auth/send-sms-code',
    data
  })
}

// 验证码登录
export const smsLogin = async (data) => {
  return await request.post({
    url: '/app-api/menduner/system/auth/sms-login',
    data
  })
}


// 密码登录
export const passwordLogin = async (data) => {
  return await request.post({
    url: '/app-api/menduner/system/auth/login',
    data
  })
}

// 退出登录
export const logout = async () => {
  return await request.post({
    url: '/app-api/menduner/system/auth/logout'
  })
}


// 修改密码
export const updatePassword = async (data) => {
  return await request.put({
    url: '/app-api/menduner/system/mde-user/update-password',
    data
  })
}

// 重置密码
export const resetPassword = async (data) => {
  return await request.post({
    url: '/admin-api/menduner/system/mde-user/update-password',
    data
  })
}

// 字典
export const getDictData = async (params) => {
  return await request.get({
    url: '/app-api/system/dict-data/type',
    params
  })
}

// 点击访问职位埋点
export const getPositionTreeClick = async (data) => {
  return await request.post({
    url: '/app-api/menduner/system/position/click',
    data
  })
}

// 获取热门职位
export const getHotPositionList = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/position/hot',
    params
  })
}

// 获得职位信息
export const getPositionTreeData = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/position/get/tree',
    params
  })
}

// 获取区域树形
export const getAreaTreeData = async () => {
  return await request.get({
    url: '/app-api/menduner/system/area/get/tree'
  })
}

// 获取行业树形
export const getIndustryTreeData = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/industry/get/tree',
    params
  })
}

// 获取行业列表
export const getIndustryListData = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/industry/list',
    params
  })
}

// 获取地区列表
export const getAreaListData = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/area/list',
    params
  })
}