import axios from '../axios';

/**
 * 查询试题
 */
export function getList(data: any) {
    return axios({
        url: "/ex/question/getList",
        method: 'post',
        data: data
    });
}

/**
 * 删除试题
 */
export function delQuestion(ids: any) {
    return axios({
        url: '/ex/question/delQuestion',
        method: 'post',
        data: ids
    });
}

/**
 * 添加试题
 */
export function addQuestion(questionData: object) {
    return axios({
        url: "/ex/question/addQuestion",
        method: 'post',
        data: questionData
    });
}

/**
 * 修改试题
 */
export function editQuestion(questionData: object) {
    return axios({
        url: "/ex/question/editQuestion",
        method: 'post',
        data: questionData
    });
}

/**
 * 获取题目详情
 */
export function getQuestionDetail(id: string | null) {
    return axios({
        url: `/ex/question/getQuestionDetail?id=${id}`,
        method: 'get'
    });
}

/**
 * 获取监管行业
 */
export function findIndustry() {
    return axios({
        url: '/ex/question/findIndustry',
        method: 'get'
    });
}