import httpFetch from "@/api/fetch" import { ResultData } from "@/api/typing" import { Login } from "./types" // 获取验证码 export const getVerifyCode = (params: { phone: string }) => { return httpFetch>({ url: `/api/v1/front/login/get_verify_code`, method: "POST", body: JSON.stringify(params), }) } // 账户登录 export const passwdLogin = (params: Login.ReqPasswdLogin) => { return httpFetch>({ url: `/api/v1/front/login/passwd`, method: "POST", body: JSON.stringify(params), isLogin: true, }) } // 验证码登录 export const verificationLogin = (params: Login.ReqVerificationLogin) => { return httpFetch>({ url: `/api/v1/front/login/verification`, method: "POST", body: JSON.stringify(params), isLogin: true, }) } // 飞书登录 export const fetchFeishuLogin = (params: Login.ReqFeishuLogin) => { return httpFetch>({ url: `/api/v1/front/login/feishu`, method: "POST", body: JSON.stringify(params), isLogin: true, }) } // 刷新token export const refreshKey = (params: { token: string }) => { return httpFetch>({ url: `/api/v1/front/key/refresh`, method: "POST", body: JSON.stringify(params), isRefresh: true, }) } // 删除cookie export const deleteCookie = () => { return httpFetch>({ url: `/api/session`, method: "DELETE", isDeleteCookie: true, }) }