Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xxx_phase2_web
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
夏敏伟
xxx_phase2_web
Commits
c8fcf199
Commit
c8fcf199
authored
Sep 25, 2023
by
以墨为白
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
websocket 访问配置话
parent
8f430b6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
src/view/ddkz/ddkzzs.vue
src/view/ddkz/ddkzzs.vue
+1
-1
webpack.config.js
webpack.config.js
+10
-4
No files found.
src/view/ddkz/ddkzzs.vue
View file @
c8fcf199
...
...
@@ -489,7 +489,7 @@ export default {
},
connect
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
ws
=
new
WebSocket
(
`ws://
192.168.168.106:8081
/websocket/my-websocket`
);
this
.
ws
=
new
WebSocket
(
`ws://
${
window
.
location
.
host
}
/websocket/my-websocket`
);
this
.
stompClient
&&
this
.
stompClient
.
connected
&&
this
.
stompClient
.
disconnect
();
this
.
stompClient
=
Stomp
.
over
(
this
.
ws
);
this
.
stompClient
.
heartbeat
.
outgoing
=
20000
;
//若使用STOMP 1.1 版本,默认开启了心跳检测机制(默认值都是10000ms)
...
...
webpack.config.js
View file @
c8fcf199
...
...
@@ -27,7 +27,7 @@ module.exports = {
}),
new
vueLoaderPlugin
()
],
devtool
:
'
eval
'
,
devtool
:
'
eval
'
,
// devtool:'inline-source-map',
module
:
{
// 配置模块的读取和解析规则,通常用来配置 Loader。其类型是一个数组,数组里每一项都描述了如何去处理部分文件
...
...
@@ -42,8 +42,8 @@ module.exports = {
test
:
/
\.
js$/
,
use
:
[{
loader
:
'
babel-loader
'
,
options
:{
plugins
:[
'
syntax-dynamic-import
'
]
options
:
{
plugins
:
[
'
syntax-dynamic-import
'
]
}
}]
},
...
...
@@ -59,7 +59,7 @@ module.exports = {
test
:
/
\.(
eot|svg|ttf|woff|woff2|jpg|png|jpeg
)
$/
,
use
:
[{
loader
:
"
file-loader
"
,
options
:{
options
:
{
esModule
:
false
}
}]
...
...
@@ -94,6 +94,12 @@ module.exports = {
'
^/api/
'
:
'
/
'
}
},
'
/websocket/**
'
:
{
target
:
'
ws://192.168.168.106:8081
'
,
ws
:
true
,
secure
:
false
,
logLevel
:
'
debug
'
,
},
'
/api_exame/
'
:
{
target
:
'
http://192.168.168.110:9005
'
,
pathRewrite
:
{
...
...
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