yz3456
2024-08-13 695a1d56442b734d44212269f1e4c44220f9d9f0
ruoyi-ui/src/api/collection/index.js
@@ -9,6 +9,15 @@
  })
}
//类别数据
export function listType(query) {
  return request({
    url: '/zfCollection/type',
    method: 'get',
    params: query
  })
}
// 根据id查询收藏和荣誉
export function getCollection(id) {
  return request({
@@ -48,7 +57,7 @@
//上传文件
export function uploadPic(data) {
  return request({
    url: '/common/upload',
    url: '/common/uploads',
    method: 'post',
    data: data
  })
@@ -62,3 +71,63 @@
    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
  })
}