mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
评测列表实时更新&评测机接口更换为socket
This commit is contained in:
1 parent
f055d79fef
commit
ec727d58aa
7 files changed
+107
-50
No files matched your search
@@ -8,6 +8,12 @@ const page = new NamedPage('record_main', async () => {
|
||||
const sock = new SockJs(Context.socketUrl);
|
||||
const dd = new DiffDOM();
|
||||
|
||||
sock.onopen = () => {
|
||||
sock.send(document.cookie);
|
||||
setTimeout(() => {
|
||||
sock.send(JSON.stringify({ rdocs: Context.rids }));
|
||||
}, 300);
|
||||
};
|
||||
sock.onmessage = (message) => {
|
||||
const msg = JSON.parse(message.data);
|
||||
const $newTr = $(msg.html);
|
||||
|
||||
Reference in new issue
Block a user