Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kaishi_test_01
Project
Project
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
template admin
kaishi_test_01
Commits
c2ba2f8f
Commit
c2ba2f8f
authored
Jun 24, 2021
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加日志
parent
de51b171
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
index.js
play/index.js
+3
-7
No files found.
play/index.js
View file @
c2ba2f8f
...
@@ -45,12 +45,7 @@ $(function(){
...
@@ -45,12 +45,7 @@ $(function(){
$
(
"
.log
"
).
html
(
""
);
$
(
"
.log
"
).
html
(
""
);
});
});
try
{
var
ws
=
new
WebSocket
(
"
ws://localhost:8011/
"
);
}
catch
(
e
)
{
}
var
ws
=
new
WebSocket
(
"
ws://localhost:8011
"
);
ws
.
onmessage
=
function
(
e
){
ws
.
onmessage
=
function
(
e
){
console
.
log
(
Date
.
now
(),
e
.
data
);
console
.
log
(
Date
.
now
(),
e
.
data
);
// 返回答题结果
// 返回答题结果
...
@@ -66,6 +61,7 @@ $(function(){
...
@@ -66,6 +61,7 @@ $(function(){
// const socket = io.connect('http://localhost:8011');
// const socket = io.connect('http://localhost:8011');
// socket.on("clickOption", function(index){
// socket.on("clickOption", function(index){
// $(".log").append(`答题器触发了:${arr[index]} <br>`);
// $(".log").append(`答题器触发了:${arr[index]} <br>`);
...
...
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