修改统一身份认证
This commit is contained in:
@@ -97,6 +97,7 @@ import * as authUtil from '@/utils/auth'
|
||||
import { usePermissionStore } from '@/store/modules/permission'
|
||||
import * as LoginApi from '@/api/login'
|
||||
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
|
||||
import { create } from 'domain'
|
||||
|
||||
defineOptions({ name: 'LoginForm' })
|
||||
|
||||
@@ -172,6 +173,8 @@ const getCookie = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 根据域名,获得租户信息
|
||||
const getTenantByWebsite = async () => {
|
||||
const website = location.host
|
||||
@@ -216,12 +219,13 @@ const handleLogin = async (params) => {
|
||||
if (redirect.value.indexOf('sso') !== -1) {
|
||||
window.location.href = window.location.href.replace('/login?redirect=', '')
|
||||
} else {
|
||||
const queryParams = new URLSearchParams(window.location.search);
|
||||
const queryParams = new URLSearchParams(window.location.search);
|
||||
const ticketUrl = queryParams.get('url'); // 获取查询参数值,例如 ?paramName=value 中的 value
|
||||
console.log(ticketUrl);
|
||||
const accessToken =authUtil.getAccessToken();
|
||||
debugger
|
||||
console.log(accessToken);
|
||||
if(ticketUrl!=null){
|
||||
var urll=ticketUrl+"/#/login"+"?ticket=93279E3308BDBBEED946FC965017F67A";
|
||||
var urll=ticketUrl+"?ticket="+accessToken;
|
||||
window.location.href = urll
|
||||
}else{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user