import request from '@/utils/request'
|
|
// 查询所有收藏和荣誉
|
export function listCollection(query) {
|
return request({
|
url: '/zfCollection/all',
|
method: 'get',
|
params: query
|
})
|
}
|
|
//类别数据
|
export function listType(query) {
|
return request({
|
url: '/zfCollection/type',
|
method: 'get',
|
params: query
|
})
|
}
|
|
// 根据id查询收藏和荣誉
|
export function getCollection(id) {
|
return request({
|
url: '/zfCollection/' + id,
|
method: 'get',
|
|
})
|
}
|
|
//新增收藏和荣誉
|
export function addCollection(data)
|
{
|
return request({
|
url: '/zfCollection',
|
method: 'post',
|
data: data
|
})
|
}
|
|
// 删除收藏和荣誉
|
export function delCollection(ids) {
|
return request({
|
url: '/zfCollection/' + ids,
|
method: 'delete'
|
})
|
}
|
|
//修改收藏和荣誉
|
export function updateCollection(data) {
|
return request({
|
url: '/zfCollection',
|
method: 'put',
|
data: data
|
})
|
}
|
|
//上传文件
|
export function uploadPic(data) {
|
return request({
|
url: '/common/uploads',
|
method: 'post',
|
data: data
|
})
|
}
|
//下载文件
|
export function download(data) {
|
return request({
|
url: '/common/downLoadFile',
|
method: 'get',
|
params: data,
|
responseType: 'blob'
|
})
|
}
|
|
//导入
|
export function enload(data) {
|
return request({
|
url: '/zfCollection/importData',
|
method: 'post',
|
data: data
|
})
|
}
|
|
// -------------------------------
|
// 分享
|
export function share(data) {
|
return request({
|
url: '/zfCollectionShare/share',
|
method: 'post',
|
data: data
|
})
|
}
|
// 查看分享给谁了什么数据
|
export function shareToWho(data,query) {
|
return request({
|
url: '/zfCollectionShare/getInfoByUserId',
|
method: 'post',
|
data: data,
|
params: query
|
})
|
}
|
// 查看谁分享了数据
|
export function getWhoShare(query) {
|
return request({
|
url: '/zfCollectionShare/getInfoByShareId',
|
method: 'get',
|
params: query
|
})
|
}
|
// 下载分享的数据
|
export function downShareData(data) {
|
return request({
|
url: '/zfCollectionShare/downloadDate',
|
method: 'post',
|
data: data
|
})
|
}
|
// 收回分享数据
|
export function deleteShareData(data) {
|
return request({
|
url: '/zfCollectionShare/deleteInfoByUserId',
|
method: 'post',
|
data: data
|
})
|
}
|
// 展示下载的数据
|
export function showShareData(query) {
|
return request({
|
url: '/zfCollectionShare/all',
|
method: 'get',
|
params: query
|
})
|
}
|