Browse Source

bugfix:去除调试代码

pull/6/head
zjz1993 5 years ago
parent
commit
d1312ea584
  1. 60
      views/submission_practice.ejs

60
views/submission_practice.ejs

@ -369,42 +369,42 @@ if (token != null) {
}); });
socket.emit('join', token, function (data) { socket.emit('join', token, function (data) {
console.log("join! ", data); console.log("join! ", data);
data.ok=true; // data.ok=true;
data.finished=true; // data.finished=true;
data.roughResult = { // data.roughResult = {
memory: 7128, // memory: 7128,
result: "Accepted", // result: "Accepted",
score: 100, // score: 100,
time: 272, // time: 272,
} // }
data.running=false; // data.running=false;
if (data && data.ok) { if (data && data.ok) {
if (data.finished) { if (data.finished) {
vueApp.roughData.result = data.roughResult; vueApp.roughData.result = data.roughResult;
// if (!data.result) location.reload(true); // if (!data.result) location.reload(true);
vueApp.detailResult = data.result; vueApp.detailResult = data.result;
vueApp.roughData.running = false; vueApp.roughData.running = false;
if (data.roughResult.result === 'Accepted') { // if (data.roughResult.result === 'Accepted') {
$.ajax({ // $.ajax({
url: `/api/pass/${cid}/${pid}`, // url: `/api/pass/${cid}/${pid}`,
type: 'GET', // type: 'GET',
success: function (data) { // success: function (data) {
}, // },
error: function (XMLHttpRequest, textStatus, errorThrown) { // error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('练习功能发生故障'); // alert('练习功能发生故障');
} // }
}); // });
} else { // } else {
$.ajax({ // $.ajax({
url: `/api/nopass/${cid}/${pid}`, // url: `/api/nopass/${cid}/${pid}`,
type: 'GET', // type: 'GET',
success: function (data) { // success: function (data) {
}, // },
error: function (XMLHttpRequest, textStatus, errorThrown) { // error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('练习功能发生故障'); // alert('练习功能发生故障');
} // }
}); // });
} // }
socket.close(); socket.close();
} else { } else {
if (data.running) { if (data.running) {

Loading…
Cancel
Save