import axios from '../utils/request'
// 获取项目类型
export const getProjectType = () => {
  return axios({
    // method: 'post',
    url: '/cms/project/base/getProjectType'
  })
}
// 获取文物类型
export const getGoodsType = () => {
  return axios({
    url: '/cms/goods/base/getGoodsType'
  })
}
// 设置文物封面
export const modelSetIndex = (fileId) => {
  return axios({
    url: `/cms/goods/modelSetIndex/${fileId}`
  })
}
// 弹窗文物-新增&编辑
export const modelSave = (data) => {
  return axios({
    method: 'post',
    url: '/cms/goods/modelSave',
    data
  })
}
// 通过ID获取文物详情
export const getAntiqueById = (id) => {
  return axios({
    url: `/cms/goods/detail/${id}`
  })
}
// 新增项目
export const projectAdd = (data) => {
  return axios({
    method: 'post',
    url: '/cms/project/add',
    data
  })
}
// 获取主页列表数据
export const projectList = (data) => {
  return axios({
    method: 'post',
    url: '/cms/project/list',
    data
  })
}
// 主页面的删除
export const projecDel = (id) => {
  return axios({
    method: 'delete',
    url: `/cms/project/remove/${id}`
  })
}
// 查看页面通过ID获取详情
export const getDetail = (id) => {
  return axios({
    url: `/cms/project/detail/${id}`
  })
}
// 编辑页面的项目详情保存
export const projectEdit1 = (data) => {
  return axios({
    method: 'post',
    url: '/cms/project/edit',
    data
  })
}
// 编辑页面的 网址/场景保存
export const editScene = (data) => {
  return axios({
    method: 'post',
    url: '/cms/project/editScene',
    data
  })
}
// 编辑页面的 文档保存
export const editDoc = (data) => {
  return axios({
    method: 'post',
    url: '/cms/project/editDoc',
    data
  })
}
// 编辑页面的 文物保存
export const editGoods = (data) => {
  return axios({
    method: 'post',
    url: '/cms/project/editGoods',
    data
  })
}
