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

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

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

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