import http from './http.js'
const request=http.request

export function login(data) {
  return request({
    url: "/account/admin/auth/login",
    method: "post",
    data
  });
}

export function getInfo() {
  return request({
    url: "/auth/info",
    method: "get"
  });
}

export function getCodeImg(header) {
  return request({
    url: "/account/admin/auth/captcha",
    method: "get"
  });
}

export function logout() {
  return request({
    url: "/auth/logout",
    method: "delete"
  });
}

/**
 * 个人中心 修改密码
 * @param {*} data
 * @returns
 */
export function updatePass(data) {
  return request({
    url: "/api/users/updatePass",
    method: "post",
    data
  });
}
