/* 短视频API */
import api from "@/api/http.js";
var host = process.env.VUE_APP_Host; // 获取不同环境下不同的api路径


// 获取用户关注医生列表
export const getMyFollowList = (data) => {
  return api.post('/api/Program/GetMyFollowList', data )
}


// 获取用户喜欢的视频列表
export const getMyLikeList = (data) => {
  return api.post('/api/Program/GetMyLikeList', data )
}

// 关注医生
export const addFollow = (data) => {
  return api.post('/api/Program/AddFollow', data)
}

// 取消关注医生
export const cancelFollow = (data) => {
  return api.post('/api/Program/CancelFollow', data)
}

// 获取视频列表
export const searchVideoList = (data) => {
  return api.post('/api/Program/SerachVideoList', data)
}

// 获取首页视频列表
export const searchVideoListByHome = (data) => {
  return api.post('/api/Program/GetVideoListByHome', data)
}


// 视频点赞
export const addLike = (data) => {
  return api.post('/api/Program/AddLike', data)
}

// 视频取消点赞
export const cancelLike = (data) => {
  return api.post('/api/Program/CancelLike', data)
}


// 视频播放次数新增
export const addPlay = (data) => {
  return api.post('/api/Program/AddPlay', data)
}


// 视频分享次数新增
export const addShare = (data) => {
  return api.post('/api/Program/AddShare', data)
}

// 新增评论
export const addComment = (data) => {
  return api.post('/api/Program/AddComment', data)
}


// 获取评论
export const getCommentList = (data) => {
  return api.post('/api/Program/GetVideoCommentDTOList', data)
}


// 根据指定的ID获取视频
export const getVideoById = (data) => {
  return api.post('/api/Program/GetVideo', {
    ...data
  })
}

// 获取医生主页短视频API
export const getDoctorShortVideo = (data) => {
  return api.post('/api/Program/GetVideoList', data)
}


// 搜索视频API
export const searchVideo = (data)=>{
  return api.post('/api/Program/SerachVideoList', data)
}

// 搜索医生API
export const searchDoctor = (data) => {
  return api.post('/api/Program/SearchDoctorList', data)
}

// 获取医生详细信息
export const getDoctorInfo = (data) => {
  return api.post('/api/Program/GetDoctorDiss', data)
}


// 获取医生自己上传的视频
export const getDoctorProduction = (data) => {
  return api.post('/api/Program/GetMyVideoList', data)
}

// 医生上传视频
export const uploadFile = (params,config) => {
  // return api.post('/api/Home/UploadFile?isCompress=true', params,config)
  return api.post('/api/Home/UploadFile', params,config)
}

// 获取视频上传地址和凭证
export const createUploadVideo = (title) => {
  return api.post(`/api/Program/CreateUploadVideo?Title=${title}`,)
}


// 上传视频归属到医生
export const uploadFileByDoctor = (data)=>{
  return api.post('/api/Program/UploadFileByDoctor', data)
}


// 获取用户基本信息
export const getUserInfo = (data) => {
  return api.post('/api/Account/GetUserInfo', data)
}


// 获取医生上传的视频列表中正在转码的视频
export const GetMyVideoListByTranscoding = (data) => {
  return api.post('/api/Program/GetMyVideoListByTranscoding', data)
}

// 获取首页推荐短视频列表
export const getVideoByHomePage = (data) => {
  return api.post('/api/Program/GetVideoListByhomePage', data);
}


// 获取搜索视频的二级科室
export const getSecondDepartmentList = (data) => {
  return api.post('/api/Home/GetDepartmentListByEr', data);
}