|
@@ -123,7 +123,7 @@ export function useWs() {
|
|
|
|
|
|
socket.on('msg2frontend', (e: any) => {
|
|
|
callback(e);
|
|
|
- if (['init_result', 'set_exam_state', 'disconnect_request'].includes(e.cmd)) {
|
|
|
+ if (['init_result', 'set_exam_state', 'exam_status', 'disconnect_request'].includes(e.cmd)) {
|
|
|
console.log(`【接收:${e.cmd}】`, JSON.stringify(e));
|
|
|
}
|
|
|
//实时状态
|
|
@@ -260,7 +260,7 @@ export function useWs() {
|
|
|
if (version == 'v2') {
|
|
|
type = type + '_' + version;
|
|
|
}
|
|
|
- if (['task_starts', 'exam_starts', 'msgfrom_frontend', 'exam_ends', 'task_starts_v2', 'exam_starts_v2', 'msgfrom_frontend_v2', 'exam_ends_v2'].includes(type)) {
|
|
|
+ if (['task_starts', 'exam_starts', 'msgfrom_frontend', 'exam_ends', 'get_exam_status', 'task_starts_v2', 'exam_starts_v2', 'msgfrom_frontend_v2', 'exam_ends_v2', 'get_exam_status_v2'].includes(type)) {
|
|
|
console.log(`【发送:${type}】`, JSON.stringify(data))
|
|
|
}
|
|
|
socket.emit(type, JSON.stringify(data), callback);
|