Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhmes-agecal
Commits
831b3771
Commit
831b3771
authored
Aug 22, 2025
by
junshizhonglangjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 nginx 配置调整
parent
7d7496aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
AgingCabinetBoard.vue
...cal-web/src/views/screen/components/AgingCabinetBoard.vue
+8
-3
RoboticArm.vue
zhmes-agecal-web/src/views/screen/components/RoboticArm.vue
+7
-2
No files found.
zhmes-agecal-web/src/views/screen/components/AgingCabinetBoard.vue
View file @
831b3771
...
...
@@ -106,9 +106,14 @@ export default {
// 初始化WebSocket连接
initWebSocket
()
{
// 根据当前页面协议选择ws/wss
const
backendUrl
=
process
.
env
.
VUE_APP_API_BASE_URL
||
'http://localhost:8087'
;
const
wsUrl
=
backendUrl
.
replace
(
'http'
,
'ws'
)
+
'/ws-aging-cabinet'
;
// 从环境变量获取基础URL,默认使用Nginx代理地址
const
backendUrl
=
process
.
env
.
VUE_APP_API_BASE_URL
||
'http://localhost:8082'
;
// 根据需要切换不同的WebSocket端点
const
wsPath
=
'/agecal/ws-aging-cabinet'
;
// 或 '/agecal/ws-aging-cabinet'
// 替换协议并添加完整路径
const
wsUrl
=
backendUrl
.
replace
(
'http'
,
'ws'
)
+
wsPath
;
this
.
ws
=
new
WebSocket
(
wsUrl
);
// 连接建立
...
...
zhmes-agecal-web/src/views/screen/components/RoboticArm.vue
View file @
831b3771
...
...
@@ -208,8 +208,13 @@ export default {
},
methods
:
{
initWebSocket
()
{
const
backendUrl
=
process
.
env
.
VUE_APP_API_BASE_URL
||
'http://localhost:8087'
;
const
wsUrl
=
backendUrl
.
replace
(
'http'
,
'ws'
)
+
'/ws-robot-arm'
;
// 从环境变量获取基础URL,默认使用Nginx代理地址
const
backendUrl
=
process
.
env
.
VUE_APP_API_BASE_URL
||
'http://localhost:8082'
;
// 根据需要切换不同的WebSocket端点
const
wsPath
=
'/agecal/ws-robot-arm'
;
// 或 '/agecal/ws-aging-cabinet'
// 替换协议并添加完整路径
const
wsUrl
=
backendUrl
.
replace
(
'http'
,
'ws'
)
+
wsPath
;
try
{
this
.
websocket
=
new
WebSocket
(
wsUrl
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment