修改统一身份认证
This commit is contained in:
@@ -140,41 +140,6 @@ const loginData = reactive({
|
||||
}
|
||||
})
|
||||
|
||||
const socialList = [
|
||||
{ icon: 'ant-design:wechat-filled', type: 30 },
|
||||
{ icon: 'ant-design:dingtalk-circle-filled', type: 20 },
|
||||
{ icon: 'ant-design:github-filled', type: 0 },
|
||||
{ icon: 'ant-design:alipay-circle-filled', type: 0 }
|
||||
]
|
||||
|
||||
const easyDropdownList = [
|
||||
{
|
||||
label: t('login.btnMobile'),
|
||||
icon: 'ant-design:phone-twotone',
|
||||
type: LoginStateEnum.MOBILE,
|
||||
code: 'page'
|
||||
},
|
||||
{
|
||||
label: t('login.btnQRCode'),
|
||||
icon: 'ant-design:qrcode-outlined',
|
||||
type: LoginStateEnum.QR_CODE,
|
||||
code: 'page'
|
||||
},
|
||||
{ label: t('login.btnWechat'), icon: 'ant-design:wechat-filled', type: 30, code: 'url' },
|
||||
{
|
||||
label: t('login.btnDingtalk'),
|
||||
icon: 'ant-design:dingtalk-circle-filled',
|
||||
type: 20,
|
||||
code: 'url'
|
||||
},
|
||||
{ label: t('login.btnGitHub'), icon: 'ant-design:github-filled', type: 0, code: 'url' },
|
||||
{ label: t('login.btnAlipay'), icon: 'ant-design:alipay-circle-filled', type: 0, code: 'url' }
|
||||
]
|
||||
|
||||
const easyCommand = (row) => {
|
||||
if (row.code == 'page') setLoginState(row.type)
|
||||
else if (row.code == 'url') doSocialLogin(row.type)
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
const getCode = async () => {
|
||||
@@ -242,14 +207,29 @@ const handleLogin = async (params) => {
|
||||
authUtil.removeLoginForm()
|
||||
}
|
||||
authUtil.setToken(res)
|
||||
debugger
|
||||
if (!redirect.value) {
|
||||
|
||||
redirect.value = '/'
|
||||
}
|
||||
// 判断是否为SSO登录
|
||||
if (redirect.value.indexOf('sso') !== -1) {
|
||||
window.location.href = window.location.href.replace('/login?redirect=', '')
|
||||
} else {
|
||||
push({ path: redirect.value || permissionStore.addRouters[0].path })
|
||||
const queryParams = new URLSearchParams(window.location.search);
|
||||
const ticketUrl = queryParams.get('url'); // 获取查询参数值,例如 ?paramName=value 中的 value
|
||||
console.log(ticketUrl);
|
||||
debugger
|
||||
if(ticketUrl!=null){
|
||||
var urll=ticketUrl+"/#/login"+"?ticket=93279E3308BDBBEED946FC965017F67A";
|
||||
window.location.href = urll
|
||||
}else{
|
||||
|
||||
push({ path: redirect.value || permissionStore.addRouters[0].path })
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
} finally {
|
||||
loginLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user