import request from '@/config/axios'

export const addJx = async (data) => {
  return await request.post({
    url: '/admin-api/applet/xunjia/question/jx/add',
    data: data
  })
}

export const getJxQuestionList = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/question/jx/list',
    params: params
  })
}

export const delJxData = async (id, source) => {
  return await request.delete({
    url: `/admin-api/applet/xunjia/question/jx/delete?id=${id}&source=${source}`
  })
}

export const addMj = async (data) => {
  return await request.post({
    url: '/admin-api/applet/xunjia/secret/add',
    data: data
  })
}

export const getMjList = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/secret/list',
    params: params
  })
}

export const delMj = async (secretId, source) => {
  return await request.delete({
    url: `/admin-api/applet/xunjia/secret/delete?secretId=${secretId}&source=${source}`
  })
}

export const clearMj = async (secretId, source) => {
  return await request.delete({
    url: `/admin-api/applet/xunjia/secret/clear?secretId=${secretId}&source=${source}`
  })
}

export const getMjQuestionList = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/secret/question/list',
    params: params
  })
}

export const addMjQuestion = async (data) => {
  return await request.post({
    url: '/admin-api/applet/xunjia/secret/question/add',
    data: data
  })
}

export const delMjQuestion = async (id, source) => {
  return await request.delete({
    url: `/admin-api/applet/xunjia/secret/question/delete?id=${id}&source=${source}`
  })
}
