From 160587e333f1487da8c7142063f0f8f3cc1baf38 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Wed, 27 May 2020 14:13:47 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=95=E9=A2=98=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/questionBank.js | 29 +-------
.../bankList/dialog-update-answer.vue | 70 -------------------
.../bankList/dialog-update-question.vue | 42 -----------
.../competitionManage/bankList/index.vue | 57 ++-------------
.../bankList/question-create-page.vue | 1 -
.../bankList/question-form.vue | 27 ++-----
.../bankList/question-update-page.vue | 34 +++++----
7 files changed, 30 insertions(+), 230 deletions(-)
delete mode 100644 src/views/competitionManage/bankList/dialog-update-answer.vue
delete mode 100644 src/views/competitionManage/bankList/dialog-update-question.vue
diff --git a/src/api/questionBank.js b/src/api/questionBank.js
index 0b26d4897..90c860824 100644
--- a/src/api/questionBank.js
+++ b/src/api/questionBank.js
@@ -27,27 +27,9 @@ export function deleteQuestion(questionId) {
}
// 更新题目
-export function updateQuestion(questionId, data) {
+export function updateOption(data) {
return request({
- url: `/api/questionBank/questions/${questionId}`,
- method: 'put',
- data
- });
-}
-
-// 更新正确选项
-export function updateAnswer(questionId, data) {
- return request({
- url: `/api/questionBank/questions/${questionId}/answer`,
- method: 'put',
- data
- });
-}
-
-// 更新选项
-export function updateOption(optionId, data) {
- return request({
- url: `/api/questionBank/questions/options/${optionId}`,
+ url: `/api/questionBank/questions/${data.id}`,
method: 'put',
data
});
@@ -61,10 +43,3 @@ export function getQuestionInfo(questionId) {
});
}
-// 根据题目查询选项
-export function getOptionsByQuestionId(questionId) {
- return request({
- url: `/api/questionBank/questions/${questionId}/options`,
- method: 'get'
- });
-}
diff --git a/src/views/competitionManage/bankList/dialog-update-answer.vue b/src/views/competitionManage/bankList/dialog-update-answer.vue
deleted file mode 100644
index 0bcbf8979..000000000
--- a/src/views/competitionManage/bankList/dialog-update-answer.vue
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/competitionManage/bankList/dialog-update-question.vue b/src/views/competitionManage/bankList/dialog-update-question.vue
deleted file mode 100644
index c592edddd..000000000
--- a/src/views/competitionManage/bankList/dialog-update-question.vue
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/views/competitionManage/bankList/index.vue b/src/views/competitionManage/bankList/index.vue
index 062371ed3..4bff2fff2 100644
--- a/src/views/competitionManage/bankList/index.vue
+++ b/src/views/competitionManage/bankList/index.vue
@@ -1,23 +1,17 @@
-
-