From 2b97f0fe9d894ff65526f409c6ddc5d21ba62b82 Mon Sep 17 00:00:00 2001 From: NoahLan <6995syu@163.com> Date: Sun, 4 Jun 2023 17:43:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0api=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E4=BB=A5=E5=8F=8Aapi=E5=85=AC=E5=85=B1=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.d.ts | 9 +++++++++ src/api/auth/auth.ts | 7 +++++++ vite.config.ts | 1 + 3 files changed, 17 insertions(+) create mode 100644 src/api/api.d.ts create mode 100644 src/api/auth/auth.ts diff --git a/src/api/api.d.ts b/src/api/api.d.ts new file mode 100644 index 0000000..0709835 --- /dev/null +++ b/src/api/api.d.ts @@ -0,0 +1,9 @@ +interface Pagination { + size?: number + current?: number + total?: number +} + +interface BaseID { + id?: string +} \ No newline at end of file diff --git a/src/api/auth/auth.ts b/src/api/auth/auth.ts new file mode 100644 index 0000000..6ca55c7 --- /dev/null +++ b/src/api/auth/auth.ts @@ -0,0 +1,7 @@ +import { defHttp } from '~/utils/http' + +export function login() { + defHttp.post({ + url: '/api/auth/login', + }) +} diff --git a/vite.config.ts b/vite.config.ts index 1fe8884..1c36117 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -76,6 +76,7 @@ export default defineConfig({ 'src/composables', 'src/stores', 'src/types', + 'src/api/**', ], vueTemplate: true, resolvers: [