import request from '@/utils/request'
const museumApi = {
  // 获取轮播图列表
  getCarouselList(params = {}) {
    return request({
      url: '/museum/carousel/page',
      method: 'post',
      data: {
        pageNum: 1,
        pageSize: 10,
        status: 1,
        ...params,
      },
    })
  },

  // 获取资讯列表
  getNewsList(params = {}) {
    return request({
      url: '/museum/information/page',
      method: 'post',
      data: {
        pageNum: 1,
        pageSize: 3,
        status: 1,
        ...params,
      },
    })
  },

  // 获取展览列表
  getExhibitionList(params = {}) {
    return request({
      url: '/museum/exhibit/page',
      method: 'post',
      data: {
        pageNum: 1,
        pageSize: 5,
        status: 1,
        ...params,
      },
    })
  },

  // 社教活动列表
  getSocialActivityList(params = {}) {
    return request({
      url: '/museum/activity/page',
      method: 'post',
      data: {
        pageNum: 1,
        pageSize: 5,
        ...params,
      },
    })
  },

  // 获取展览详情
  getExhibitionDetail(id) {
    return request({
      url: `/museum/exhibition/${id}`,
      method: 'get',
    })
  },

  // 获取展览详情（新接口）
  getExhibitDetail(id) {
    return request({
      url: `/museum/exhibit/info/${id}`,
      method: 'post',
    })
  },

  // 获取典藏列表
  getCollectionList(params = {}) {
    return request({
      url: '/museum/collection/page',
      method: 'get',
      params: {
        pageNum: 1,
        pageSize: 10,
        status: 1,
        ...params,
      },
    })
  },

  // 获取文物列表
  getArtifactList(params = {}) {
    return request({
      url: '/museum/artifact/page',
      method: 'post',
      data: {
        pageNum: 1,
        pageSize: 10,
        status: 1,
        title: '',
        type: 0,
        ...params,
      },
    })
  },

  // 获取典藏详情
  getCollectionDetail(id) {
    return request({
      url: `/museum/collection/${id}`,
      method: 'get',
    })
  },

  // 获取文物详情
  getArtifactDetail(id) {
    return request({
      url: `/museum/artifact/info/${id}`,
      method: 'post',
    })
  },

  // 获取新闻详情
  getNewsDetail(id) {
    return request({
      url: `/museum/news/${id}`,
      method: 'get',
    })
  },

  // 获取资讯详情
  getInformationDetail(id) {
    return request({
      url: `/museum/information/info/${id}`,
      method: 'post',
    })
  },

  // 获取活动详情
  getActivityDetail(id) {
    return request({
      url: `/museum/activity/info/${id}`,
      method: 'post',
    })
  },

  // 获取展馆介绍详情
  getMuseumDetail(type) {
    return request({
      url: `/museum/introContext/info/${type}`,
      method: 'post',
    })
  },

  // 获取微信JSSDK配置
  getWxJssdkConfig(url) {
    return request({
      url: '/museum/wxMini/getWxJssdkConfig',
      method: 'get',
      params: {
        url: url,
      },
    })
  },
}

export { museumApi }
export default museumApi
