From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/api/login/index.ts |   91 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 91 insertions(+), 0 deletions(-)

diff --git a/src/api/login/index.ts b/src/api/login/index.ts
new file mode 100644
index 0000000..37eb491
--- /dev/null
+++ b/src/api/login/index.ts
@@ -0,0 +1,91 @@
+import request from '@/config/axios'
+import type { RegisterVO, UserLoginVO } from './types'
+
+export interface SmsCodeVO {
+  mobile: string
+  scene: number
+}
+
+export interface SmsLoginVO {
+  mobile: string
+  code: string
+}
+
+// 鐧诲綍
+export const login = (data: UserLoginVO) => {
+  return request.post({
+    url: '/system/auth/login',
+    data,
+    headers: {
+      isEncrypt: false
+    }
+  })
+}
+
+// 娉ㄥ唽
+export const register = (data: RegisterVO) => {
+  return request.post({ url: '/system/auth/register', data })
+}
+
+// 浣跨敤绉熸埛鍚嶏紝鑾峰緱绉熸埛缂栧彿
+export const getTenantIdByName = (name: string) => {
+  return request.get({ url: '/system/tenant/get-id-by-name?name=' + name })
+}
+
+// 浣跨敤绉熸埛鍩熷悕锛岃幏寰楃鎴蜂俊鎭�
+export const getTenantByWebsite = (website: string) => {
+  return request.get({ url: '/system/tenant/get-by-website?website=' + website })
+}
+
+// 鐧诲嚭
+export const loginOut = () => {
+  return request.post({ url: '/system/auth/logout' })
+}
+
+// 鑾峰彇鐢ㄦ埛鏉冮檺淇℃伅
+export const getInfo = () => {
+  return request.get({ url: '/system/auth/get-permission-info' })
+}
+
+//鑾峰彇鐧诲綍楠岃瘉鐮�
+export const sendSmsCode = (data: SmsCodeVO) => {
+  return request.post({ url: '/system/auth/send-sms-code', data })
+}
+
+// 鐭俊楠岃瘉鐮佺櫥褰�
+export const smsLogin = (data: SmsLoginVO) => {
+  return request.post({ url: '/system/auth/sms-login', data })
+}
+
+// 绀句氦蹇嵎鐧诲綍锛屼娇鐢� code 鎺堟潈鐮�
+export function socialLogin(type: string, code: string, state: string) {
+  return request.post({
+    url: '/system/auth/social-login',
+    data: {
+      type,
+      code,
+      state
+    }
+  })
+}
+
+// 绀句氦鎺堟潈鐨勮烦杞�
+export const socialAuthRedirect = (type: number, redirectUri: string) => {
+  return request.get({
+    url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri
+  })
+}
+// 鑾峰彇楠岃瘉鍥剧墖浠ュ強 token
+export const getCode = (data: any) => {
+  return request.postOriginal({ url: 'system/captcha/get', data })
+}
+
+// 婊戝姩鎴栬�呯偣閫夐獙璇�
+export const reqCheck = (data: any) => {
+  return request.postOriginal({ url: 'system/captcha/check', data })
+}
+
+// 閫氳繃鐭俊閲嶇疆瀵嗙爜
+export const smsResetPassword = (data: any) => {
+  return request.post({ url: '/system/auth/reset-password', data })
+}

--
Gitblit v1.8.0