92c6775f by lihua

fix

1 parent bfdcc9cb
......@@ -4,7 +4,9 @@ VITE_APP_TITLE = 数据资产管理系统
# VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = https://swzl-test.csbr.cn/api
# VITE_API_BASEURL = http://localhost:9000
VITE_API_BASEURL = http://192.168.6.20:28052/
VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/
VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server
......
# 页面标题
VITE_APP_TITLE = 数据资产管理系统
# 接口域名
VITE_API_BASEURL = http://192.168.6.20:28052/
VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/
# VITE_API_BASEURL = http://49.4.26.201:31709/
VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
# # 平台用户 接口请地址
# VITE_APP_USER_API_BASEURL = gateway-server
......
......@@ -256,7 +256,11 @@ const messageAllRead = () => {
}
const createServerConnect = () => {
const websocketUrl = '192.168.6.20:29203'; //测试环境的
let websocketUrl = '192.168.6.20:39203';
//测试环境
if (location.origin == 'https://daop-zcgl-test.zgsjzc.com') {
websocketUrl = 'daop-zcgl-test-websocket.zgsjzc.com'
}
const ws = new WebSocket(`ws://${websocketUrl}/websocket/${userData.staffGuid}`);
ws.onopen = function () {
console.log('Connected to server.');
......
......@@ -27,12 +27,13 @@ const useUserStore = defineStore(
const isLogin = ref(token.value ? true : false);//退出登录。
const getTokenPromise: any = ref(null);
/* idass的登录页面url,退出登录需要跳转到登录页。*/
const idassLoginUrl = 'https://idaas-test.csbr.cn/login';
const idassLoginUrl = import.meta.env.VITE_IDASS_BASEURL;
const timer: any = ref(null);
//获取token.
function getToken(data, state) {
data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
data.userType = 2;
data.appKey = '672c2bf2e4b0cac8732a6104';
data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/';
return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
getTokenPromise.value = null;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!