import { fetch, post } from '@api/api';

/**
 * 生成验证码
 */
export function fetchDigitCaptcha(params = {}) {
  return fetch({
    url: '/upms/login/digit-captcha',
    params: params
  });
}
/**
 * 发送短信验证码-登陆专用
 */
export function sendLoginSmsCode(params = {}) {
  return post({
    url: '/upms/login/sms-code',
    params: params
  });
}
/**
 * 登陆(用密码)
 */
export function loginByPwd(params = {}) {
  return post({
    url: '/upms/login/admin-token',
    params: params
  });
}
/**
 * =======================================================================
 */

/**
 * 删除附件
 * @param params 请求参数
 * @param headers 请求头
 */
export function removeAttachment(params = {}, headers = {}) {
  return post({
    url: '/recruit-common/attachment/remove',
    params: params,
    headers: headers
  });
}

/**
 * 更新用户密码-无需鉴权
 * @param params 请求参数
 */
export function updateUserPwdNoAuth(params = {}) {
  return post({
    url: '/recruit-upms/auth/update-pwd-no-auth',
    params: params
  });
}
/**
 * 查询多账号
 */
export function fetchMultiAccount(params = {}) {
  return fetch({
    url: '/recruit-upms/auth/multi-account',
    params: params
  });
}
