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









/**
 * 获取首页视频列表
 * @param {Object} data
 * @return {Promise} api
 */
export function getHomeVideoList(data) {
  return api.post('Home.HomeVideo.HomeVideo/getHomeVideoList', data);
}

/**
 * 删除首页视频
 * @param {Object} data
 * @return {Promise} api
 */
export function deleteHomeVideo(data) {
  return api.post('Home.HomeVideo.HomeVideo/deleteHomeVideo', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '删除失败'
  });
}

/**
 * 添加首页视频
 * @param {Object} data
 * @return {Promise} api
 */
export function addHomeVideo(data) {
  return api.post('Home.HomeVideo.HomeVideo/addHomeVideo', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '添加失败'
  });
}
/**
 * 编辑首页视频
 * @param {Object} data
 * @return {Promise} api
 */
export function editHomeVideo(data) {
  return api.post('Home.HomeVideo.HomeVideo/editHomeVideo', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '编辑失败'
  });
}