chore: sync change
fix: detail info
This commit is contained in:
+4
-4
@@ -2,7 +2,7 @@ const BACKEND_URL = "https://rank.intcplab.cn";
|
||||
|
||||
async function fetchScoresData(para, project, inject) {
|
||||
try {
|
||||
const response = await fetch(`${BACKEND_URL}/${para}/${project}`);
|
||||
const response = await fetch(`${BACKEND_URL}/get_scores/${project}?sort_by=${para}`);
|
||||
const data = await response.json();
|
||||
|
||||
const tableBody = document.getElementById(`${inject}`);
|
||||
@@ -45,7 +45,7 @@ function showDetailsModal(para, project, index) {
|
||||
const modal = document.getElementById("detailsModal");
|
||||
const modalDetails = document.getElementById("modal-details");
|
||||
console.log(para, index);
|
||||
fetch(`${BACKEND_URL}/${para}/${project}`)
|
||||
fetch(`${BACKEND_URL}/get_scores/${project}?sort_by=${para}`)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
modalDetails.innerHTML = data[index].details + "<br><br>";
|
||||
@@ -53,5 +53,5 @@ function showDetailsModal(para, project, index) {
|
||||
});
|
||||
}
|
||||
|
||||
window.onload = fetchScoresData("get_top_scores", "challenge_knn", "top-data-table-body");
|
||||
window.onload = fetchScoresData("get_scores", "challenge_knn", "recent-data-table-body");
|
||||
window.onload = fetchScoresData("score", "challenge_knn", "top-data-table-body");
|
||||
window.onload = fetchScoresData("time", "challenge_knn", "recent-data-table-body");
|
||||
|
||||
Reference in New Issue
Block a user