1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import { $httpWithMsg } from "../../plugins/axios";
- import { QUESTION_API } from "@/constants/constants";
- // common select
- export const courseQueryApi = (name, enable) => {
- return $httpWithMsg.get(`${QUESTION_API}/course/query`, {
- params: {
- name,
- enable: enable || undefined,
- },
- });
- };
- export const propertyNameQueryApi = (courseId, name) => {
- return $httpWithMsg.get(`${QUESTION_API}/courseProperty/enable`, {
- params: {
- courseId,
- name,
- },
- });
- };
- export const propertyFirstQueryApi = (coursePropertyId) => {
- return $httpWithMsg.get(`${QUESTION_API}/property/first/${coursePropertyId}`);
- };
- export const propertySecondQueryApi = (firstPropertyId) => {
- return $httpWithMsg.get(`${QUESTION_API}/property/second/${firstPropertyId}`);
- };
- // question-manage
- export function questionPageListApi(data, { pageNo, pageSize }) {
- const url = `${QUESTION_API}/importPaper/${pageNo}/${pageSize}`;
- return $httpWithMsg.get(url, { params: data });
- }
- export function deleteQuestionApi(questionId) {
- return $httpWithMsg.get(`${QUESTION_API}/paper/deleteQuestion/${questionId}`);
- }
- export function moveQuestionApi(questionId, folderId) {
- return $httpWithMsg.get(`${QUESTION_API}/paper/moveQuestion/`, {
- params: { questionId, folderId },
- });
- }
- export function copyQuestionApi(questionId) {
- return $httpWithMsg.get(`${QUESTION_API}/paper/copyQuestion/`, {
- params: { questionId },
- });
- }
- export function importQuestionApi(data, headData) {
- return $httpWithMsg.post(`${QUESTION_API}/paper/copyQuestion/`, data, {
- headers: headData,
- });
- }
|