diff --git a/src/api/questionBank.js b/src/api/questionBank.js index dd2538322..0b26d4897 100644 --- a/src/api/questionBank.js +++ b/src/api/questionBank.js @@ -1,10 +1,70 @@ import request from '@/utils/request'; -/** 推送通知消息*/ -export function listQuestionPage(data) { +// 分页查询理论试题 +export function listQuestionPage(params) { return request({ - // url: `/api/pushMessage`, - // method: 'post', - // data: data + url: `/api/questionBank/questions/paging`, + method: 'get', + params + }); +} + +// 创建题目 +export function createQuestion(data) { + return request({ + url: `/api/questionBank/questions`, + method: 'post', + data + }); +} + +// 删除题目 +export function deleteQuestion(questionId) { + return request({ + url: `/api/questionBank/questions/${questionId}`, + method: 'delete' + }); +} + +// 更新题目 +export function updateQuestion(questionId, 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}`, + method: 'put', + data + }); +} + +// 获取题目信息 +export function getQuestionInfo(questionId) { + return request({ + url: `/api/questionBank/questions/${questionId}`, + method: 'get' + }); +} + +// 根据题目查询选项 +export function getOptionsByQuestionId(questionId) { + return request({ + url: `/api/questionBank/questions/${questionId}/options`, + method: 'get' }); } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 778caeb7b..836771751 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,11 +2,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - // BASE_API = 'http://192.168.3.82:9000'; // 杜康 + BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/competitionManage/bankList/dialog-detail.vue b/src/views/competitionManage/bankList/dialog-detail.vue index 2ce0f390a..bf2898d96 100644 --- a/src/views/competitionManage/bankList/dialog-detail.vue +++ b/src/views/competitionManage/bankList/dialog-detail.vue @@ -31,37 +31,37 @@