import http from '@/utils/http'

/**
 * 分库管理-获取树列表
 */
export const D1_APIgetTree = () => {
  return http.get('cms/storage/perm/getTree')
}

/**
 * 分库管理 - 按库位查看-列表
 */
export const D1_APIgetSiteList = (id: number, isNull: boolean) => {
  let url = `cms/site/page/${id}`

  if (isNull) url += '?isEmpty=1'

  return http.get(url)
}

/**
 * 分库管理 - 按藏品查看-列表
 */
export const D1_APIgetGoodsList = (data: any) => {
  return http.post('cms/site/goods/page', data)
}

/**
 * 分库管理 - 详情 - 藏品详情页面的库存信息用到
 */
export const D1_APIgetInfo = (siteId: number) => {
  return http.get(`cms/site/detail/${siteId}`)
}
