From d06a882e870f2aa26934ccd4b552d5292679320f Mon Sep 17 00:00:00 2001
From: zrj <646384940@qq.com>
Date: Wed, 05 Jun 2024 17:23:29 +0800
Subject: [PATCH] 登录调整(集成单点登录)
---
src/api/user.js | 36 +++++++++++++++++++++++++++++++++---
1 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/src/api/user.js b/src/api/user.js
index 1969867..4f0398d 100644
--- a/src/api/user.js
+++ b/src/api/user.js
@@ -17,9 +17,7 @@
password,
grant_type:"password",
scope: "all",
- type,
- // 查全部-暂定
- loginType:1
+ type
}
});
@@ -70,6 +68,38 @@
}
});
+export const loginForm = (tenant_id, username, password,client_id,response_type,redirect_uri) => request({
+ url: '/api/oauth/form',
+ method: 'post',
+ headers:{
+ 'Content-Type':"application/x-www-form-urlencoded",
+ 'client_id':client_id,
+ 'response_type':response_type,
+ 'redirect_uri':redirect_uri
+ },
+ params: {
+ tenant_id,
+ username,
+ password
+ }
+});
+
+export const loginTo = (tenantId, username, password,client_id,response_type,redirect_uri) => request({
+ url: '/api/oauth/loginTo',
+ method: 'post',
+ headers:{
+ 'Content-Type':"application/x-www-form-urlencoded",
+ 'client_id':client_id,
+ 'response_type':response_type,
+ 'redirect_uri':redirect_uri
+ },
+ params: {
+ tenantId,
+ username,
+ password
+ }
+});
+
export const registerGuest = (form, oauthId) => request({
url: '/api/blade-system/user/register-guest',
method: 'post',
--
Gitblit v1.9.3