feat: 新增登录接口请求

This commit is contained in:
奔跑的面条
2022-05-20 16:12:27 +08:00
parent 28bb82e579
commit 7e237b508a
16 changed files with 144 additions and 65 deletions
+13
View File
@@ -0,0 +1,13 @@
import { http } from '@/api/http'
import { httpErrorHandle } from '@/utils'
import { RequestHttpEnum, ModuleTypeEnum } from '@/enums/httpEnum'
// 登录
export const loginRequest = async (data: object) => {
try {
const res = await http(RequestHttpEnum.POST)(`${ModuleTypeEnum.SYSTEM}/login`, data);
return res;
} catch {
httpErrorHandle();
}
}