mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
修复一些小错误
This commit is contained in:
1 parent
8cd84f29e8
commit
a596231a06
15 files changed
+125
-124
No files matched your search
@@ -5,9 +5,8 @@ import * as recordEnum from 'vj/constant/record';
|
||||
const page = new NamedPage('judge_playground', async () => {
|
||||
const { default: SockJs } = await import('sockjs-client');
|
||||
|
||||
const sock = new SockJs('/judge/consume-conn');
|
||||
const sock = new SockJs(`/judge/consume-conn?token=${ UIContext.csrfToken }`);
|
||||
sock.onopen = () => {
|
||||
sock.send(document.cookie);
|
||||
const div = $('<div class="section visible">').appendTo('#messages');
|
||||
$('<div class="section__header"><h1 class="section__title">Connection opened.</h1></div>')
|
||||
.appendTo(div);
|
||||
|
||||
@@ -168,9 +168,6 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
|
||||
} = await loadReactRedux(ScratchpadReducer);
|
||||
|
||||
const sock = new SockJs(Context.socketUrl);
|
||||
sock.onopen = () => {
|
||||
sock.send(document.cookie);
|
||||
};
|
||||
sock.onmessage = (message) => {
|
||||
const msg = JSON.parse(message.data);
|
||||
store.dispatch({
|
||||
|
||||
@@ -6,9 +6,6 @@ const page = new NamedPage('record_detail', async () => {
|
||||
|
||||
const sock = new SockJs(Context.socketUrl);
|
||||
const dd = new DiffDOM();
|
||||
sock.onopen = () => {
|
||||
sock.send(document.cookie);
|
||||
};
|
||||
sock.onmessage = (message) => {
|
||||
const msg = JSON.parse(message.data);
|
||||
const newStatus = $(msg.status_html);
|
||||
|
||||
@@ -9,10 +9,7 @@ const page = new NamedPage('record_main', async () => {
|
||||
const dd = new DiffDOM();
|
||||
|
||||
sock.onopen = () => {
|
||||
sock.send(document.cookie);
|
||||
setTimeout(() => {
|
||||
sock.send(JSON.stringify({ rids: Context.rids }));
|
||||
}, 300);
|
||||
sock.send(JSON.stringify({ rids: Context.rids }));
|
||||
};
|
||||
sock.onmessage = (message) => {
|
||||
const msg = JSON.parse(message.data);
|
||||
|
||||
Reference in new issue
Block a user