import { axios } from "./http";

// 获取博物馆列表
export function getMuseumList(data, cb) {
  let params = {
    ...data,
  };

  axios({
    method: "post",
    data: params,
    url: `show/museum/list`,
  }).then((res) => {
    cb(res);
  });
}


// 获取展览列表
export function getExhibitionList(data, cb) {
  let params = {
    ...data,
  };

  axios({
    method: "post",
    data: params,
    url: `show/exhibition/list`,
  }).then((res) => {
    cb(res);
  });
}


// 获取文物列表
export function getCollectionList(data, cb) {
  let params = {
    ...data,
  };

  axios({
    method: "post",
    data: params,
    url: `show/goods/list`,
  }).then((res) => {
    cb(res);
  });
}

// 获取城市数量
export function getCityList(cb) {
  axios({
    method: "get",
    url: `show/museum/cityList`,
  }).then((res) => {
    cb(res);
  });
}



// 获取年代
export function getAge(cb) {
  axios({
    method: "get",
    url: `show/goods/getAge`,
  }).then((res) => {
    cb(res);
  });
}


 
// 获取材质
export function getType(cb) {
  axios({
    method: "get",
    url: `show/goods/getType`,
  }).then((res) => {
    cb(res);
  });
}



// 获取博物馆详情
export function getMuseumDetail(data, cb) {

  axios({
    method: "get",
    url: `show/museum/detail/${data.id}`,
  }).then((res) => {
    cb(res);
  });
}

// 获取博物馆详情
export function getExhibitionDetail(data, cb) {

  axios({
    method: "get",
    url: `show/exhibition/detail/${data.id}`,
  }).then((res) => {
    cb(res);
  });
}


// 获取配置详情
export function getConfig(cb) {
  axios({
    method: "get",
    url: `show/getConfig`,
  }).then((res) => {
    cb(res);
  });
}



//获取详情
export function getDetailById(type,data, cb) {
  axios({
    method: "get",
    url: `show/${type}/detail/${data.id}`,
  }).then((res) => {
    cb(res);
  });
}