Skip to content

Commit

Permalink
fix:next 接口#5
Browse files Browse the repository at this point in the history
  • Loading branch information
fifthThirteen committed Feb 7, 2025
1 parent 1a74a49 commit 91cdc99
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
},
"dependencies": {
"@jx3box/jx3box-comment-ui": "^2.0.2",
"@jx3box/jx3box-common": "^8.6.2",
"@jx3box/jx3box-common": "^8.6.3",
"@jx3box/jx3box-common-ui": "^9.1.4",
"@jx3box/jx3box-data": "^3.7.7",
"@jx3box/jx3box-editor": "^2.2.23",
"@jx3box/jx3box-editor": "^2.2.24",
"@jx3box/jx3box-emotion": "^1.2.8",
"@jx3box/jx3box-facedat": "^2.6.2",
"@jx3box/jx3box-map": "^0.2.0",
Expand Down
10 changes: 9 additions & 1 deletion src/assets/css/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body {
padding-top: 0;
}

.m-comments{
.m-comments {
.none;
}

Expand Down Expand Up @@ -55,3 +55,11 @@ body {
// .ml(@openedWidth);
// }
}

// 适配小程序端
.v-miniprogram {
.c-header,
.c-footer {
.none;
}
}
30 changes: 15 additions & 15 deletions src/service/exam.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { $next } from "@jx3box/jx3box-common/js/https";

//
function getExamPaperList(params) {
return $next().get("/api/question/user-exam-paper", {
return $next({ proxy: true }).get("/api/question/user-exam-paper", {
params,
});
}

function getExamQuestionList(params) {
return $next().get("api/question/public-list", {
return $next({ proxy: true }).get("/api/question/public-list", {
params,
});
}
Expand All @@ -25,7 +25,7 @@ function getPublishQuestion(id) {
return $next({ proxy: true }).get(`/api/question/${id}`);
}
function getPublishPaper(id) {
return $next().get("/api/question/" + "exam-paper/" + id);
return $next({ proxy: true }).get("/api/question/" + "exam-paper/" + id);
}

function submitAnswer(id, answers, force = false) {
Expand Down Expand Up @@ -57,59 +57,59 @@ function checkPaper(id, action) {
}

function getExamRandom(count = 12) {
return $next().get("api/game/exam/random", {
return $next({ proxy: true }).get("api/game/exam/random", {
params: {
count,
},
});
}
function getExamByKey(params) {
return $next().get("api/game/exam/search", {
return $next({ proxy: true }).get("api/game/exam/search", {
params,
});
}
function createGameQuestion(data) {
return $next().post("api/game/exam/ugc", data);
return $next({ proxy: true }).post("api/game/exam/ugc", data);
}

function getGameQuestion(rid) {
return $next().get("api/game/exam/details/" + rid);
return $next({ proxy: true }).get("api/game/exam/details/" + rid);
}

function createQuestion(data) {
return $next().post("/api/question/create", data);
return $next({ proxy: true }).post("/api/question/create", data);
}

function updateQuestion(id, data) {
return $next().put("/api/question/" + id + "/update", data);
return $next({ proxy: true }).put("/api/question/" + id + "/update", data);
}

function createPaper(data) {
return $next().post("/api/question/" + "exam-paper", data);
return $next({ proxy: true }).post("/api/question/" + "exam-paper", data);
}

function updatePaper(id, data) {
return $next().put("/api/question/" + "exam-paper/" + id, data);
return $next({ proxy: true }).put("/api/question/" + "exam-paper/" + id, data);
}

function getQuestions(query) {
return $next().get("/api/question/" + "my-list", {
return $next({ proxy: true }).get("/api/question/" + "my-list", {
params: query,
});
}

function getPapers(query) {
return $next().get("/api/question/exam-paper?my", {
return $next({ proxy: true }).get("/api/question/exam-paper?my", {
params: query,
});
}

function deleteQuestion(id) {
return $next().delete(`/api/question/my/${id}`);
return $next({ proxy: true }).delete(`/api/question/my/${id}`);
}

function deletePaper(id) {
return $next().delete(`/api/question/exam-paper/my/${id}`);
return $next({ proxy: true }).delete(`/api/question/exam-paper/my/${id}`);
}

export {
Expand Down

0 comments on commit 91cdc99

Please sign in to comment.