From c9cd8d8cb06e1fab173b5e63ec7ad376a5c7a53b Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 06 May 2024 14:28:38 +0800
Subject: [PATCH] 修改统一认证
---
src/api/user.js | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/api/user.js b/src/api/user.js
index 5775d8a..3c146cf 100644
--- a/src/api/user.js
+++ b/src/api/user.js
@@ -2,27 +2,27 @@
import website from "@/config/website";
export const loginByUsername = (tenantId, deptId, roleId, username, password, type, key, code) => request({
- url: '/api/blade-auth/oauth/token',
+ url: '/api/oauth/token',
method: 'post',
headers: {
'Tenant-Id': tenantId,
'Dept-Id': (website.switchMode ? deptId : ''),
'Role-Id': (website.switchMode ? roleId : ''),
- 'Captcha-Key': key,
- 'Captcha-Code': code,
+ // 'Captcha-Key': key,
+ // 'Captcha-Code': code,
},
params: {
tenantId,
username,
password,
- grant_type: (website.captchaMode ? "captcha" : "password"),
+ grant_type:"password",
scope: "all",
type
}
});
export const loginBySocial = (tenantId, source, code, state) => request({
- url: '/api/blade-auth/oauth/token',
+ url: '/api/oauth/token',
method: 'post',
headers: {
'Tenant-Id': tenantId
@@ -38,7 +38,7 @@
})
export const loginBySso = (state, code) => request({
- url: '/api/blade-auth/oauth/token',
+ url: '/api/oauth/token',
method: 'post',
headers: {
'Tenant-Id': state
@@ -53,7 +53,7 @@
})
export const refreshToken = (refresh_token, tenantId, deptId, roleId) => request({
- url: '/api/blade-auth/oauth/token',
+ url: '/api/oauth/token',
method: 'post',
headers: {
'Tenant-Id': tenantId,
--
Gitblit v1.9.3