import network from "@/utils/network";

//密码登录
export const login = (data) => network({
  url: "/login",
  method: "post",
  data
});
//短信登录
export const smsLogin = (data) => network({
  url: "/smsLogin",
  method: "post",
  data
});
//校验短信验证码
export const validateSmsCode = (data) => network({
  url: "/sms/validateSmsCode?phone="+data.phone +"&code="+data.code,
  method: "get",
  data
});
//校验图形验证码
export const validateCaptcha = (data) => network({
  url: "/validateCaptcha?uuid="+data.uuid +"&code="+data.code,
  method: "get",
});
//忘记密码提交
export const forgotPassword = (data) => network({
  url: "/forgotPassword",
  method: "post",
  data
});
//图形验证码
export const captchaImage = () => network({
  url: "/captchaImage",
  method: "get",
});
//验证账号并发送短信
export const checkUser = (data) => network({
  url: "/checkUser",
  method: "post",
  data
});

export const loginApi = (data) => network({
  url: "/login",
  method: "post",
  data
});

export const loginOutApi = () => network({
  url: "",
  method: "post",
});

export const getUserInfoApi = () => network({
  url: "/getInfo",
  method: "get"
});
