import request from "@/utils/request";

/**
 * 目录树
 */
export function leftCatalogue(query) {
  return request({
    url: "/customer/resource/catalogue",
    method: "get",
    params: query,
  });
}

// 资源列表
export function listResources(query) {
  return request({
    url: "/customer/resource/list",
    method: "get",
    params: query,
  });
}

// 资源详情
export function getResource(query) {
  return request({
    url: "/customer/resource/detail",
    method: "get",
    params: query,
  });
}

// 查询数据
export function queryData(data) {
  return request({
    url: "/customer/resource/querydata",
    method: "post",
    data: data,
  });
}

// 查询服务
export function queryService(data) {
  return request({
    url: "/customer/resource/queryservice",
    method: "post",
    data: data,
  });
}

export function getResourceOutItem(query) {
  return request({
    url: "/customer/resource/outitem",
    method: "get",
    params: query,
  });
}

export function getResourceItem(query) {
  return request({
    url: "/customer/resource/serviceitem",
    method: "get",
    params: query,
  });
}

export function getResourceInItem(query) {
  return request({
    url: "/customer/resource/initem",
    method: "get",
    params: query,
  });
}

// 我的资源
export function myResources(query) {
  return request({
    url: "/customer/resource/my",
    method: "get",
    params: query,
  });
}

// 申请资源
export function applyResource(data) {
  return request({
    url: "/customer/resource/apply",
    method: "post",
    data: data,
  });
}
