import { service } from '../utils/request.mjs';

function useLoginApi() {
  return {
    signIn: (data) => {
      return service({
        url: "/fmauth/sysauth/login",
        method: "post",
        data
      });
    },
    loginPhonenumber: (data) => {
      return service({
        url: "/fmauth/sysauth/loginPhone",
        method: "post",
        data
      });
    },
    getCaptcha: () => {
      return service({
        url: "/fmauth/sysauth/captcha",
        method: "get"
      });
    },
    signOut: (data) => {
      return service({
        url: "/fmauth/sysauth/signOut",
        method: "post",
        data
      });
    }
  };
}

export { useLoginApi };
