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


                       /**
                       * 导出爱情故事
                       * @param {Object} data
                       * @return {Promise} api
                       */
                       export function exportExcel(data) {
                           downloadFile(createApiUrl('LoveStory.LoveStory/exportExcel'), data);
                       }
                       
                       /**
                        * 下载爱情故事模板
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export function downloadTemplate(data) {
                           downloadFile(createApiUrl('LoveStory.LoveStory/downloadTemplate'), data);
                       }
                       
                       /**
                        * 导入爱情故事
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export const importExcel = createApiUrl('LoveStory.LoveStory/importExcel');
                       







/**
 * 获取爱情故事列表
 * @param {Object} data
 * @return {Promise} api
 */
export function getLoveStoryList(data) {
  return api.post('LoveStory.LoveStory/getLoveStoryList', data);
}

/**
 * 删除爱情故事
 * @param {Object} data
 * @return {Promise} api
 */
export function deleteLoveStory(data) {
  return api.post('LoveStory.LoveStory/deleteLoveStory', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '删除失败'
  });
}

/**
 * 添加爱情故事
 * @param {Object} data
 * @return {Promise} api
 */
export function addLoveStory(data) {
  return api.post('LoveStory.LoveStory/addLoveStory', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '添加失败'
  });
}
/**
 * 编辑爱情故事
 * @param {Object} data
 * @return {Promise} api
 */
export function editLoveStory(data) {
  return api.post('LoveStory.LoveStory/editLoveStory', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '编辑失败'
  });
}
