import { api, downloadFile, createApiUrl} from '~/utils/axios';


                       /**
                        * 下载常见问题模板
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export function downloadTemplate(data) {
                           downloadFile(createApiUrl('Faq.Faq/downloadTemplate'), data);
                       }
                       
                       /**
                        * 导入常见问题
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export const importExcel = createApiUrl('Faq.Faq/importExcel');
                       
                       /**
                       * 导出常见问题
                       * @param {Object} data
                       * @return {Promise} api
                       */
                       export function exportExcel(data) {
                           downloadFile(createApiUrl('Faq.Faq/exportExcel'), data);
                       }
                       







/**
 * 获取常见问题列表
 * @param {Object} data
 * @return {Promise} api
 */
export function getFaqList(data) {
  return api.post('Faq.Faq/getFaqList', data);
}

/**
 * 删除常见问题
 * @param {Object} data
 * @return {Promise} api
 */
export function deleteFaq(data) {
  return api.post('Faq.Faq/deleteFaq', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '删除失败'
  });
}

/**
 * 添加常见问题
 * @param {Object} data
 * @return {Promise} api
 */
export function addFaq(data) {
  return api.post('Faq.Faq/addFaq', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '添加失败'
  });
}
/**
 * 编辑常见问题
 * @param {Object} data
 * @return {Promise} api
 */
export function editFaq(data) {
  return api.post('Faq.Faq/editFaq', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '编辑失败'
  });
}
