import Request from '../common/request.js';
let request = new Request().http

 //获取视频列表
 export function getVideoList(parmars,page = 1, size = 10) {
   let data = {"pageNum":page,"pageSize":size};
   data=Object.assign(parmars, data);
   return request('/app/video/getVideoList',data,'GET');
 }
 
 
 //我的收藏视频列表
 export function getFavoriteVideoList(parmars,page = 1, size = 10) {
   let data = {"pageNum":page,"pageSize":size};
   data=Object.assign(parmars, data);
   return request('/app/video/getFavoriteVideoList',data,'GET');
 }
 
 
 //收藏
 export function doFavorite(videoId) {
 	 let data={"videoId":videoId};
 	 return request('/app/video/doFavorite',data,'POST','application/json;charset=UTF-8');
 }
 

 //点赞
 export function doLike(videoId) {
 	 let data={"videoId":videoId};
	 console.log("qxj doLike videoId:"+videoId);
 	 return request('/app/video/doLike',data,'POST','application/json;charset=UTF-8');
 }
 
 
 //获取视频评论
 export function getComments(parmars,page = 1, size = 10) {
   let data = {"pageNum":page,"pageSize":size};
   data=Object.assign(parmars, data);
   return request('/app/video/getComments',data,'GET');
 }
 
  //评论回复列表
 export function getReplies(parmars,page = 1, size = 10) {
   let data = {"pageNum":page,"pageSize":size};
   data=Object.assign(parmars, data);
   return request('/app/video/getReplies',data,'GET');
 }
 
 
 //视频评论
 export function addComment(data) {
 	 return request('/app/video/addComment',data,'POST','application/json;charset=UTF-8');
 }
 
 //评论点赞
 export function doLikeComment(data) {
 	 return request('/app/video/doLikeComment',data,'POST','application/json;charset=UTF-8');
 }
 
 
 //删除评论
 export function deleteComment(data) {
 	 return request('/app/video/delComment',data,'POST','application/json;charset=UTF-8');
 }
 

 // 增加分享
 export function shareVideo(data) {
 	 return request('/app/video/shareVideo',data,'POST','application/json;charset=UTF-8');
 }
 