import request from "@/utils/request";

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

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

export function changChildShop(data) {
  return request({
    url: "/api/tbShopInfo/changChildShop",
    method: "post",
    data
  });
}

export function getCodeImg(header) {
  return request({
    url: "auth/code",
    method: "get"
  });
}
export function getqueryChildShop(params) {
  return request({
    url: "api/tbShopInfo/queryChildShop",
    method: "get",
    params
  });
}

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
  });
}
