| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- import {axios} from "../utils/request";
- const api = {
- pre: "problem",
- };
- export function getProblemsAPI() {
- return axios({
- url: `${api.pre}`,
- method: "GET",
- });
- }
- export function getProblemManageListAPI() {
- return axios({
- url: `${api.pre}/manage`,
- method: "GET",
- });
- }
- export function getProblemManageAPI(problemId) {
- return axios({
- url: `${api.pre}/manage/`+problemId,
- method: "GET",
- });
- }
- export function getProblemDetailAPI(problemId) {
- return axios({
- url: `${api.pre}/`+problemId,
- method: "GET",
- });
- }
- export function addProblemAPI(data) {
- return axios({
- url: `${api.pre}`,
- method: "POST",
- data
- });
- }
- export function deleteProblemAPI(problemId){
- return axios({
- url: `${api.pre}`,
- method: "DELETE",
- params:{
- problemId:problemId
- }
- });
- }
- export function getTestCasesByProblemIdAPI(problemId){
- return axios({
- url: `${api.pre}/testcase`,
- method: "GET",
- params:{
- problemId:problemId
- }
- });
- }
- export function addTestCaseAPI(data) {
- return axios({
- url: `${api.pre}/testcase`,
- method: "POST",
- data
- });
- }
- export function batchAddTestCaseAPI(data) {
- return axios({
- url: `${api.pre}/batchTestcase`,
- method: "POST",
- data
- });
- }
- export function delTestCaseAPI(testCaseId) {
- return axios({
- url: `${api.pre}/testcase`,
- method: "DELETE",
- params:{
- testCaseId:testCaseId
- }
- });
- }
|