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









/**
 * 获取亮点列表
 * @param {Object} data
 * @return {Promise} api
 */
export function getHighlightsList(data) {
  return api.post('Home.Highlights.Highlights/getHighlightsList', data);
}

/**
 * 删除亮点
 * @param {Object} data
 * @return {Promise} api
 */
export function deleteHighlights(data) {
  return api.post('Home.Highlights.Highlights/deleteHighlights', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '删除失败'
  });
}

/**
 * 添加亮点
 * @param {Object} data
 * @return {Promise} api
 */
export function addHighlights(data) {
  return api.post('Home.Highlights.Highlights/addHighlights', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '添加失败'
  });
}
/**
 * 编辑亮点
 * @param {Object} data
 * @return {Promise} api
 */
export function editHighlights(data) {
  return api.post('Home.Highlights.Highlights/editHighlights', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '编辑失败'
  });
}
