import { $post, $postParam } from "@/plugins/axios";

export const login = (datas) => {
  return $post("/api/common/login", datas);
};
export const getSmsCode = (datas) => {
  return $post("/api/common/get_verify_code", datas);
};
export const getSmsCodeForBind = (datas) => {
  return $post("/api/common/get_verify_code", datas);
};
export const modifyPwd = (datas) => {
  return $post("/api/common/get_system_time", datas);
};

export const logout = () => {
  return $post("/api/common/logout", {});
};
export const attachmentPreview = (id) => {
  return $postParam("/api/common/file/preview", { id });
};
export const attachmentDetail = (id) => {
  return $postParam("/api/common/file/get_one", { id });
};
export const attachmentDownload = ({ id, type }) => {
  return $postParam("/api/common/file/download", { id, type });
};
export const getEnums = (type) => {
  return $postParam("/api/common/get_enums", { type });
};
export const schoolList = () => {
  return $postParam("/api/basic_school/list", {});
};
export const updatePwd = (datas) => {
  return $post("/api/admin/sys/user/update_password", datas);
};
