Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
92c6775f
authored
2025-01-23 15:26:41 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
bfdcc9cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
.env.development
.env.product
src/layouts/index.vue
src/store/modules/user.ts
.env.development
View file @
92c6775
...
...
@@ -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
...
...
.env.product
View file @
92c6775
# 页面标题
VITE_APP_TITLE = 数据资产管理系统
# 接口域名
VITE_API_BASEURL = http
://192.168.6.20:28052
/
VITE_API_BASEURL = http
s://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
...
...
src/layouts/index.vue
View file @
92c6775
...
...
@@ -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.'
);
...
...
src/store/modules/user.ts
View file @
92c6775
...
...
@@ -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
;
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment