|
|
@@ -1,6 +1,4 @@
|
|
|
import axios from 'axios'
|
|
|
-// import {axios_dev,axios_prod} from "@/api/axios.config";
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 用于测试$api是否可以使用
|
|
|
@@ -19,7 +17,7 @@ export function testFunc(name) {
|
|
|
* @returns {Promise<AxiosResponse<any>>}
|
|
|
*/
|
|
|
export function getTargetQuestionList(offset, pageSize) {
|
|
|
- return axios.get("/one/api/pageQuestion", {
|
|
|
+ return axios.get("/api/api/pageQuestion", {
|
|
|
params:{
|
|
|
offset: offset,
|
|
|
pageSize: pageSize
|
|
|
@@ -33,7 +31,7 @@ export function getTargetQuestionList(offset, pageSize) {
|
|
|
* @returns {Promise<AxiosResponse<any>>}
|
|
|
*/
|
|
|
export function requestQuestion(stem, ...items) {
|
|
|
- return axios.get("/one/api/searchQuestion", {
|
|
|
+ return axios.get("/api/api/searchQuestion", {
|
|
|
params: {
|
|
|
stem: stem,
|
|
|
tags: items[0],
|
|
|
@@ -52,7 +50,7 @@ export function requestQuestion(stem, ...items) {
|
|
|
* @returns {Promise<AxiosResponse<any>>}
|
|
|
*/
|
|
|
export function deleteQuestionById(id) {
|
|
|
- return axios.delete("/one/api/question/"+id);
|
|
|
+ return axios.delete("/api/api/question/"+id);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -62,7 +60,7 @@ export function deleteQuestionById(id) {
|
|
|
* @returns {Promise<AxiosResponse<any>>}
|
|
|
*/
|
|
|
export function createQuestion(questionvo) {
|
|
|
- return axios.post("/one/api/question", questionvo);
|
|
|
+ return axios.post("/api/api/question", questionvo);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -72,7 +70,7 @@ export function createQuestion(questionvo) {
|
|
|
* @returns {Promise<AxiosResponse<any>>}
|
|
|
*/
|
|
|
export function updateQuestion(questionvo) {
|
|
|
- return axios.put("/one/api/question/"+questionvo.id, questionvo);
|
|
|
+ return axios.put("/api/api/question/"+questionvo.id, questionvo);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -82,7 +80,7 @@ export function updateQuestion(questionvo) {
|
|
|
* @returns {Promise<AxiosResponse<any>>}
|
|
|
*/
|
|
|
export function getStateQuestion(states, offset, pageSize) {
|
|
|
- return axios.get("/one/api/state", {
|
|
|
+ return axios.get("/api/api/state", {
|
|
|
params:{
|
|
|
state: states,
|
|
|
offset: offset,
|
|
|
@@ -90,14 +88,14 @@ export function getStateQuestion(states, offset, pageSize) {
|
|
|
}});
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * 上传题目列表到线上Bok
|
|
|
- * @param questions
|
|
|
- * @returns {Promise<AxiosResponse<any>>}
|
|
|
- */
|
|
|
-export function createBokQuestion(questions){
|
|
|
- return axios.post("/two/api/questions", questions);
|
|
|
-}
|
|
|
+// /**
|
|
|
+// * 上传题目列表到线上Bok
|
|
|
+// * @param questions
|
|
|
+// * @returns {Promise<AxiosResponse<any>>}
|
|
|
+// */
|
|
|
+// export function createBokQuestion(questions){
|
|
|
+// return axios.post("/two/api/questions", questions);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|