czh-20260612-新增单点登录功能

This commit is contained in:
zhihao
2026-06-12 10:48:32 +08:00
parent b8d57da4e4
commit 871e296f06
9 changed files with 605 additions and 6 deletions
+16
View File
@@ -0,0 +1,16 @@
import { defHttp } from '/@/utils/http/axios';
enum AutoLoginApi {
AutoLogin = '/sys/autoLogin',
IpAutoLogin = '/sys/ipAutoLogin',
}
/** 自动登录 — 请求网关地址(由 VITE_AUTOLOGIN_URL 控制),form 表单格式 */
export function autoLoginApi() {
const url = import.meta.env.VITE_AUTOLOGIN_URL || AutoLoginApi.AutoLogin;
return defHttp.post({
url,
data: 'username=&password=',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
});
}