From 3fc27febccd04e2fcffbd2cdd16d2daafd0b3ca3 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 11 Oct 2025 17:23:27 +0800
Subject: [PATCH] feat:首页地图相关调整
---
src/api/user/index.js | 43 ++++++++++++++++++++++++++++++++++++++-----
1 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/src/api/user/index.js b/src/api/user/index.js
index 0d1f16b..82da79f 100644
--- a/src/api/user/index.js
+++ b/src/api/user/index.js
@@ -1,14 +1,47 @@
-import { get, post } from "@/utils/request"
+import {
+ get,
+ post,
+ request
+} from "@/utils/request"
-/** 获取用户信息 */
-export const profile = params => get("/user/profile", { params })
+import website from '@/config/website'
/** 登录 */
export const login = data =>
- post("/user/login", { data, custom: { auth: false } })
+ post("/user/login", {
+ data,
+ custom: {
+ auth: false
+ }
+ })
/** 验证码登录 */
-export const loginByCode = data => post("/user/loginByCode", { data })
+export const loginByCode = data => post("/user/loginByCode", {
+ data
+})
/** 退出登录 */
export const logout = () => post("/user/logout")
+
+// 用户登录接口
+export const loginByUsername = (tenantId, deptId, roleId, username, password, type, key, code) => {
+ return request({
+ url: '/blade-auth/oauth/token',
+ method: 'post',
+ header: {
+ 'Tenant-Id': tenantId,
+ 'Dept-Id': website.switchMode ? deptId : '',
+ 'Role-Id': website.switchMode ? roleId : '',
+ 'Captcha-Key': key,
+ 'Captcha-Code': code,
+ },
+ params: {
+ tenantId,
+ username,
+ password,
+ grant_type: 'password',
+ scope: 'all',
+ type,
+ },
+ })
+}
--
Gitblit v1.9.3