import request from '@/config/axios'
export const searchQuestion = async (param) => {
  return await request.get({
    url: '/admin-api/applet/wrj/question/list',
    params: param
  })
}

export const updateQuestion = async (data) => {
  return await request.put({
    url: '/admin-api/applet/wrj/question/update',
    data: data
  })
}

export const addQuestion = async (data) => {
  return await request.post({
    url: '/admin-api/applet/wrj/question/add',
    data: data,
    isSubmitForm: true
  })
}

export const deleteQuestion = async (id) => {
  return await request.delete({
    url: `/admin-api/applet/wrj/question/delete?id=${id}`
  })
}

export const uploadFile = async (data) => {
  return await request.post({
    url: '/admin-api/applet/wrj/question/upload',
    data: data
  })
}

// 查询无人机类型列表
export const getCarTypeOptions = async (params) => {
  return await request.get({
    url: '/admin-api/applet/wrj/model/list',
    params
  })
}

// 查询驾驶员类型列表
export const getDriverTypeOptions = async (params) => {
  return await request.get({
    url: '/admin-api/applet/wrj/type/list',
    params
  })
}
