// 文件模块相关接口
import { moduleRequest } from '@/utils/reSourceRequest'

const request = moduleRequest(`/api/webapp/`)

/**
 * 获取文件列表相关接口
 */
// 获取文件列表（区分文件路径）
export const list = (p) => request('disk/coursecentry/page', p, 'get')
// 获取文件列表（区分文件类型）
// export const getFileListByType = (p) => request('file/selectfilebyfiletype', p, 'get')

// 进入详情之后增加观看次数
export const addViewCount = (p) => request('disk/courseauditrecord/addViewCount', p, 'post')
//详情
export const detail = (p) => request('disk/courseauditrecord/detail', p, 'get')
//收藏增加
export const add = (p) => request('disk/collect/add', p, 'post')
//收藏查询
export const queryList = (p) => request('disk/collect/queryList', p, 'get')
//取消收藏
export const cancel = (p) => request('disk/collect/cancel', p, 'post')
//添加评论/回复
export const addComment = (p) => request('disk/comment/add', p, 'post')
//修改评论
export const editComment = (p) => request('disk/comment/edit', p, 'post')
//删除评论
export const deleteComment = (p) => request('disk/comment/delete', p, 'post')
//评论查询
export const pageComment = (p) => request('disk/comment/page', p, 'get')
//点赞
export const giveComment = (p) => request('disk/comment/give', p, 'get')
//取消点赞
export const giveCancelComment = (p) => request('disk/comment/giveCancel', p, 'get')
//资源中心的详情
export const resourcecentreDetail = (p) => request('disk/resourcecentre/detail', p, 'get')
//获取分享链接
export const getShareLink = (p) => request('disk/courseauditrecord/getShareLink', p, 'get')
//搜索条件
export const getQueryTreeAll = (p) => request('disk/type/treeAll', p, 'get')
//获取评论列表hot
export const getTalkPageList = (p) => request('disk/comment/pageList', p, 'get')
//筛查文件格式
export const getAllListFileFormat = (p) => request('disk/fileformat/allList', p, 'get')

export const checkAuth = (p) => request('disk/fileformat/allList', p, 'get')
