import { baseRequest } from '@/utils/newRequest'

const request = (url, ...arg) => baseRequest(`/api/webapp/` + url, ...arg)

export default {
	// 获取资管理审核括列表
	page(data) {
		return request('disk/courseauditrecord/page', data, 'get')
	},
	//资源管理添加
	add(data = {}) {
		return request('disk/courseauditrecord/add', data, 'post')
	},
	//发布
	release(data = {}) {
		return request('disk/courseinfo/add', data, 'post')
	},
	//更新状态（审核/删除/恢复）
	updateStatus(data = {}) {
		return request('disk/courseauditrecord/updateStatus', data, 'post')
	},
	//编辑
	edit(data = {}) {
		return request('disk/courseauditrecord/edit', data, 'post')
	},
	//编辑
	detail(data = {}) {
		return request('disk/courseauditrecord/detail', data, 'get')
	},
	//院校下拉接口
	orgTreeSelector(data = {}) {
		return request('sys/org/orgTreeSelector', data, 'get')
	},
	//根据院校id获取专业下拉接口
	zyselect(data = {}) {
		return request('disk/major/select', data, 'get')
	},
	//获取热门关键词下拉接口
	HotKeywords(data = {}) {
		return request('disk/word/select', data, 'get')
	},
	//添加热门关键词
	addHotKeywords(data = {}) {
		return request('disk/word/add', data, 'post')
	},
	//获取课程下拉
	courseAllList(data = {}) {
		return request('disk/courseinfo/allList', data, 'get')
	},
	//查询资源表单最后一次提交信息
	recentlyRecord(data = {}) {
		return request('disk/courseauditrecord/recentlyRecord', data, 'get')
	},
	//回收站资源彻底删除
	deletefile(data = {}) {
		return request('disk/courseauditrecord/delete', data, 'post')
	},
	//文件下载资源上传删除
	downloadfile(data = {}) {
		return request('resourceFile/downloadfile', data, 'get', { responseType: 'blob' })
	},
	//文件上传成功转换格式
	fileFormatConversion(data = {}) {
		return request('transcodingResource/file', data, 'post')
	},
	//资源类型下拉
	resourceTypeTree(data = {}) {
		return request('disk/type/tree', data, 'get')
	},
	//资源格式下拉
	fileformat(data = {}) {
		return request('disk/fileformat/page', data, 'get')
	},
	//公开人员查询分级查询
	orgUserTreeRespectively(data = {}) {
		return request('disk/college/orgUserTreeRespectively', data, 'get')
	},
	//公开人员查询所有以及下级
	orgUserTreeSelector(data = {}) {
		return request('disk/college/orgUserTreeSelector', data, 'get')
	}
}
