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