494600b6 by lihua

fix

1 parent 8bfb030c
......@@ -6,6 +6,8 @@ VITE_APP_TITLE = 数据资产管理系统
# VITE_API_BASEURL = http://localhost:9000
VITE_API_BASEURL = http://192.168.6.20:28052/
VITE_IDASS_BASEURL = https://idaas-test.csbr.cn/login
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server
......
......@@ -4,6 +4,8 @@ VITE_APP_TITLE = 数据资产管理系统
VITE_API_BASEURL = http://192.168.6.20:28052/
# VITE_API_BASEURL = http://49.4.26.201:31709/
VITE_IDASS_BASEURL = https://idaas-test.csbr.cn/login
# # 平台用户 接口请地址
# VITE_APP_USER_API_BASEURL = gateway-server
......
......@@ -42,7 +42,7 @@ router.beforeEach(async (to, from, next) => {
// name: 'login',
// replace: true,
// })
window.location.href = userStore.idassLoginUrl;
window.location.href = import.meta.env.VITE_IDASS_BASEURL;
}
else if (to.name == 'scenes') {
next({
......@@ -131,7 +131,7 @@ router.beforeEach(async (to, from, next) => {
next()
}
else if (!to.query.code && to.name !== 'login') {
window.location.href = userStore.idassLoginUrl;
window.location.href = import.meta.env.VITE_IDASS_BASEURL;
// next({
// name: 'login',
// query: {
......
......@@ -27,7 +27,7 @@ const useUserStore = defineStore(
const isLogin = ref(token.value ? true : false);//退出登录。
const getTokenPromise: any = ref(null);
/* idass的登录页面url,退出登录需要跳转到登录页。*/
const idassLoginUrl = ref('https://idaas-test.csbr.cn/login');
const idassLoginUrl = import.meta.env.VITE_IDASS_BASEURL;
const timer: any = ref(null);
//获取token.
function getToken(data, state) {
......@@ -175,7 +175,7 @@ const useUserStore = defineStore(
menuStore.setActived(0)
tabbar.value = []
tabbarMap.value = {}
window.location.href = idassLoginUrl.value + '?logout=1';
window.location.href = idassLoginUrl + '?logout=1';
});
} else {
let hasCode = localStorage.getItem('code');
......@@ -194,7 +194,7 @@ const useUserStore = defineStore(
tabbar.value = []
tabbarMap.value = {}
if (hasCode) {
window.location.href = idassLoginUrl.value + '?logout=1';
window.location.href = idassLoginUrl + '?logout=1';
} else {
router.push({
name: 'login',
......@@ -312,7 +312,6 @@ const useUserStore = defineStore(
permissions,
isLogin,
isLoginOut,
idassLoginUrl,
getTokenPromise,
getToken,
login,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!