[update] 头部菜单增加企业端单点登录
This commit is contained in:
@@ -38,4 +38,7 @@ window._CONFIG["sendPostCode"] = "300300"
|
||||
window._CONFIG["lookExpressDomainURL"] = "http://localhost:21826/lookExpressInfo";
|
||||
|
||||
// 来款内部部署的ip
|
||||
window._CONFIG["intranetUrl"] = "http://localhost:21825/";
|
||||
window._CONFIG["intranetUrl"] = "http://localhost:21825/";
|
||||
|
||||
// 企业端ip
|
||||
window._CONFIG["enterpriseTerminal"] = "http://localhost:3001/";
|
||||
@@ -40,4 +40,7 @@ window._CONFIG["sendPostCode"] = "300300"
|
||||
window._CONFIG["lookExpressDomainURL"] = "http://10.10.10.46:8066/lookExpressInfo";
|
||||
|
||||
// 来款内部部署的ip
|
||||
window._CONFIG["intranetUrl"] = "http://10.10.10.46:8055/";
|
||||
window._CONFIG["intranetUrl"] = "http://10.10.10.46:8055/";
|
||||
|
||||
// 企业端ip
|
||||
window._CONFIG["enterpriseTerminal"] = "http://10.10.10.46:8066/";
|
||||
@@ -36,3 +36,6 @@ window._CONFIG["lookExpressDomainURL"] = "http://cwp.catarc.org.cn/lookExpressIn
|
||||
|
||||
// 来款内部部署的ip
|
||||
window._CONFIG["intranetUrl"] = "http://10.12.8.1/";
|
||||
|
||||
// 企业端ip
|
||||
window._CONFIG["enterpriseTerminal"] = "http://cwp.catarc.org.cn/";
|
||||
|
||||
@@ -6,6 +6,8 @@ import {UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||
const loginIdmPlatform = (params) => postAction(`/sys/singleSignOn?code=${params.code}`)
|
||||
// idm 系统单点登录 通过token获取userInfo
|
||||
const getUserInfo = (params) => getAction(`/sys/user/getUserInfoByToken`, params)
|
||||
// 单点登录企业端
|
||||
const ssLoginEnterTerminal = (params) => postAction('/company/adminGetToken', params)
|
||||
//角色管理
|
||||
const addRole = (params)=>postAction('/sys/role/add',params)
|
||||
const editRole = (params)=>postAction('/sys/role/edit',params)
|
||||
@@ -198,6 +200,7 @@ export {
|
||||
getContactsByCompanyNoLimit,
|
||||
loginIdmPlatform,
|
||||
getUserInfo,
|
||||
ssLoginEnterTerminal,
|
||||
companyAdminResetPassword,
|
||||
companyAdminEnable,
|
||||
queryCompanyInfoById
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<div class="user-wrapper" :class="theme">
|
||||
<!-- 1.增加企业端单点登录 -->
|
||||
<a-button type="link" class="single-login-btn" @click="singleLoginEnterTerminal" v-has="'enterpriseTerminal:singleSignLogin'">企业端</a-button>
|
||||
<header-notice class="action"/>
|
||||
<a-dropdown>
|
||||
<span class="action action-full ant-dropdown-link user-dropdown-menu">
|
||||
@@ -76,6 +78,8 @@ import { getFileAccessHttpUrl, getAction } from '@/api/manage'
|
||||
import Vue from 'vue'
|
||||
import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||
import UserAuthorizationCode from './UserAuthorizationCode'
|
||||
import { ssLoginEnterTerminal } from '@/api/api'
|
||||
import {notification} from "ant-design-vue";
|
||||
|
||||
export default {
|
||||
name: 'UserMenu',
|
||||
@@ -237,6 +241,24 @@ export default {
|
||||
let userEmail = this.userInfo().email
|
||||
let uId = this.userInfo().id
|
||||
this.$refs.userAuthorizationCode.show(username, userEmail, uId)
|
||||
},
|
||||
// 单点登录企业端
|
||||
async singleLoginEnterTerminal () {
|
||||
let res = await ssLoginEnterTerminal()
|
||||
if (res.success) {
|
||||
// 单点登录成功,跳转到企业端首页,并用token登录
|
||||
console.log(res)
|
||||
const token = res.result.token
|
||||
window.open(`${window._CONFIG.enterpriseTerminal}dashboard/analysis?token=${token}`, '_self')
|
||||
} else {
|
||||
notification['error']({
|
||||
message: '登录失败',
|
||||
description: res.message,
|
||||
duration: 4,
|
||||
})
|
||||
// window.open(`${window._CONFIG.enterpriseTerminal}user/login`, '_self')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -267,6 +289,17 @@ export default {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.single-login-btn {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.single-login-btn:hover {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.single-login-btn:focus {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user