xx-sys/src/api/question/question.js

28 lines
533 B
JavaScript
Raw Normal View History

2024-07-17 07:34:57 +00:00
import http from "@/utils/http";
//获取题目
export const getQuestion= (type)=>{
if(type==null||type==undefined){
type="refresh";
}
return http({
url:"/question/getQuestion",
method:"get",
params:{
type
},
})
}
2024-07-17 11:36:45 +00:00
//验证题目是否正确
export const checkQuestion= ({
questionId,
answer
})=>{
2024-07-17 07:34:57 +00:00
return http({
url:"/question/validationAnswer",
method:"get",
2024-07-17 11:36:45 +00:00
params:{
questionId,
answer
2024-07-17 07:34:57 +00:00
}
})
}