import request from "@/utils/request";

export function getModelList(query) {
  return request({
    url: '/model/info/list',
    method: 'get',
    params: query
  })
}

export function getModelList2(data) {
  return request({
    url: "model/info/list2",
    method: 'get',
    params:data
  });
}

export function addModel(data) {
  return request.post("model/info", data);
}

export function getServiceApply(id) {
  return request.get(`/pt/service/apply/${id}`);
}

export function delMdid(id) {
  return request({
    url: '/model/info/' + id,
    method: 'delete'
  })
}

export function modelFile(data) {
  return request({
    url: '/model/file',
    method: 'post',
    data: data
  })
}

export function getModelFile(data) {
  return request.post("common/upload", data);
}

export function getModelDetail(id) {
  return request.get(`/model/info/${id}`);
}

export function updateModel(data) {
  return request({
    url: '/model/info',
    method: 'put',
    data: data
  })
}
