92c6775f by lihua

fix

1 parent bfdcc9cb
...@@ -4,7 +4,9 @@ VITE_APP_TITLE = 数据资产管理系统 ...@@ -4,7 +4,9 @@ VITE_APP_TITLE = 数据资产管理系统
4 # VITE_API_BASEURL = https://www.zgsjzc.com/api 4 # VITE_API_BASEURL = https://www.zgsjzc.com/api
5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api 5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api
6 # VITE_API_BASEURL = http://localhost:9000 6 # VITE_API_BASEURL = http://localhost:9000
7 VITE_API_BASEURL = http://192.168.6.20:28052/ 7 VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/
8
9 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
8 10
9 # 平台用户 接口请地址 11 # 平台用户 接口请地址
10 VITE_APP_USER_API_BASEURL = gateway-server 12 VITE_APP_USER_API_BASEURL = gateway-server
......
1 # 页面标题 1 # 页面标题
2 VITE_APP_TITLE = 数据资产管理系统 2 VITE_APP_TITLE = 数据资产管理系统
3 # 接口域名 3 # 接口域名
4 VITE_API_BASEURL = http://192.168.6.20:28052/ 4 VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/
5 # VITE_API_BASEURL = http://49.4.26.201:31709/ 5 # VITE_API_BASEURL = http://49.4.26.201:31709/
6 6
7 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
8
7 # # 平台用户 接口请地址 9 # # 平台用户 接口请地址
8 # VITE_APP_USER_API_BASEURL = gateway-server 10 # VITE_APP_USER_API_BASEURL = gateway-server
9 11
......
...@@ -256,7 +256,11 @@ const messageAllRead = () => { ...@@ -256,7 +256,11 @@ const messageAllRead = () => {
256 } 256 }
257 257
258 const createServerConnect = () => { 258 const createServerConnect = () => {
259 const websocketUrl = '192.168.6.20:29203'; //测试环境的 259 let websocketUrl = '192.168.6.20:39203';
260 //测试环境
261 if (location.origin == 'https://daop-zcgl-test.zgsjzc.com') {
262 websocketUrl = 'daop-zcgl-test-websocket.zgsjzc.com'
263 }
260 const ws = new WebSocket(`ws://${websocketUrl}/websocket/${userData.staffGuid}`); 264 const ws = new WebSocket(`ws://${websocketUrl}/websocket/${userData.staffGuid}`);
261 ws.onopen = function () { 265 ws.onopen = function () {
262 console.log('Connected to server.'); 266 console.log('Connected to server.');
......
...@@ -27,12 +27,13 @@ const useUserStore = defineStore( ...@@ -27,12 +27,13 @@ const useUserStore = defineStore(
27 const isLogin = ref(token.value ? true : false);//退出登录。 27 const isLogin = ref(token.value ? true : false);//退出登录。
28 const getTokenPromise: any = ref(null); 28 const getTokenPromise: any = ref(null);
29 /* idass的登录页面url,退出登录需要跳转到登录页。*/ 29 /* idass的登录页面url,退出登录需要跳转到登录页。*/
30 const idassLoginUrl = 'https://idaas-test.csbr.cn/login'; 30 const idassLoginUrl = import.meta.env.VITE_IDASS_BASEURL;
31 const timer: any = ref(null); 31 const timer: any = ref(null);
32 //获取token. 32 //获取token.
33 function getToken(data, state) { 33 function getToken(data, state) {
34 data.platformGuid = "7f16f697aec111ef8656fa163e60becd"; 34 data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
35 data.userType = 2; 35 data.userType = 2;
36 data.appKey = '672c2bf2e4b0cac8732a6104';
36 data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/'; 37 data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/';
37 return getTokenPromise.value = getTokenByCode(data).then((res: any) => { 38 return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
38 getTokenPromise.value = null; 39 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!