diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index b44134285..67b70a0d3 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -111,7 +111,6 @@ import { mapGetters } from 'vuex'; import SystemTitle from './Title'; import {getSessionStorage } from '@/utils/auth'; -import { ThirdLoginList } from '@/scripts/ProjectConfig'; export default { components: { @@ -131,7 +130,7 @@ export default { 'routers' ]), thirdLogin() { - return ThirdLoginList.includes(getSessionStorage('project')); + return this.$store.state.user.thirdLogin; }, username() { return this.$store.state.user.nickname; diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index 4fe348304..d30eddc6f 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -891,7 +891,7 @@ // jjjlm: 'JJJLM' // }; // /** 嵌入第三方平台 导航栏右上角 清空 */ -export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs', 'richorgscm']; +// export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs', 'richorgscm']; // /** 底部栏仅展示公司信息不展示备案号 */ // export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', // 'designhls', 'hyd', 'designhyd', 'hydrailway', 'designhydrailway', 'cgy', 'designcgy', 'richor', 'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'richorygy', diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 979bcb8ab..26663de7c 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,4 +1,4 @@ -import { login, logout, getInfo, preLogout } from '@/api/login'; +import { login, logout, getInfo, preLogout, getLoginInfo } from '@/api/login'; import { getToken, setToken, removeToken } from '@/utils/auth'; import { LoginParams } from '@/utils/login'; import { creatSubscribe, clearSubscribe, perpetualTopic, disconnect} from '@/utils/stomp'; @@ -146,8 +146,8 @@ const user = { // 获取用户信息 GetInfo({ commit }, token) { return new Promise((resolve, reject) => { - getInfo(token).then(response => { - const user = response.data; + getLoginInfo(token).then(response => { + const user = response.data.accountVO; if (user.roles && user.roles.length > 0) { // 验证返回的roles是否是一个非空数组 commit('SET_ROLES', user.roles); } else { @@ -163,7 +163,7 @@ const user = { commit('SET_COMPANYADMIN', user.companyAdmin); commit('SET_COMPANYNAME', user.companyName); commit('SET_COMPANYPROJECTLIST', user.projectCodes); - commit('SET_THIRDLOGIN', user.thirdLogin); + commit('SET_THIRDLOGIN', response.data.thirdLogin); resolve(user); }).catch(error => { reject(error); diff --git a/src/views/newMap/display/terminals/terminalMenu.vue b/src/views/newMap/display/terminals/terminalMenu.vue index eb68119e2..b222dd525 100644 --- a/src/views/newMap/display/terminals/terminalMenu.vue +++ b/src/views/newMap/display/terminals/terminalMenu.vue @@ -28,8 +28,6 @@