import { request } from 'umi';
import { getDataBaseUrl } from '@/global_data';
//获取分页数据
export async function getGoodstechnologypage(data) {
  return request(getDataBaseUrl()+`/api/productfunction/page`, {
    method: 'Post',
    data: data,
  });
}
export async function addgoodstechnology(data) {
    return request(getDataBaseUrl()+`/api/productfunction/add`, {
      method: 'Post',
      data: data,
    });
  }
  export async function updategoodstechnology(data) {
    return request(getDataBaseUrl()+`/api/productfunction/update`, {
      method: 'Post',
      data: data,
    });
  }
  export async function deletegoodstechnology(data) {
    return request(getDataBaseUrl()+`/api/productfunction/delete`, {
      method: 'Post',
      data: data,
    });
  }
  export async function getproducttopicspage(data) {
    return request(getDataBaseUrl()+`/api/producttopics/page`, {
      method: 'Post',
      data: data,
    });
  }
  export async function addproducttopics(data) {
      return request(getDataBaseUrl()+`/api/producttopics/add`, {
        method: 'Post',
        data: data,
      });
    }
    export async function updateproducttopics(data) {
      return request(getDataBaseUrl()+`/api/producttopics/update`, {
        method: 'Post',
        data: data,
      });
    }
    export async function deleteproducttopics(data) {
      return request(getDataBaseUrl()+`/api/producttopics/delete`, {
        method: 'Post',
        data: data,
      });
    }
  export async function gettechnologyactionList(data) {
    return request(getDataBaseUrl()+`/api/productfunction/getproductfunctionaction?productFunctionId=`+data, {
      method: 'Get',
    });
  }
  export async function addtechnologyaction(data) {
    return request(getDataBaseUrl()+`/api/productfunction/addproductfunctionaction`, {
      method: 'Post',
      data: data,
    });
  }
  export async function updatetechnologyaction(data) {
    return request(getDataBaseUrl()+`/api/productfunction/updateproductfunctionaction`, {
      method: 'Post',
      data: data,
    });
  }
  export async function deletetechnologyaction(data) {
    return request(getDataBaseUrl()+`/api/productfunction/delproductfunctionaction`, {
      method: 'Post',
      data: data,
    });
  }

  export async function GetDeviceVesion(TypeCode) {
    return request(getDataBaseUrl()+`/api/devicevesion/getdevicevesion?productId=${TypeCode}`, {
      method: 'Get',
    });
  }
  export async function GetProduct(productId) {
    return request(getDataBaseUrl()+`/api/product/getproduct?productId=${productId}`, {
      method: 'Get',
    });
  }