Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 977ac7c4
authored
Mar 23, 2020
by
周志凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[feat]: test api
1 parent
96b889de
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
2 deletions
css/page.css
index.html
js/common.js
js/socket.js
css/page.css
View file @
977ac7c
...
@@ -136,6 +136,7 @@ html, body, #app {
...
@@ -136,6 +136,7 @@ html, body, #app {
background
:
#409EFF
;
background
:
#409EFF
;
border-radius
:
inherit
;
border-radius
:
inherit
;
text-align
:
right
;
text-align
:
right
;
transition
:
width
.2s
linear
;
}
}
.result-progress__text
{
.result-progress__text
{
...
...
index.html
View file @
977ac7c
This diff is collapsed.
Click to expand it.
js/common.js
View file @
977ac7c
apiUrl
=
'http://101.201.36.180:9998/'
,
webSockUrl
=
''
\ No newline at end of file
\ No newline at end of file
apiUrl
=
'http://192.168.9.146:8080/'
,
webSockUrl
=
'192.168.9.146:8080'
\ No newline at end of file
\ No newline at end of file
js/socket.js
View file @
977ac7c
...
@@ -120,7 +120,14 @@
...
@@ -120,7 +120,14 @@
*/
*/
ws
.
prototype
.
open
=
function
()
{
ws
.
prototype
.
open
=
function
()
{
var
self
=
this
;
var
self
=
this
;
if
(
"WebSocket"
in
window
)
{
wsocket
=
new
WebSocket
(
this
.
url
,
this
.
protocols
||
[]);
wsocket
=
new
WebSocket
(
this
.
url
,
this
.
protocols
||
[]);
}
else
if
(
"MozWebSocket"
in
window
)
{
wsocket
=
new
MozWebSocket
(
this
.
url
,
this
.
protocols
||
[]);
}
else
{
wsocket
=
new
SockJS
(
this
.
url
,
this
.
protocols
||
[]);
}
// wsocket = new WebSocket(this.url, this.protocols || []);
eventTarget
.
dispatchEvent
(
generateEvent
(
'connecting'
));
eventTarget
.
dispatchEvent
(
generateEvent
(
'connecting'
));
wsocket
.
onopen
=
function
(
event
)
{
wsocket
.
onopen
=
function
(
event
)
{
self
.
protocols
=
ws
.
protocols
;
self
.
protocols
=
ws
.
protocols
;
...
...
Write
Preview
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