From 89a5fedfe041ebacb2d81ecae1023b206cd3f353 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期四, 24 四月 2025 09:10:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/main'

---
 eims-ui-mobile/src/service/login.ts |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/eims-ui-mobile/src/service/login.ts b/eims-ui-mobile/src/service/login.ts
new file mode 100644
index 0000000..330a514
--- /dev/null
+++ b/eims-ui-mobile/src/service/login.ts
@@ -0,0 +1,24 @@
+import { http } from '@/utils/http'
+import type { LoginParams, UserInfoResp } from './login.d'
+const clientId = import.meta.env.VITE_APP_CLIENT_ID
+
+const DEFAULT_TENANT_ID = '000000'
+const GRANT_TYPE = 'password'
+
+/** get 璇锋眰 */
+export const login = (params: LoginParams) => {
+  const { username, password } = params
+  // 鏋勯�犳柊鐨勮姹傚弬鏁帮紝閬垮厤鐩存帴淇敼鍘熷瀵硅薄
+  const requestData = {
+    username,
+    password,
+    clientId,
+    tenantId: DEFAULT_TENANT_ID,
+    grantType: GRANT_TYPE,
+  }
+  return http.post<any>('/auth/login', requestData)
+}
+
+export const getUserInfo = () => {
+  return http.get<null | UserInfoResp>('/system/user/getInfo')
+}

--
Gitblit v1.9.3